Summary: | Fix the redirect after deleting a tag from an authority framework to load the right page | ||
---|---|---|---|
Product: | Koha | Reporter: | Phil Ringnalda <phil> |
Component: | System Administration | Assignee: | Phil Ringnalda <phil> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | david, fridolin.somers, gmcharlt, lucas, samalau, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37161 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37152 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37162 |
||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the redirect after deleting a tag from an authority framework. After confirming the deletion of a tag, you are now returned to where you were in the list of tags for the authority type, instead of tag 000 (this now matches the behavour when deleting tags for a MARC framework - see bug 37161).
|
Version(s) released in: |
24.11.00,24.05.02,23.11.07
|
Circulation function: | |||
Bug Depends on: | 918 | ||
Bug Blocks: | |||
Attachments: |
Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page
Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page |
Description
Phil Ringnalda
2024-06-22 00:43:13 UTC
Created attachment 167999 [details] [review] Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page When you delete a tag from an authority framework, we intend to redirect you right back to where you were, on the same page of tags, but because we pick the wrong variable to set searchfield in the URL, we send you to the first page instead. Test plan: 1. Without the patch, Administration - Authority types - in the row for CHRON_TERM Actions menu, MARC Structure 2. In the Search for tag: input, type 092 and hit Enter 3. In the row for 092, Actions menu, Delete, in the page that loads click Yes, delete 4. In the page you are redirected to, note that you are at Tag 000, and the URL is ?searchfield=&authtypecode=CHRON_TERM 5. Apply patch, restart_all 6. Type 092 and hit Enter, Actions menu for the 093 row, Delete, Yes, delete 7. Note that now you have gone to the page where 093 used to be, because the URL is ?searchfield=092&authtypecode=CHRON_TERM and you can just keep deleting 09x tags one after another Well, the URL is ?searchfield=093, not 092, since searchfield is intentionally the one you deleted, not what was in the search field at the time. That was just a typo. Phil, Without this patch applied I am unable to recreate the problem described in your test plan. Interesting. That means you have $input->param('tagfield') defined as 092 when you submit a form with four params: csrf_token, op, authtypecode, and searchfield. How? I am recreating this problem and applying the patch fixes the issue as described. Created attachment 168031 [details] [review] Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page When you delete a tag from an authority framework, we intend to redirect you right back to where you were, on the same page of tags, but because we pick the wrong variable to set searchfield in the URL, we send you to the first page instead. Test plan: 1. Without the patch, Administration - Authority types - in the row for CHRON_TERM Actions menu, MARC Structure 2. In the Search for tag: input, type 092 and hit Enter 3. In the row for 092, Actions menu, Delete, in the page that loads click Yes, delete 4. In the page you are redirected to, note that you are at Tag 000, and the URL is ?searchfield=&authtypecode=CHRON_TERM 5. Apply patch, restart_all 6. Type 092 and hit Enter, Actions menu for the 093 row, Delete, Yes, delete 7. Note that now you have gone to the page where 093 used to be, because the URL is ?searchfield=092&authtypecode=CHRON_TERM and you can just keep deleting 09x tags one after another Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 168110 [details] [review] Bug 37163: Fix the redirect after deleting a tag from an authority framework to load the right page When you delete a tag from an authority framework, we intend to redirect you right back to where you were, on the same page of tags, but because we pick the wrong variable to set searchfield in the URL, we send you to the first page instead. Test plan: 1. Without the patch, Administration - Authority types - in the row for CHRON_TERM Actions menu, MARC Structure 2. In the Search for tag: input, type 092 and hit Enter 3. In the row for 092, Actions menu, Delete, in the page that loads click Yes, delete 4. In the page you are redirected to, note that you are at Tag 000, and the URL is ?searchfield=&authtypecode=CHRON_TERM 5. Apply patch, restart_all 6. Type 092 and hit Enter, Actions menu for the 093 row, Delete, Yes, delete 7. Note that now you have gone to the page where 093 used to be, because the URL is ?searchfield=092&authtypecode=CHRON_TERM and you can just keep deleting 09x tags one after another Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.02 Pushed to 23.11.x for 23.11.07 Not backporting to 23.05 unless requested |