-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix scheduled Aggregate Report naming #3748
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ammar92
reviewed
Oct 29, 2024
Rieven
reviewed
Oct 29, 2024
9 tasks
Checklist for QA:
What works:Looks good, the bug is indeed fixed now. What doesn't work:n/a Bug or feature?:
The following screenshot to elaborate both above points: |
Quality Gate failedFailed conditions |
underdarknl
approved these changes
Nov 1, 2024
jpbruinsslot
added a commit
that referenced
this pull request
Nov 6, 2024
* main: Fix reports with organization tags (#3790) Update README.rst - Fix guidelines URLs (#3789) Exclude Report from ooi list (#3768) Update `croniter` (#3767) Fixes for dropdowns (#3732) Fix scheduled Aggregate Report naming (#3748) Make systemctl call for kat-rocky-worker conditional (#3782) Fix vulnerability chapters in Aggregate table of content (#3780) Fix auth token middleware with wrong format header (#3755) Add rocky REST API for report recipes (#3746) Add exception handling to the rest api (#3708) Refactor Multi Report to comply to the new report flow (#3705) Fix report names for scheduled reports (#3726) Fix Multi Report recursion error (#3714) Bump waitress from 3.0.0 to 3.0.1 in /octopoes (#3760) Docs/add muted findings (#3699) Edit report recipe (#3690) Add start date to report schedule (#3701) Add REST API to list report and download pdf report (#3689) Fixes in Report Overview (#3707)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: This PR uses the code of PR #3726
Changes
This PR fixes the bug where a scheduled Aggregate Report would always be generated with the name "Concatenated Report".
I've moved the "save_report" function out of SaveAggregateReportMixin and called it "save_aggregate_report_data". This way, it's possible to access the data from outside of the class.
I've given the SaveAggregateReportView a "report_type = AggregateOrganisationReport" and I've given the ReportRecipe model a "parent_report_type". This parent_report_type can be "concatinated-report", "aggregated-report" or None (for a single report).
Then in the ReportRunner it checks if the parent_report_type of the ReportRecipe is an Aggregate Report. If it is, it does a save_aggregate_report_data, else it does a save_report_data (for single or concatenated reports).
Issue link
Closes #3725
Demo
These schedules:
Result in:
QA notes
Code Checklist
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.