Description
Describe the bug
When a submission is first created, the publication record associated with it gets a seq
value of 0, which makes sense since it isn't in an issue yet. When the submission is ultimately assigned to an issue and the issue is published, these 0 seq
values are not re-sequenced into incrementing integers. This results in the articles within a section randomly ordering the articles and this order will change from page load to page load. The only way around this is to specify a sort order within the issue's table of contents. That's probably fine. However, when new articles are added to an issue with an already set sort order, the 0 seq
values cause these articles to appear at the top of the section, and they will flip randomly around each time the page is loaded.
The Quick Submit plugin will increment the seq
value on submissions as it builds an issue so perhaps there is some code here that can be reused. At the least, maybe the query builder for fetching submissions can also sort according to submission_id
so at least there is a unique value in case the sequence values are the same.
Our clients who use this workaround for continuous publication have also asked us to examine sorting by the date_published
field within the publication object, but since this field does not contain minutes and seconds it results in the same behaviour when more than one article is published on the same day.
To Reproduce
Steps to reproduce the behavior:
- Create several submissions
- Add these submissions to an issue without sorting the table of contents
- publish the issue, and reload the TOC.
- Specifically sort the issue, the TOC is now locked.
- Add several more articles to the issue without sorting them.
- Load the TOC, they should flip around.
What application are you using?
OJS 3.3.0.14
Additional information
Issue TOC ordering and sorting is related to this other issue: #8564