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

Multiple overdue conditions lead to errors in the "overdue" submission list filter #10662

Closed
asmecher opened this issue Dec 6, 2024 · 2 comments
Assignees
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users.
Milestone

Comments

@asmecher
Copy link
Member

asmecher commented Dec 6, 2024

Describe the bug
When multiple overdue conditions exist for a submission, the "overdue" submission filter causes a JS error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a submission with multiple overdue conditions: two overdue review assignments, for example
  2. Go to the "Active" submission list as editor. (This should contain the submission in question).
  3. Open "Filters"
  4. Click "Overdue"
  5. There should be a JS error: the spinner never stops, and a message appears on the console...

(The following is for Vue dev mode; build mode will contain less detail.)
Image

What application are you using?
OJS, OMP or OPS version 3.4.0-x

Additional information
The problem appears to be caused by the SQL construction in lib/pkp/classes/submission/Collector.php around the isOverdue section:

https://github.com/pkp/pkp-lib/blob/c8da1536280ec45a69773117ef2a49ec01b939b5/classes/submission/Collector.php#L381..L406

The conditions use conventional joins rather than e.g. a whereIn subclause, meaning that several matching overdue conditions on the same submission will result in multiple duplicate rows. This can be verified by looking at the API response for https://.../index.php/publicknowledge/api/v1/_submissions?status=1&isOverdue=true&searchPhrase=&count=30&offset=0&_=1733514773948, where the first two items are duplicates:
Image

@asmecher asmecher added the Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. label Dec 6, 2024
@asmecher asmecher added this to the 3.4.0-9 milestone Dec 6, 2024
@taslangraham taslangraham self-assigned this Jan 14, 2025
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Jan 15, 2025
taslangraham added a commit to taslangraham/pkp-lib that referenced this issue Jan 15, 2025
@taslangraham
Copy link
Contributor

Ready for review @asmecher

pkp-lib (3.4) - https://github.com/pkp/pkp-lib/pull/10808/files
pkp-lib (main) - https://github.com/pkp/pkp-lib/pull/10809/files

submodule updates
ops (3.4) - pkp/ops#844
ojs (3.4) - pkp/ojs#4603
omp (3.4) - pkp/omp#1808

asmecher pushed a commit that referenced this issue Jan 15, 2025
@asmecher
Copy link
Member Author

Thanks, @taslangraham, I've merged all PRs (except for main branch submodule updates, which we'll get to separately).

@Tribunal33, could you test the current stable-3_4_0 head for the problem described at the top of this issue? It should be resolved now.

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
None yet
Development

No branches or pull requests

3 participants