Summary: | Change in Bootstrap5 has broken batch patron modification | ||
---|---|---|---|
Product: | Koha | Reporter: | Jake Deery <jake.deery> |
Component: | Staff interface | Assignee: | Jake Deery <jake.deery> |
Status: | Pushed to main --- | QA Contact: | Testopia <testopia> |
Severity: | trivial | ||
Priority: | P5 - low | CC: | gmcharlt, jake.deery, jonathan.druart, paul.derscheid |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35402 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00
|
|
Circulation function: | |||
Bug Depends on: | 35402 | ||
Bug Blocks: | 37360 | ||
Attachments: |
Bug 37755: Fixed JavaScript for modification tabs
Bug 37755: Fixed JavaScript for modification tabs Bug 37755: Fixed JavaScript for modification tabs Bug 37755: Fixed JavaScript for modification tabs Bug 37755: Fix batch del record (adding the missing _panel suffix) |
Description
Jake Deery
2024-08-28 10:42:02 UTC
Created attachment 170802 [details] [review] Bug 37755: Fixed JavaScript for modification tabs This patch addresses a new bug which prevents correct submission on mod borrowers and mod records (mod + delete). The bug appears to have been introduced since the recent Bootstrap5 switch, and shouldn't be surfacing anywhere else in the system Note that the test plan focuses on tools/modborrowers.pl. The error also appears to exist on tools/batch_record_modification.pl and tools/batch_delete_records.pl, but is a lot harder to reproduce. Please see https://chat.koha-community.org/koha-community/pl/fmnzzgy5cpghtpdc9a9ow75scr and follow-up comments for details on reproducing this. To test: a) go to tools/modborrowers.pl and try to enter valid cardnumbers or borrowernumbers 1) notice how you cannot proceed b) APPLY PATCH c) repeat steps a 1) notice how you can now proceed d) SIGN OFF Bug 35402 has already been pushed but let's keep track of follow-ups this way. re: testing tools/batch_record_modification.pl and tools/batch_delete_records.pl These appear to work on the surface, but I don't think they are correct. If you run this on tools/batch_record_modification.pl (when you're on the entry page, via the browser console): $("#record_ids_selection").each(function() { var tab = $(this).find('#batch_mod_form li.active:first a').attr('href'); console.log(tab); }); You get 'undefined'. I don't think that's good, obviously. :-) If you try again with the new JavaScript: $("#record_ids_selection").each(function() { var tab = $(this).find('#batch_mod_form li a.active:first').attr('href'); console.log(tab); }); You should get the HREF of the active tab. Much more expected! * * * The same can be applied to tools/batch_delete_records.pl... $("#record_ids_selection").each(function() { var tab = $(this).find('#batch_del_form:active:first a').attr('href'); console.log(tab); }); We actually hit an error. Meanwhile... $("#record_ids_selection").each(function() { var tab = $(this).find('#batch_del_form li a.active:first').attr('href'); console.log(tab); }); Should give us that HREF again. Happy times! * * * Jake. Created attachment 170803 [details] [review] Bug 37755: Fixed JavaScript for modification tabs This patch addresses a new bug which prevents correct submission on mod borrowers and mod records (mod + delete). The bug appears to have been introduced since the recent Bootstrap5 switch, and shouldn't be surfacing anywhere else in the system Note that the test plan focuses on tools/modborrowers.pl. The error also appears to exist on tools/batch_record_modification.pl and tools/batch_delete_records.pl, but is a lot harder to reproduce. Please see https://chat.koha-community.org/koha-community/pl/fmnzzgy5cpghtpdc9a9ow75scr and follow-up comments for details on reproducing this. To test: a) go to tools/modborrowers.pl and try to enter valid cardnumbers or borrowernumbers 1) notice how you cannot proceed b) APPLY PATCH c) repeat steps a 1) notice how you can now proceed d) SIGN OFF Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 170806 [details] [review] Bug 37755: Fixed JavaScript for modification tabs This patch addresses a new bug which prevents correct submission on mod borrowers and mod records (mod + delete). The bug appears to have been introduced since the recent Bootstrap5 switch, and shouldn't be surfacing anywhere else in the system Note that the test plan focuses on tools/modborrowers.pl. The error also appears to exist on tools/batch_record_modification.pl and tools/batch_delete_records.pl, but is a lot harder to reproduce. Please see https://chat.koha-community.org/koha-community/pl/fmnzzgy5cpghtpdc9a9ow75scr and follow-up comments for details on reproducing this. To test: a) go to tools/modborrowers.pl and try to enter valid cardnumbers or borrowernumbers 1) notice how you cannot proceed b) APPLY PATCH c) repeat steps a 1) notice how you can now proceed d) SIGN OFF Signed-off-by: Owen Leonard <oleonard@myacpl.org> Found something: Go to /tools/modborrowers.pl Tab "By card number", enter cardnumber '23529000224510' Tab "By borrowernumber", enter 1 Continue => Both patrons are picked, I think we expect only the one from the tab we were before pressing "Continue" (which is the point of this code) Hi Jonathan, Sorry, but I'm now able to reproduce your behaviour. Can I ask if you cleared your browser cache, or ran restart_all? Jake. Oops sorry, it seems to work correctly for the batch patron mod. However it seems broken on "Batch record deletion" => "Upload a file" is cleared when you "Continue", even if you are on this tab. Created attachment 170813 [details] [review] Bug 37755: Fixed JavaScript for modification tabs This patch addresses a new bug which prevents correct submission on mod borrowers and mod records (mod + delete). The bug appears to have been introduced since the recent Bootstrap5 switch, and shouldn't be surfacing anywhere else in the system Note that the test plan focuses on tools/modborrowers.pl. The error also appears to exist on tools/batch_record_modification.pl and tools/batch_delete_records.pl, but is a lot harder to reproduce. Please see https://chat.koha-community.org/koha-community/pl/fmnzzgy5cpghtpdc9a9ow75scr and follow-up comments for details on reproducing this. To test: a) go to tools/modborrowers.pl and try to enter valid cardnumbers or borrowernumbers 1) notice how you cannot proceed b) APPLY PATCH c) repeat steps a 1) notice how you can now proceed d) SIGN OFF Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 170814 [details] [review] Bug 37755: Fix batch del record (adding the missing _panel suffix) Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Jonathan Druart from comment #8) > However it seems broken on "Batch record deletion" > => "Upload a file" is cleared when you "Continue", even if you are on this > tab. Fixed in the last patch. I think we are good now. Thanks, Jonathan. I was looking in tools/modborrowers.pl for the problem – duh! Good to get this one moved quickly, it could have been a show-stopper! Jake. Pushed for 24.11! Well done everyone, thank you! |