fix: keep form open and add retry option when import returns no entries#393
Open
Oyelakin-Mercy wants to merge 2 commits intohatnote:masterfrom
Open
fix: keep form open and add retry option when import returns no entries#393Oyelakin-Mercy wants to merge 2 commits intohatnote:masterfrom
Oyelakin-Mercy wants to merge 2 commits intohatnote:masterfrom
Conversation
# Conflicts: # frontend/src/components/Round/RoundNew.vue
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 PR fixes the UX issue where the selected category entries are all disqualified, and the round gets created with no entries. This leaves an empty round behind with no way to recover from the same form. For example, I tried creating a yes/no round with this category, "Images from Wiki Loves Monuments in Belgium", which only has subcategories and no images.
This also fixes #208
Problem:
Changes:
frontend/src/components/Round/RoundNew.vue:createdRoundIdref to track an already-created round. On retry, the existing round is reused instead of creating a duplicate empty roundcancelRound()is called automatically to delete the already created empty round before closing the form.frontend/src/i18n/en.json:montage-round-retry-importtranslation key for the "Retry Import" button label shown after a failed importmontage/admin_endpoints.py:'No entries were imported. Please fix your import source and try again, or click "Cancel" to delete the empty round.'To test: