Skip to content

Allow creating a new version after previous submission is archived#2382

Merged
bemoody merged 1 commit intodevfrom
bm/new-version-after-archive
Apr 10, 2025
Merged

Allow creating a new version after previous submission is archived#2382
bemoody merged 1 commit intodevfrom
bm/new-version-after-archive

Conversation

@bemoody
Copy link
Collaborator

@bemoody bemoody commented Apr 10, 2025

If you are the submitting author of a published project:

  • Go to your Project Home.
  • Click "New Version" and create a new version.
  • Go to the overview page for the new version.
  • Click "Delete Project" and confirm.
  • Return to your Project Home.
  • You are now incapable of creating another new version.

Likewise, if you create a new version and submit it, and it is rejected, you will be incapable of creating another new version.

This was an unintended consequence of adding ARCHIVED as a submission status and removing ArchivedProjects (see pull #2149 and #2170).

Authors are not allowed to create two active versions of the same core
project at a time; if a project has an active version, the "New
Version" button should not be shown, and new_project_version should
reject the request.

Whether an author is allowed to create a new version is determined by
PublishedProject.can_publish_new, which invokes
CoreProject.active_new_version to determine whether there's an
existing ActiveProject.

Originally, when an active project was "deleted" or rejected, the
ActiveProject object was deleted and an ArchivedProject object created
to replace it.  So afterwards, the author could go back and create a
new active version from scratch.

However, archived projects are now a subcategory of ActiveProjects.
Since they should not be counted as "being worked on", a
deleted/rejected submission should not prevent the author from
creating a new submission.
@tompollard
Copy link
Member

Looks good to me, thanks for fixing this.

@bemoody bemoody added this pull request to the merge queue Apr 10, 2025
Merged via the queue into dev with commit 2b77360 Apr 10, 2025
8 checks passed
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