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 report approval by admins and when automatic #4936

Merged
merged 4 commits into from
Oct 7, 2024

Conversation

gjvoosten
Copy link
Collaborator

@gjvoosten gjvoosten commented Sep 25, 2024

Allow admins to approve all reports. The front-end already allowed it, but the back-end refused it.
Automatic report approval (after the timeout set in the dictionary) did not work for reports that had only been submitted; this is now fixed.
Show "system" instead of "Unspecified" when a report was automatically published.

Closes AB#1186

User changes

  • None.

Superuser changes

  • None.

Admin changes

  • Admins can now approve all reports (e.g. when the person(s) who need to approve are no longer available).
  • Submitted reports now also get automatically approved after the timeout if they haven't been manually approved in time.

System admin changes

  • anet.yml or anet-dictionary.yml needs change
  • db needs migration
  • documentation has changed
  • graphql schema has changed

Checklist

  • Described the user behavior in PR body
  • Referenced/updated all related issues
  • commits follow a repo#issue: Title title format and these 7 rules
  • commits have a clean history, otherwise PR may be squash-merged
  • Added and/or updated unit tests
  • Added and/or updated e2e tests
  • Added and/or updated data migrations
  • Updated documentation
  • Resolved all build errors and warnings
  • Opened debt issues for anything not resolved here

@gjvoosten gjvoosten added the bug label Sep 25, 2024
@gjvoosten gjvoosten force-pushed the AB-1185-only-warn-about-primary-attendees-in-reports branch from d1eb3eb to 088dca9 Compare September 26, 2024 06:34
@gjvoosten gjvoosten force-pushed the AB-1186-allow-admins-to-approve-all-reports branch from 32d735c to 5add24a Compare September 26, 2024 06:34
@gjvoosten gjvoosten force-pushed the AB-1185-only-warn-about-primary-attendees-in-reports branch from 088dca9 to 81cce94 Compare October 1, 2024 14:58
@gjvoosten gjvoosten force-pushed the AB-1186-allow-admins-to-approve-all-reports branch from 5add24a to 4f19ffb Compare October 1, 2024 14:58
@gjvoosten gjvoosten force-pushed the AB-1185-only-warn-about-primary-attendees-in-reports branch from 81cce94 to f1a885c Compare October 2, 2024 14:01
@gjvoosten gjvoosten force-pushed the AB-1186-allow-admins-to-approve-all-reports branch from 4f19ffb to a9d3109 Compare October 2, 2024 14:02
@gjvoosten gjvoosten force-pushed the AB-1185-only-warn-about-primary-attendees-in-reports branch from f1a885c to 628c6ca Compare October 2, 2024 14:26
@gjvoosten gjvoosten force-pushed the AB-1186-allow-admins-to-approve-all-reports branch from a9d3109 to 5c0dcd2 Compare October 2, 2024 14:27
@gjvoosten gjvoosten force-pushed the AB-1185-only-warn-about-primary-attendees-in-reports branch from 628c6ca to 950f948 Compare October 3, 2024 10:14
@gjvoosten gjvoosten force-pushed the AB-1186-allow-admins-to-approve-all-reports branch from 5c0dcd2 to a9fa815 Compare October 3, 2024 10:15
Base automatically changed from AB-1185-only-warn-about-primary-attendees-in-reports to main October 4, 2024 13:50
@gjvoosten gjvoosten marked this pull request as ready for review October 4, 2024 13:50
@gjvoosten gjvoosten force-pushed the AB-1186-allow-admins-to-approve-all-reports branch from a9fa815 to 59a9358 Compare October 7, 2024 06:48
Copy link
Contributor

@midmarch midmarch left a comment

Choose a reason for hiding this comment

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

The front-ends suggest, to an ANET admin, that a draft report can be approved. When this approval button is pressed, the servver returns with an error:

Bad Request: Exception while fetching data (/approveReport) : This report is not pending approval

The "Approve" button should not be enabled on a draft report.

@gjvoosten
Copy link
Collaborator Author

The front-ends suggest, to an ANET admin, that a draft report can be approved. When this approval button is pressed, the servver returns with an error:

Bad Request: Exception while fetching data (/approveReport) : This report is not pending approval

The "Approve" button should not be enabled on a draft report.

Caused by a change for AB#991 quite some time ago; fixed in an additional commit on this PR.

@gjvoosten gjvoosten requested a review from midmarch October 7, 2024 11:54
Copy link
Contributor

@midmarch midmarch left a comment

Choose a reason for hiding this comment

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

LGTM

@gjvoosten gjvoosten merged commit 7a64d2e into main Oct 7, 2024
20 checks passed
@gjvoosten gjvoosten deleted the AB-1186-allow-admins-to-approve-all-reports branch October 7, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants