[Bug 30747] New: Column settings on otherholdings table in detail.tt doesnt work
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Bug ID: 30747 Summary: Column settings on otherholdings table in detail.tt doesnt work Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If you turn on the system preference SeparateHoldings you will get a otherholdings table on detail.tt. Table settings cannot be applied to this table. The the Columns icon is not present in the top pager. The reason is because of the JS: if ( !has_images[i] ) { // remove the cover_image column table_settings.splice(1,1); } table_settings.splice(1,1) is removing the table settings that control the otherholdings table columns. -- 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=30747 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30747 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 134979 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134979&action=edit Bug 30747: Make column settings work for otherholdings table To test: 1. Turn on SeparateHoldings and find a record that has some items at different home libraries. 2. Look at the Other holdings(x) tab. Notice there is no Columns tool (gear icon). 3. Go to Table Settings, try hiding columns from the otherholdings table. You cannot. 4. Apply patch. 5. Now under the Other holdings(x) tab you should see the Columns button, it should work. 6. Go back to Table settings and try hiding columns, it should work. 7. Now try uploading an item level cover image, make sure all columns are still properly hidden and the Columns tool works 8 Try steps 6 & 7 but with the regular holdings table. Confirm that all colums can properly hide. -- 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=30747 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29282 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29282 [Bug 29282] Show items.issue and items.renewals in the holdings table on the detail page in the staff interface -- 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=30747 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Patch complexity|--- |Trivial patch -- 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=30747 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=30747 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=30747 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134979|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 135073 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135073&action=edit Bug 30747: Make column settings work for otherholdings table To test: 1. Turn on SeparateHoldings and find a record that has some items at different home libraries. 2. Look at the Other holdings(x) tab. Notice there is no Columns tool (gear icon). 3. Go to Table Settings, try hiding columns from the otherholdings table. You cannot. 4. Apply patch. 5. Now under the Other holdings(x) tab you should see the Columns button, it should work. 6. Go back to Table settings and try hiding columns, it should work. 7. Now try uploading an item level cover image, make sure all columns are still properly hidden and the Columns tool works 8. Try steps 6 & 7 but with the regular holdings table. Confirm that all colums can properly hide. 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=30747 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |Failed QA --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- var ids = ['holdings_table', 'otherholdings_table']; var table_settings = [ [% TablesSettings.GetTableSettings('catalogue', 'detail','holdings_table','json') | $raw %], [% TablesSettings.GetTableSettings('catalogue', 'detail','otherholdings_table','json') | $raw %] ]; var has_images = ["[% itemloop_has_images | html %]", "[% otheritemloop_has_images | html %]"]; for (var i in ids) { var id = ids[i]; This code does not look good to me. Note: for...in should not be used to iterate over an Array where the index order is important. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 135119 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135119&action=edit Bug 30747: Make column settings work for otherholdings table using forEach loop To test: 1. Turn on SeparateHoldings and find a record that has some items at different home libraries. 2. Look at the Other holdings(x) tab. Notice there is no Columns tool (gear icon). 3. Go to Table Settings, try hiding columns from the otherholdings table. You cannot. 4. Apply patch. 5. Now under the Other holdings(x) tab you should see the Columns button, it should work. 6. Go back to Table settings and try hiding columns, it should work. 7. Now try uploading an item level cover image, make sure all columns are still properly hidden and the Columns tool works 8. Try steps 6 & 7 but with the regular holdings table. Confirm that all colums can properly hide. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135073|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=30747 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Since I edited the entire loop I am resetting this to needs sign-off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I don't understand what was wrong in the current code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29648 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29648 [Bug 29648] Make KohaTable tables 'default length' and 'default sort' configurable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #6)
I don't understand what was wrong in the current code.
for..in is for objects not regular arrays -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- Hi, good catch + ids.forEach( function(item, index) { Ich, using 'item' for something else than catalogue (item of a biblio record) is not a good idea I think. Maybe 'table_id' would be better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Fridolin Somers from comment #8)
Hi, good catch
+ ids.forEach( function(item, index) {
Ich, using 'item' for something else than catalogue (item of a biblio record) is not a good idea I think. Maybe 'table_id' would be better.
Yes, good point. I am still unsure how Jonathan and Marcel would like this implemented. Will the forEach() work? If so, I will change item to something better! Thanks Frido -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_05_candidate --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Lucas, adjust the naming for "item" then we are good to go here. Any other improvements must go on its own bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |BLOCKED --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135119|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 135190 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135190&action=edit Bug 30747: Make column settings work for otherholdings table using forEach loop To test: 1. Turn on SeparateHoldings and find a record that has some items at different home libraries. 2. Look at the Other holdings(x) tab. Notice there is no Columns tool (gear icon). 3. Go to Table Settings, try hiding columns from the otherholdings table. You cannot. 4. Apply patch. 5. Now under the Other holdings(x) tab you should see the Columns button, it should work. 6. Go back to Table settings and try hiding columns, it should work. 7. Now try uploading an item level cover image, make sure all columns are still properly hidden and the Columns tool works 8. Try steps 6 & 7 but with the regular holdings table. Confirm that all colums can properly hide. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Included a rename to table_name(s). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- Thank you Marcel! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24176 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 135286 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135286&action=edit Bug 30747: (follup-up) Add missing otherholdings_datelastborrowed column in settings See Bug 24176 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30747 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org