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

Adding a new article to a published issue does not specifically set sequence #8998

Open
jnugent opened this issue May 15, 2023 · 8 comments
Open
Assignees
Labels
Hosting Bug reports and feature requests from Publishing Services's hosted clients.
Milestone

Comments

@jnugent
Copy link
Member

jnugent commented May 15, 2023

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:

  1. Create several submissions
  2. Add these submissions to an issue without sorting the table of contents
  3. publish the issue, and reload the TOC.
  4. Specifically sort the issue, the TOC is now locked.
  5. Add several more articles to the issue without sorting them.
  6. 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

@asmecher asmecher added this to the 3.3.0-x milestone May 18, 2023
@pmangahis pmangahis added the Hosting Bug reports and feature requests from Publishing Services's hosted clients. label Oct 19, 2023
@ewhanson
Copy link
Collaborator

@jnugent, is this issue still present when you stop after step 3 above, i.e. when you keep the unsorted table of contents but do not add any more items?

@jnugent
Copy link
Member Author

jnugent commented Feb 22, 2024

@ewhanson Yes, it is. I just tested in a 3.3.0.16 install and if I add two articles to an issue and schedule for publication, they both go in with seq of 0 in the publications table. If I then publish this issue, I end up with a TOC that has two articles that flip back and forth on each reload (or nearly every reload).

The database records look like:

Screenshot from 2024-02-22 15-15-37

and the two TOCs look like:

Screenshot from 2024-02-22 15-16-32

or
Screenshot from 2024-02-22 15-16-44

@ewhanson
Copy link
Collaborator

@jnugent, thanks for the details. This came up with some of the Coalition Publica work as well so I'm going to dive into it. I haven't done any testing yet, but do you know if this is also a problem in 3.4 and later? (I'm assuming if it wasn't fixed in 3.3, it's still present, but want to know what I'm getting myself into).

@ewhanson ewhanson self-assigned this Feb 22, 2024
@jnugent
Copy link
Member Author

jnugent commented Feb 22, 2024

Hi @ewhanson I just tested this in our 3.4 testdrive. If I schedule a submission for publication in an empty issue, it gets a seq of 0. If add a second article to that same issue, it gets a seq of 1. So this might not be a problem in 3.4. I think @jonasraoni may have worked on this.

@aupress
Copy link

aupress commented May 6, 2024

Hi @jnugent and @jonasraoni. Is there any update on the status of this bug fix? Will it be released with 3.4 update? Any information is greatly appreciated. Thank you.

Sergiy

PS I see OJS 3.4 was released on June 9, 2023 and OJS 3.4.05 on February 23, 2024. But I cannot tell from release notes if this bug was addressed. Thanks.

@ewhanson
Copy link
Collaborator

@aupress I'm currently investigating the status of this. Will provide an update here once a fix has been made.

@jnugent, I'm testing it locally on stable-3_4_0 and still seeing all publications assigned to a seq of 0. Do you know at which point in the publication process the second article was getting a seq of 1?

@jnugent
Copy link
Member Author

jnugent commented May 24, 2024

@ewhanson you're right, it's not incrementing. I am not sure what I was looking at before.

  1. The record in the publications table is created when the submission is created. At that time the seq is 0.
  2. When you assign a submission to an issue, the issueId setting_name record in publication_settings is created, but the seq in the publications table is not updated.

Upon specifically ordering articles in the Issue table of contents, the seq values get set correctly.

@ewhanson
Copy link
Collaborator

Thanks @jnugent, that's helpful (and glad I'm not going crazy). I'm working on a fix to set the seq when it's assigned to an issue and will see how that behaves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hosting Bug reports and feature requests from Publishing Services's hosted clients.
Projects
None yet
Development

No branches or pull requests

5 participants