Skip to content

Adding UI element to show previous submissions for the same git url#1542

Merged
arfon merged 2 commits into
mainfrom
show-resubmissions-on-admin
May 3, 2026
Merged

Adding UI element to show previous submissions for the same git url#1542
arfon merged 2 commits into
mainfrom
show-resubmissions-on-admin

Conversation

@arfon

@arfon arfon commented May 3, 2026

Copy link
Copy Markdown
Member

This pull request introduces a feature to detect and display possible resubmissions of papers based on their repository URLs. It adds logic to identify prior submissions with matching repository addresses (accounting for common URL variants), surfaces this information in the admin UI, and optimizes the database for efficient lookup. Comprehensive tests are included to ensure correct behavior.

Key changes:

Resubmission detection logic:

  • Added prior_submissions instance method and supporting class methods to the Paper model, allowing lookup of other papers with the same (or variant) repository URL, excluding the current paper. This includes normalization to handle differences in case, trailing slashes, and .git suffixes.

Admin UI enhancements:

  • Introduced a new partial, _resubmission_check.html.erb, which displays a warning card in the admin view if prior submissions with the same repository URL exist, including links and submission details.
  • Updated the admin.html.erb template to render the resubmission check partial.

Database performance improvements:

  • Added a concurrent index on lower(repository_url) in the papers table to speed up case-insensitive lookups for repository URLs. Includes migration and schema updates.

Testing:

  • Added model specs to verify the correct identification of prior submissions, including handling of URL variants, exclusion of the current paper, and behavior with blank URLs.

@arfon arfon temporarily deployed to joss-production May 3, 2026 17:12 Inactive
@arfon arfon temporarily deployed to joss-production May 3, 2026 17:22 Inactive
@arfon

arfon commented May 3, 2026

Copy link
Copy Markdown
Member Author
Screenshot 2026-05-03 at 18 24 18

/ cc @danielskatz

@arfon arfon merged commit 5c61e22 into main May 3, 2026
2 checks passed
@arfon arfon deleted the show-resubmissions-on-admin branch May 3, 2026 17:25
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.

1 participant