Bug 33624 - Using Browser "Back" button in Batch Record Modification causes biblio options to be displayed
Summary: Using Browser "Back" button in Batch Record Modification causes biblio option...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 32914
Blocks:
  Show dependency treegraph
 
Reported: 2023-04-27 07:37 UTC by Philip Orr
Modified: 2023-12-28 20:47 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.07
Circulation function:


Attachments
Bug 33624: Hide the "list" tab if authority is selected (2.73 KB, patch)
2023-05-11 12:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33624: Hide the "list" tab if authority is selected (2.78 KB, patch)
2023-05-16 21:27 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 33624: Hide the "list" tab if authority is selected (2.88 KB, patch)
2023-05-17 12:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Orr 2023-04-27 07:37:35 UTC
First seen in Bug #32914.

If you enter Koha's Batch record modification tool, select Authority records, select a template and then hit continue without actually uploading a file or entering record numbers, the error message "No records were modified." will be displayed. All correct so far. 

If you then don't click on "New batch record modification" and instead use the back button in Firefox to go back one page, you will land in batch record modification with the option "Authority records" selected but with the tab "Select a list of records" (meant for lists of Biblios) now again displayed and usable.

Since biblio records and authorities records could have similar biblionumbers, this could lead to a situation where you're accidentally modifying the wrong records.

To recreate:
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected,
but you should now see the tab "Select a list of records".
Comment 1 Jonathan Druart 2023-05-11 10:46:18 UTC
I am not sure I understand. "Select a list of records" exists for both biblios and authorities.
Comment 2 Philip Orr 2023-05-11 11:50:22 UTC
Oops, sorry - forgot to mention that you need to have applied the patch for bug 32914 first.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32914

New steps to recreate:
- Apply the patch for bug 32914
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected,
but you should now see the tab "Select a list of records".
Comment 3 Jonathan Druart 2023-05-11 12:37:27 UTC
(In reply to Philip Orr from comment #2)
> Oops, sorry - forgot to mention that you need to have applied the patch for
> bug 32914 first.
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32914
> 
> New steps to recreate:
> - Apply the patch for bug 32914
> - Make sure you have at least one template for MARC Modification
> - Also make sure you have at least one list of biblio records
> - navigate to Cataloging -> Batch record modification
> - Check the "Authorities" radio button
> - Select your template and continue
> - No records were modified -> use your browser's Back button to go back one
> page
> - The "Authorities" radio button should still be selected,
> but you should now see the tab "Select a list of records".

Ho right, the list tab, I meant "Enter a list of record numbers" in my previous comment. I didn't notice the list one as I didn't have one created.

I do recreate the problem on master.
Comment 4 Jonathan Druart 2023-05-11 12:39:41 UTC
Created attachment 151072 [details] [review]
Bug 33624: Hide the "list" tab if authority is selected

The "Select a list of records" should only be available for biblio
records. But if the page is accessed using the back button of the
browser it will be displayed for authorities as well.

Test plan:
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected
=> Without this patch you see the tab "Select a list of records"
=> With this patch applied it's hidden when the page is loaded
Comment 5 Jonathan Druart 2023-05-11 12:40:02 UTC
Bug is in master, without bug 32914. But it's PQA so I built the fix on top of it.
Comment 6 Phil Ringnalda 2023-05-16 21:27:06 UTC
Created attachment 151327 [details] [review]
Bug 33624: Hide the "list" tab if authority is selected

The "Select a list of records" should only be available for biblio
records. But if the page is accessed using the back button of the
browser it will be displayed for authorities as well.

Test plan:
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected
=> Without this patch you see the tab "Select a list of records"
=> With this patch applied it's hidden when the page is loaded

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 7 Marcel de Rooy 2023-05-17 11:35:08 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2023-05-17 12:40:09 UTC
Created attachment 151335 [details] [review]
Bug 33624: Hide the "list" tab if authority is selected

The "Select a list of records" should only be available for biblio
records. But if the page is accessed using the back button of the
browser it will be displayed for authorities as well.

Test plan:
- Make sure you have at least one template for MARC Modification
- Also make sure you have at least one list of biblio records
- navigate to Cataloging -> Batch record modification
- Check the "Authorities" radio button
- Select your template and continue
- No records were modified -> use your browser's Back button to go back one page
- The "Authorities" radio button should still be selected
=> Without this patch you see the tab "Select a list of records"
=> With this patch applied it's hidden when the page is loaded

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-05-17 13:29:21 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 10 Matt Blenkinsop 2023-06-08 16:35:19 UTC
Nice work everyone!

Pushed to stable for 22.11.x