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

Accepting a review assignment can modify the submissions' active stage #7337

Closed
NateWr opened this issue Sep 27, 2021 · 6 comments
Closed

Accepting a review assignment can modify the submissions' active stage #7337

NateWr opened this issue Sep 27, 2021 · 6 comments
Assignees
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Milestone

Comments

@NateWr
Copy link
Member

NateWr commented Sep 27, 2021

Describe the bug
When a reviewer accepts a review assignment, the submission's active stage is set to the review round's stage. If a submission has been accepted and sent to the copyediting stage, it will be sent back to the review stage if a reviewer accepts the review request.

This may effect completing a review assignment too.

To Reproduce
Steps to reproduce the behavior:

  1. Move a submission to the review stage.
  2. Assign a reviewer.
  3. Accept the submission and send it to the copyediting stage.
  4. Go back to the review stage and login as the reviewer.
  5. Complete the review assignment.
  6. Logout as the reviewer, login as an editor, and see the submission is back in the review stage.

What application are you using?
3.3.0-8

Additional information
See the forum report.


PRs

Branch main
OJS: pkp/ojs#3687
OMP: pkp/omp#1292
PKP-LIB: #8517

Branch stable-3_3_0
OJS: pkp/ojs#3690
OMP: pkp/omp#1294
PKP-LIB: #8520

@NateWr NateWr added the Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. label Sep 27, 2021
@NateWr NateWr added this to the 3.3.0-9 milestone Sep 27, 2021
@asmecher asmecher modified the milestones: 3.3.0-9, 3.3.0-10 Mar 1, 2022
@asmecher asmecher modified the milestones: 3.3.0-11, 3.3.0-12 Jun 7, 2022
@asmecher asmecher modified the milestones: 3.3.0-12, 3.3.0-13 Aug 30, 2022
@asmecher asmecher modified the milestones: 3.3.0-14, 3.3.0-x Nov 10, 2022
defstat added a commit to defstat/pkp-lib that referenced this issue Dec 21, 2022
@defstat defstat self-assigned this Dec 21, 2022
@defstat
Copy link
Collaborator

defstat commented Dec 21, 2022

@NateWr @asmecher

The core problem seems to be here. The reason is that both submissions and review_assignments tables share common table column names, and the select clause does not distinguish the different columns by aliases, causing the resulting submission to end up with an incorrect stage_id value.

Taking @asmecher's proposal, I refactored the code in order to remove the ReviewerSubmission and ReviewerSubmissionDAO classes all together, passing only the ReviewAssignment in question and getting the corresponding Submission object from the Repo::submission() by using the reviewAssignment->getSubmissionId()

Also had to make some changes to the ReviewAssignment and ReviewAssignmentDAO classes to consider the step column/parameter of the ReviewAssignment object which was not taken into account.

I have added the current PRs to the initial issue comment

defstat added a commit to defstat/ojs that referenced this issue Dec 22, 2022
defstat added a commit to defstat/ojs that referenced this issue Dec 22, 2022
defstat added a commit to defstat/omp that referenced this issue Dec 22, 2022
@defstat
Copy link
Collaborator

defstat commented Dec 22, 2022

@NateWr @asmecher

I have added PRs for stable-3_3_0 also, but I tried to follow a solution with as less changes as possible/needed to fix the problem. (the solution given for the main branch is more intrusive).

If we need the same solution for stable branch, though, I can port the main branch's solution to stable-3_3_0.

@NateWr
Copy link
Member Author

NateWr commented Jan 19, 2023

Looks great, @defstat. I've left a few comments but the fix worked well in stable-3_3_0 and main. And I'm so happy to finally get rid of ReviewSubmission. That's a big improvement! 🎉

The stable tests failed sporadically. I've restarted those, but if you see them fail again there may be a problem to sort out. Otherwise, let me know when you've addressed the comments and I'll do a final review for merge. 👍

defstat added a commit to defstat/pkp-lib that referenced this issue Jan 23, 2023
defstat added a commit to defstat/pkp-lib that referenced this issue Jan 23, 2023
defstat added a commit to defstat/ojs that referenced this issue Jan 23, 2023
defstat added a commit to defstat/pkp-lib that referenced this issue Jan 23, 2023
defstat added a commit to defstat/ojs that referenced this issue Jan 23, 2023
defstat added a commit to defstat/omp that referenced this issue Jan 23, 2023
defstat added a commit to defstat/pkp-lib that referenced this issue Jan 23, 2023
defstat added a commit to defstat/ojs that referenced this issue Jan 23, 2023
@defstat
Copy link
Collaborator

defstat commented Jan 23, 2023

@NateWr all review comments are resolved. I have rebased and force-pushed all PRs found here.

Waiting for the tests to pass.

defstat added a commit to defstat/ojs that referenced this issue Jan 24, 2023
@defstat
Copy link
Collaborator

defstat commented Jan 24, 2023

@NateWr I added this comment.

The tests are passing for both OJS and OMP

defstat added a commit to defstat/omp that referenced this issue Jan 24, 2023
NateWr added a commit that referenced this issue Jan 24, 2023
[PKP-LIB][stable-3_3_0] #7337 Fix duplicate stage_id parameter of ReviewerSubmission object
NateWr added a commit that referenced this issue Jan 24, 2023
[PKP-LIB][main] #7337 Remove ReviewerSubmission/ReviewerSubmissionDAO
NateWr pushed a commit to pkp/ojs that referenced this issue Jan 24, 2023
@NateWr
Copy link
Member Author

NateWr commented Jan 24, 2023

All merged to main or stable-3_3_0. The commits for OJS/OMP were cherry-picked to main due to a merge conflict with the submodule commit. Thanks @defstat!

@NateWr NateWr closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Projects
Status: Done
Development

No branches or pull requests

4 participants