Repository navigation
Send expert review redirects to the expedition instead of a Not Found page - #563
Merged
Merged
Conversation
… page
Three redirects in ExpertReconcileController passed the project ID and the expedition ID to admin.expeditions.show, which only takes the expedition, so they landed on /admin/expeditions/{project_id}?{expedition_id}. They now pass the expedition.
20 tasks done
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.
When the expert review page can't be shown,
ExpertReconcileControllerredirects back to the expedition, but three of its redirects passed[$expedition->project_id, $expedition->id]toadmin.expeditions.show. That route only takes the expedition (expeditions/{expedition}), so the redirect went to/admin/expeditions/{project_id}?{expedition_id}, a "Not Found" page, and the message was lost.Affected:
index, no reconcile data: "Reconcile data for processing is missing."indexandcreate, the user isn't in the project's group: "You do not have sufficient permissions."All three now pass
[$expedition], like the other redirects in the controller.Found on development:
/admin/reconciles/408a0fd9-…(expedition 491, marked for expert review but with no reconcile records there) redirected to/admin/expeditions/142?491.Tests
tests/Feature/Admin/ExpertReconcileRedirectTest.php(new): a group member with no reconcile data, and a user outside the group onindexandcreate, are sent to the expedition with the right flash message (read from theapp_flashcookie, whereFlashHelperMessageputs it on GET requests). All three failed before the fix with the/admin/expeditions/1?1redirect.To verify on development
Open
/admin/reconciles/408a0fd9-0fd4-4fde-8f82-f69f0d0ae33e: it should land on that expedition with "Reconcile data for processing is missing." An expedition with reconcile data, such as "WeDigFLPlants' Mints of Florida—More than Mojitos" (tools → Expert Review Ambiguities), still opens the expert review.