-
Notifications
You must be signed in to change notification settings - Fork 348
[ENG-8832] Most recent numbered version of a preprint fails to show for unversioned URL #11315
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
base: feature/pbs-25-19
Are you sure you want to change the base?
[ENG-8832] Most recent numbered version of a preprint fails to show for unversioned URL #11315
Conversation
…f last version number
15dbae7
to
9e9beb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions/thoughts:
-
The side effect of this change is the no version URL will lead to page not found if a pending pre-moderation preprints exists
-
Does the migration handle the case where a new version is "created but not submitted"? This orphaned preprint has the highest number but should not be considered as the latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The update looks good but rejected version occurred to me when I looked at the unit test. Probably need to follow up with product on what's the behavior they want.
if version.referent.machine_state == ReviewStates.INITIAL.value: | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if we should add this to skipped count or let it have its own count?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not skip this, and keeping separate count is impossible as this count is liked to each preprint.
Here we just iterate through preprint versions and search fro most recent submitted version
assert guid_obj.object_id == new_version.pk | ||
assert guid_obj.referent == new_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is another case that I forgot to ask during my first review. And this is probably a product question too.
- Can you verify that rejected preprints will keep the version number? (Rejection only happens for pre-mod).
- Does product really want the behavior that non-version guid leads to rejected preprints? Or should we change the version to point back to an earlier "latest version" upon rejection?
Purpose
Change guid resolve strategy to match expectations of osf users
Changes
QA Notes
Please make verification statements inspired by your code and what your code touches.
What are the areas of risk?
Any concerns/considerations/questions that development raised?
Documentation
Side Effects
Ticket