Skip to content
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 reports with orginization tags #3790

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Fix reports with orginization tags #3790

merged 1 commit into from
Nov 4, 2024

Conversation

noamblitz
Copy link
Contributor

@noamblitz noamblitz commented Nov 3, 2024

Changes

Fixes #3750

Issue link

Closes #3750

QA notes

Follow steps in #3750, see that it has been solved.


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

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.

@noamblitz noamblitz requested a review from a team as a code owner November 3, 2024 11:04
Copy link

sonarqubecloud bot commented Nov 3, 2024

@@ -90,7 +90,7 @@ def save_report_data(
report_id=uuid4(),
organization_code=organization.code,
organization_name=organization.name,
organization_tags=list(organization.tags.all()),
organization_tags=[tag.name for tag in organization.tags.all()],
Copy link
Contributor

@underdarknl underdarknl Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A helper function on the organization object that returns just the names would be useful, seeing that we already use this same loop in 4 places, and this will probably grow.

@stephanie0x00
Copy link
Contributor

stephanie0x00 commented Nov 4, 2024

Checklist for QA:

  • I have checked out this branch, and successfully ran a fresh make reset.
  • I confirmed that there are no unintended functional regressions in this branch:
    • I have managed to pass the onboarding flow
    • Objects and Findings are created properly
    • Tasks are created and completed properly
  • I confirmed that the PR's advertised feature or hotfix works as intended.
  • I checked the logs for errors and/or warnings and made issues where necessary

What works:

When generating the report no error message is thrown.

What doesn't work:

n/a

Bug or feature?:

Identified bug: #3794 but it appears to be on main.

@noamblitz
Copy link
Contributor Author

Weird, this bug should then also exist in main I'm afraid.

@underdarknl underdarknl merged commit 5439599 into main Nov 4, 2024
22 checks passed
@underdarknl underdarknl deleted the fix/report-org-tags branch November 4, 2024 13:36
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Organisation tag gives validation error generating reports
4 participants