Adding UI element to show previous submissions for the same git url#1542
Merged
Conversation
Member
Author
/ cc @danielskatz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
prior_submissionsinstance method and supporting class methods to thePapermodel, 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.gitsuffixes.Admin UI enhancements:
_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.admin.html.erbtemplate to render the resubmission check partial.Database performance improvements:
lower(repository_url)in thepaperstable to speed up case-insensitive lookups for repository URLs. Includes migration and schema updates.Testing: