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

Update definition of active requests and prevent adding/withdrawing in submitted status #432

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

rebkwok
Copy link
Contributor

@rebkwok rebkwok commented Jun 28, 2024

Fixes #424

  • Update the definition of active request to include all author and reviewer owned statuses
  • Hide withdraw file button if request is not author-editable
  • Update BLL and DAL so that adding and withdrawing files are only allowed in author-owned statuses
  • Remove state transition from REJECTED to APPROVED

rebkwok added 6 commits June 28, 2024 14:52
We have new statuses, PARTIALLY_REVIEWED, REVIEWED and RETURNED, in which
a request is editable and should be considered active. In these
statuses, adding a file from a workspace adds it to the request if
allowed (i.e. adding a file with a request in RETURNED status adds it to
the returned request rather than creating a new one). If the user's
request is in the process of being reviewed, they can't create a new
one.
_validate_editable now uses the new status_owner logic to return
whether a request is editable by an author. This means that files
can no longer be added or withdrawn while they're under review.
Files can now only be set to withdrawn status if they are on a
returned request. Files on pending requests are just removed (as
before), and files on submitted requests cannot be withdrawn.
Locally, the functional tests started needing slightly longer for
the iframe src attribute to be found on file content pages. I don't
think anything about this particular PR would have caused this, but
a slightly increased timeout shouldn't be an issue.
@rebkwok rebkwok changed the title Active requests Update definition of active requests and prevent adding/withdrawing in submitted status Jun 28, 2024
@rebkwok rebkwok merged commit d2f409d into main Jun 28, 2024
11 checks passed
@rebkwok rebkwok deleted the active-requests branch June 28, 2024 18:00
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.

Workspace files are added to a new request instead of a returned request
2 participants