Multiple overdue conditions lead to errors in the "overdue" submission list filter #10662
Labels
Bug:1:Low
A bug that does not have a severe consequence or affects a small number of users.
Milestone
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:
(The following is for Vue dev mode; build mode will contain less detail.)
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 theisOverdue
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 forhttps://.../index.php/publicknowledge/api/v1/_submissions?status=1&isOverdue=true&searchPhrase=&count=30&offset=0&_=1733514773948
, where the first two items are duplicates:The text was updated successfully, but these errors were encountered: