[Bug 27363] New: Restore temporary selection of Z39.50 targets throughout multiple searches
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Bug ID: 27363 Summary: Restore temporary selection of Z39.50 targets throughout multiple searches Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: barbara.johnson@bedfordtx.gov QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Prior to 20.05.06, when using Z39.50 in the Advanced Cataloging Editor, servers that were selected each time a new Z39.50 search was done would be retained throughout multiple searches. This is no longer the case. It would be helpful if that behavior was restored. We have preselected servers which persist for all searches. As we catalog we add some additional servers that would be retained for a short period of time until we decided we no longer needed them. For instance, we may be cataloging Spanish and we could check a server that could be used for several bibs but it wasn't a server that we wanted to be a preselected server. Now that a newly checked server is not retained in the short term we have to check it again for every search which is much less efficient. We could go into Admin and make it a preselected search for the short duration we plan to use it and then go back into Admin to uncheck it when done but that is also not efficient. It would be so much more efficient to be able to check a new server, have it retained, and then uncheck it when done. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Keywords| |regression --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Barbara, as you said this worked before I have updated this to be a bug in stead of an enhancement. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- "Prior to 20.05.06" => Was it working on 20.05.05? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #3 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- Yes, it worked on 20.05.05. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17515 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- May be caused by commit 17571f824d391989247465c7ae18c92c744464c2 Bug 17515: Order Z3950 server by rank and preserve ordering Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17515 [Bug 17515] Advanced Editor - Rancor - Z39 sources not sorted properly -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 115437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115437&action=edit Bug 27363: (bug 17515 follow-up) Restore temporary selection of Z39.50 targets throughout multiple searches Not sure it will fix the problem (not sure I recreated the problem correctly). So this patch is just a guess, it seems that commit 17571f824d391989247465c7ae18c92c744464c2 Bug 17515: Order Z3950 server by rank and preserve ordering forgot to update two occurrences of server.name with server.servername -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Version|20.05 |master -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Hi Barbara, I am not sure I can recreate the problem, can you provide step by step instructions or screenshots to highlight the issue? Thanks, Nick -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #115437|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The patch I attached is wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #8 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- To reproduce the problem: 1. Go to the Advanced Cataloging Editor (addbooks.pl) 2. Search for a bib record 3. Select and open a bib record from your own library collection 4. Copy the ISBN or enter title, author, keyword, etc. in the Search box on the left side of the screen to perform a Z39.50 search (bib.png) 5. View the Z39.50 results – notice a few servers at the top of the list are checked because they are defined as preselected servers (preselected.png) 6. None of the results from the preselected servers have the desired MARC record. 7. Select a new server from the list (such as Dallas) (new_server.png) 8. Select any of the records and click on the Substitute button to import it into Koha. 9. Edit the bib and save. 10. Edit/add the item record and save. 11. From additem.pl search for the next title to catalog by entering it in the search box at the top of the screen. 12. Repeat steps 3-5. 13. View the results of the Z39.50 search – notice that the server for Dallas is no longer checked – it does not get retained from search to search like it used to. (server_no_longer_checked.png) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #9 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- Created attachment 115439 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115439&action=edit MARC bib record from Advanced Cataloging Editor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #10 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- Created attachment 115440 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115440&action=edit Z39.50 results showing preselected servers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #11 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- Created attachment 115441 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115441&action=edit Z39.50 results showing new server checked -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #12 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- Created attachment 115442 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115442&action=edit New Z39.50 search showing added server did not get retained -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #13 from Barbara Johnson <barbara.johnson@bedfordtx.gov> --- Just checking in on the status of this bug. We're really missing the old behavior because it is negatively affecting our cataloging efficiency. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |nick@bywatersolutions.com |ommunity.org | --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, can you have a look at this one please? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 koha-US bug tracker <bugzilla@koha-us.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla@koha-us.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org --- Comment #15 from Phil Ringnalda <phil@chetcolibrary.org> --- So confusing. At least I finally almost understand what I hacked around by editing localstorage to delete the wrong values I had after the change :) When you check or uncheck a server in the advanced search, https://git.koha-community.org/Koha-community/Koha/src/commit/0363d08a850f2d... saves "false" or "true" to localstorage for the closest data-server-id. https://git.koha-community.org/Koha-community/Koha/src/commit/e3c138c0295185... creates data-server-id with the index, not with the server_id that it used before bug 17515 landed. https://git.koha-community.org/Koha-community/Koha/src/commit/0363d08a850f2d... reads the values as though the key was still server_id, not index. Steps to reproduce: 1. Set EnableAdvancedCatalogingEditor to enable 2. Z39.50 servers, for LIBRARY OF CONGRESS uncheck preselected, and set rank to 2, and for NATIONAL LIBRARY OF FRANCE uncheck preselected, and set rank to 1 3. Open Firefox's Web Developer Tools, and in the Storage tab open Local Storage and select your URL 4. In the row for cateditor_preferences_{your user id}, if there are any values for selected_search_targets, delete them so you have "selected_search_targets":{} 5. Open the advanced editor, reopen Local Storage, then click Advanced » in the search box 6. Nothing is selected because you have no preselected servers. Click the box for Library of Congress, and close the advanced search popup, you now have "2": true in Local Storage 7. Open a new browser tab, open the advanced editor in it, and click Advanced » and note that you have nothing selected, because reading your "2": true as a server_id, server_id 2 is an authority server, so it's not there to select 8. Check and then uncheck the box for Library of Congress, and check the box for National Library of France. Local Storage now has "1":true,"2":false 9. Open a new browser tab, open the advanced editor in it, and click Advanced » and note that instead of having National Library of France selected, you have Library of Congress selected, because Library of Congress is index 2 but server_id 1. The trivial patch to read them as index instead of server_id works, but I'm not sure it's the right fix, since while testing it I would then swap my server rank around to have Library of Congress as 1 and National Library of France as 2, and as a result have the wrong one selected until I changed both checkboxes. Or without ranks, I would change the names so they sorted alphabetically the other way, and again have the wrong one selected. Is it worth the extra effort to maintain a map from index to server_id, so we can read and write server_id and map that to index? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|nick@bywatersolutions.com |phil@chetcolibrary.org Status|In Discussion |ASSIGNED --- Comment #16 from Phil Ringnalda <phil@chetcolibrary.org> --- Yes, I wish I hadn't said "maintain a map from index to server_id" when obviously the array z3950Servers is a map from its own index to the server_id that's a property of each of its elements. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #17 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 166092 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166092&action=edit Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches The advanced editor currently saves which Z39.50 servers are selected in local storage using the index in the sorted array of servers, and then misreads them back as though they were server_ids. We want them to be server_ids, since that's immutable and the index can change with changes in rank or server name. We use the data-server-id property in the HTML more often as a server_id than as the index that's currently stored there, so this patches switches it back to be the server_id, and in the one place we would use the index, instead uses Array.find to just get the server object instead of referencing it by index. Test plan: 1. Set the preference EnableAdvancedCatalogingEditor to enable 2. Administration - Z39.50 Servers, for NATIONAL LIBRARY OF FRANCE uncheck "Preselected" 3. To be sure you don't have confusing saved preferences, open Firefox's Developer Tools, in the Storage tab open Local Storage and select your URL 4. In the row for cateditor_preferences_{your Koha user id}, if there are any values for selected_search_targets, delete them so you have "selected_search_targets":{} 5. Open the advanced editor, and click "Advanced »" in the search box 6. You should have Local catalog unchecked, LIBRARY OF CONGRESS checked because it is preselected, and NATIONAL LIBRARY OF FRANCE unchecked 7. Toggle each checkbox so Local catalog and France are selected, and LoC is unselected. 8. In a new broser tab, open the advanced editor, and click "Advanced »" 9. You will see Local catalog unchecked, LoC checked, and France unchecked. That's the bug. 10. Apply patch, open the advanced editor in a new tab, click "Advanced »" 11. Toggle the checkboxes so Local catalog and France are selected, and LoC is not selected. 12. Open the advanced editor in another new tab, click "Advanced »" 13. You should see what you just set, Local catalog and France checked, and LoC unchecked, That's the correct behavior. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166092|0 |1 is obsolete| | --- Comment #18 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 166148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166148&action=edit Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches The advanced editor currently saves which Z39.50 servers are selected in local storage using the index in the sorted array of servers, and then misreads them back as though they were server_ids. We want them to be server_ids, since that's immutable and the index can change with changes in rank or server name. We use the data-server-id property in the HTML more often as a server_id than as the index that's currently stored there, so this patches switches it back to be the server_id, and in the one place we would use the index, instead uses Array.find to just get the server object instead of referencing it by index. Test plan: 1. Set the preference EnableAdvancedCatalogingEditor to enable 2. Administration - Z39.50 Servers, for NATIONAL LIBRARY OF FRANCE uncheck "Preselected" 3. To be sure you don't have confusing saved preferences, open Firefox's Developer Tools, in the Storage tab open Local Storage and select your URL 4. In the row for cateditor_preferences_{your Koha user id}, if there are any values for selected_search_targets, delete them so you have "selected_search_targets":{} 5. Open the advanced editor, and click "Advanced »" in the search box 6. You should have Local catalog unchecked, LIBRARY OF CONGRESS checked because it is preselected, and NATIONAL LIBRARY OF FRANCE unchecked 7. Toggle each checkbox so Local catalog and France are selected, and LoC is unselected. 8. In a new broser tab, open the advanced editor, and click "Advanced »" 9. You will see Local catalog unchecked, LoC checked, and France unchecked. That's the bug. 10. Apply patch, open the advanced editor in a new tab, click "Advanced »" 11. Toggle the checkboxes so Local catalog and France are selected, and LoC is not selected. 12. Open the advanced editor in another new tab, click "Advanced »" 13. You should see what you just set, Local catalog and France checked, and LoC unchecked, That's the correct behavior. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166148|0 |1 is obsolete| | --- Comment #19 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 166454 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166454&action=edit Bug 27363: Restore temporary selection of Z39.50 targets throughout multiple searches The advanced editor currently saves which Z39.50 servers are selected in local storage using the index in the sorted array of servers, and then misreads them back as though they were server_ids. We want them to be server_ids, since that's immutable and the index can change with changes in rank or server name. We use the data-server-id property in the HTML more often as a server_id than as the index that's currently stored there, so this patches switches it back to be the server_id, and in the one place we would use the index, instead uses Array.find to just get the server object instead of referencing it by index. Test plan: 1. Set the preference EnableAdvancedCatalogingEditor to enable 2. Administration - Z39.50 Servers, for NATIONAL LIBRARY OF FRANCE uncheck "Preselected" 3. To be sure you don't have confusing saved preferences, open Firefox's Developer Tools, in the Storage tab open Local Storage and select your URL 4. In the row for cateditor_preferences_{your Koha user id}, if there are any values for selected_search_targets, delete them so you have "selected_search_targets":{} 5. Open the advanced editor, and click "Advanced »" in the search box 6. You should have Local catalog unchecked, LIBRARY OF CONGRESS checked because it is preselected, and NATIONAL LIBRARY OF FRANCE unchecked 7. Toggle each checkbox so Local catalog and France are selected, and LoC is unselected. 8. In a new broser tab, open the advanced editor, and click "Advanced »" 9. You will see Local catalog unchecked, LoC checked, and France unchecked. That's the bug. 10. Apply patch, open the advanced editor in a new tab, click "Advanced »" 11. Toggle the checkboxes so Local catalog and France are selected, and LoC is not selected. 12. Open the advanced editor in another new tab, click "Advanced »" 13. You should see what you just set, Local catalog and France checked, and LoC unchecked, That's the correct behavior. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|24.05.00 |24.05.00,23.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #21 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27363 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldoldstable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #23 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org