Skip to content

[ENG-7929] Ability to move registrations to draft state #11153

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

Conversation

ihorsokhanexoft
Copy link
Contributor

@ihorsokhanexoft ihorsokhanexoft commented May 26, 2025

Purpose

Admins should be able to revert registration to draft state for the support purposes

Changes

Added functionality to revert registration back to draft state
Added a button in admin to revert a registration
Added tests

Notes:

Currently we are discussing with Mark what to do with a registration after admin reverts it, so this ticket cannot be merged. The issue is that when admin reverts registration, it's still displayed for admin, just with deletion date and when user re-registers a draft, the system creates a new registration and the draft is linked to this newest version and admin sees both registrations. So if admin tries to revert the previous version, he'll get an error because the version doesn't have the linked draft. What I've suggested:

  1. Fully delete previous registered version so that you won't be able to see it in admin. In this way if the registered version had guid 123ab and user registered the restored draft again, the draft would have another registration with another guid, like 999ss . Basically for user it'll be the same registration, just with another url to access it
  2. Add another (or the same) hint for Revert to Draft button that you can't revert this previous version (the easiest solution)
  3. One more solution, that I think will be the most complicated between these three, is that we can try to save the guid of an original registered version and whenever admin reverts registration and user registers it again from the same draft, we assign the saved guid to a new registration

DECISION:
Option 2 is the most reliable. In case we want #1 or #3 behavior, a new ticket will be created

Ticket

https://openscience.atlassian.net/browse/ENG-7929?atlOrigin=eyJpIjoiOWQzNzU3NjIwMmFlNDAzNWEzZjFlZjNkNGZjZmQ3NjUiLCJwIjoiaiJ9

@brianjgeiger
Copy link
Collaborator

Overall looks good, but I'll hold approval until the issue from Notes is resolved.

@brianjgeiger brianjgeiger changed the base branch from feature/pbs-25-10 to feature/pbs-25-13 June 30, 2025 17:20
@brianjgeiger
Copy link
Collaborator

@ihorsokhanexoft There's a merge conflict that needs to be resolved.

@brianjgeiger brianjgeiger merged commit 6062cef into CenterForOpenScience:feature/pbs-25-13 Jul 1, 2025
6 checks passed
Johnetordoff added a commit to Johnetordoff/osf.io that referenced this pull request Jul 16, 2025
…cience/osf.io into add-brand-to-collection-provider

* 'feature/pbs-25-13' of https://github.com/CenterForOpenScience/osf.io: (25 commits)
  [ENG-8224] Fixed force archive template with registration addons (CenterForOpenScience#11210)
  API: Allow /v2/users/me/preprints list view to filter by title
  [ENG-8325] Public column does not display the visibility status of child nodes on the Nodes page in the Admin App
  [ENG-8246] Fixed deletion of maintenance alerts in admin (CenterForOpenScience#11226)
  add exception handling to /review_actions/ endpoint
  added a route to download node metadata (CenterForOpenScience#11215)
  [ENG-7929] Ability to move registrations to draft state (CenterForOpenScience#11153)
  switch to new UI when user views draft registration file (CenterForOpenScience#11144)
  [ENG-5862] SPAM - Fix Wiki Spamming (CenterForOpenScience#11171)
  improved displaying of stashed urls and approval state in admin (CenterForOpenScience#11193)
  [ENG-7962] Fix User Setting Response Payload async mailchimp perference change issues (CenterForOpenScience#11136)
  fixed children/parent fields in admin templates (CenterForOpenScience#11156)
  don't add multiple group perms for preprint provider (CenterForOpenScience#11159)
  fix content overflow for node page (CenterForOpenScience#11182)
  [ENG-8096] Admins on projects are unable to reject user access requests (CenterForOpenScience#11163)
  added retry to avoid race condition (CenterForOpenScience#11179)
  upgrade django to 4.2.17 (CenterForOpenScience#11173)
  add additional information to user admin (CenterForOpenScience#11184)
  [ENG-8192] Ability to force archive registrations when OSFS Folders have changed (CenterForOpenScience#11194)
  [ENG-8193] Fix issues with Preprint submission via API (CenterForOpenScience#11185)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants