[Bug 34784] New: Add ability to populate empty item callnumbers for a record based on the itemcallnumber syspref
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Bug ID: 34784 Summary: Add ability to populate empty item callnumbers for a record based on the itemcallnumber syspref Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. -- 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=34784 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=34784 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155623&action=edit Bug 34784: Add REST API endpoints for updating single item or all applicable items on a bib Test Plan: 1) Apply this patch 2) prove t/db_dependent/api/v1/biblios.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155624 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155624&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the callnumber the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate callnumbers" button in the cataloging toolbar 7) Add one or more items with no callnumber to the record 8) Test the "Populate callnumbers" button 9) Add another item with no callnumber to the record 10) Test the "Populate callnumber" button for that single item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155623|0 |1 is obsolete| | Attachment #155624|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155626 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155626&action=edit Bug 34784: Add REST API endpoints for updating single item or all applicable items on a bib Test Plan: 1) Apply this patch 2) prove t/db_dependent/api/v1/biblios.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155627&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the callnumber the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate callnumbers" button in the cataloging toolbar 7) Add one or more items with no callnumber to the record 8) Test the "Populate callnumbers" button 9) Add another item with no callnumber to the record 10) Test the "Populate callnumber" button for that single item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 David Nind <david@davidnind.com> 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=34784 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155626|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 156140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156140&action=edit Bug 34784: Add REST API endpoints for updating single item or all applicable items on a bib Test Plan: 1) Apply this patch 2) prove t/db_dependent/api/v1/biblios.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155627|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 156141 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156141&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the callnumber the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate callnumbers" button in the cataloging toolbar 7) Add one or more items with no callnumber to the record 8) Test the "Populate callnumbers" button 9) Add another item with no callnumber to the record 10) Test the "Populate callnumber" button for that single item Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Rebecca Coert <rcoert@arlingtonva.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rcoert@arlingtonva.us -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I'd like for someone who knows their way around the REST API a little better to have a second look here. Most of these are cosmetic and should be quick to follow-up: 1) Needs a follow-up to fix documentation. +=head3 populate_empty_callnumbers + +Controller function that handles deleting a biblio object 2) Spelling In the item form and the holding table we are using 'call number', but the patch uses 'callnumber'. I believe we should follow the GUI. See also: https://wiki.koha-community.org/wiki/Terminology 3) I feel we should include the call number that would be used in the confirmation question. if ( confirm(__('Are you sure you want to populate callnumbers for all items without a callnumber on this record?')) ) 4) Please no line breaks in translatable strings! This is a known issue with Pootle, not sure about Weblate, but translators often might not know what it is and accidentally remove it. msg += __('\nReload the page?'); let msg = __('Item populated with the callnumber "%s"\nReload the page?').format(callnumber); 4) Button in the holdings table The button for every single item in the holdings table takes up quite a bit of space. I wonder if we could find a way to make this work a little better. Maybe a split button with Edit as the main action? 5) Button in the detail page's toolbar (not blocker) Why not move this into the edit menu? 4) Maintenance script? (not blocker) I wonder about the use case to require such a one by one change. If you have itemcallnumber set, this would only apply to items that have been created before, that have been imported or otherwise added from outside of Koha. Are there plans for a maintenance script to do this in batch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156140|0 |1 is obsolete| | Attachment #156141|0 |1 is obsolete| | --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 158554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158554&action=edit Bug 34784: Add REST API endpoints for updating single item or all applicable items on a bib Test Plan: 1) Apply this patch 2) prove t/db_dependent/api/v1/biblios.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 158555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158555&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the callnumber the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate callnumbers" button in the cataloging toolbar 7) Add one or more items with no callnumber to the record 8) Test the "Populate callnumbers" button 9) Add another item with no callnumber to the record 10) Test the "Populate callnumber" button for that single item Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 158556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158556&action=edit Bug 34784: (QA follow-up) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> ---
Most of these are cosmetic and should be quick to follow-up:
1) Needs a follow-up to fix documentation.
+=head3 populate_empty_callnumbers + +Controller function that handles deleting a biblio object
Fixed!
2) Spelling
In the item form and the holding table we are using 'call number', but the patch uses 'callnumber'. I believe we should follow the GUI.
Fixed!
3) I feel we should include the call number that would be used in the confirmation question.
if ( confirm(__('Are you sure you want to populate callnumbers for all items without a callnumber on this record?')) )
Wow, that was more work than I expected but I was able to make that happen!
4) Please no line breaks in translatable strings!
This is a known issue with Pootle, not sure about Weblate, but translators often might not know what it is and accidentally remove it.
msg += __('\nReload the page?'); let msg = __('Item populated with the callnumber "%s"\nReload the page?').format(callnumber);
I think I've fixed this based on your description. We should add a coding guideline for this.
4) Button in the holdings table
The button for every single item in the holdings table takes up quite a bit of space. I wonder if we could find a way to make this work a little better. Maybe a split button with Edit as the main action?
Done!
5) Button in the detail page's toolbar (not blocker)
Why not move this into the edit menu?
Done!
4) Maintenance script? (not blocker)
I wonder about the use case to require such a one by one change. If you have itemcallnumber set, this would only apply to items that have been created before, that have been imported or otherwise added from outside of Koha.
Are there plans for a maintenance script to do this in batch?
There are no plans for a maintenance script but I'd be happy to make one on a followup bug report if you can provide the parameters you'd like to see! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158554|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158569&action=edit Bug 34784: Add REST API endpoints for updating single item or all applicable items on a bib Test Plan: 1) Apply this patch 2) prove t/db_dependent/api/v1/biblios.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158555|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158570 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158570&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the callnumber the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate callnumbers" button in the cataloging toolbar 7) Add one or more items with no callnumber to the record 8) Test the "Populate callnumbers" button 9) Add another item with no callnumber to the record 10) Test the "Populate callnumber" button for that single item Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158556|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158571&action=edit Bug 34784: (QA follow-up) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158572&action=edit Bug 34784: (QA follow-up) Terminology: callnumber, biblio, syspref -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Kyle M Hall from comment #11)
Most of these are cosmetic and should be quick to follow-up:
1) Needs a follow-up to fix documentation.
+=head3 populate_empty_callnumbers + +Controller function that handles deleting a biblio object
Fixed!
Yes, but introducing more wrong terminology (see 2).
2) Spelling
In the item form and the holding table we are using 'call number', but the patch uses 'callnumber'. I believe we should follow the GUI.
Fixed!
Not quite, see my follow-up.
3) I feel we should include the call number that would be used in the confirmation question.
if ( confirm(__('Are you sure you want to populate callnumbers for all items without a callnumber on this record?')) )
Wow, that was more work than I expected but I was able to make that happen!
Sorry, but I believe it's worth it! And it works nicely too.
4) Please no line breaks in translatable strings!
This is a known issue with Pootle, not sure about Weblate, but translators often might not know what it is and accidentally remove it.
msg += __('\nReload the page?'); let msg = __('Item populated with the callnumber "%s"\nReload the page?').format(callnumber);
You did: + msg += " " + __('Reload the page?'); You could just have done this to keep your line break: + msg += "\n" + __('Reload the page?'); We can do line breaks, they just should not be with the translated string :)
I think I've fixed this based on your description. We should add a coding guideline for this.
I thought we had one, but it might be lost in time. I fixed a ton of those strings back in the day. This one goes in the right direction, even if it uses HTML formatting: JS3: Avoid strings which mix text and markup
4) Button in the holdings table
The button for every single item in the holdings table takes up quite a bit of space. I wonder if we could find a way to make this work a little better. Maybe a split button with Edit as the main action? Done!
Yes, but it no longer works :( POST http://localhost:8081/api/v1/biblios/undefined/items/undefined/populate_empt... The undefined don't look good.
5) Button in the detail page's toolbar (not blocker)
Why not move this into the edit menu?
Done!
Yes, but it no longer works :( POST http://localhost:8081/api/v1/biblios/undefined/items/populate_empty_callnumb...
4) Maintenance script? (not blocker)
I wonder about the use case to require such a one by one change. If you have itemcallnumber set, this would only apply to items that have been created before, that have been imported or otherwise added from outside of Koha.
Are there plans for a maintenance script to do this in batch?
There are no plans for a maintenance script but I'd be happy to make one on a followup bug report if you can provide the parameters you'd like to see!
I don't need one, I was just wondering if there was more planned around this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add ability to populate |Add ability to populate |empty item callnumbers for |empty item callnumbers for |a record based on the |a record based on the |itemcallnumber syspref |itemcallnumber system | |preferencesssssssssssssssss | |sssssssssssssssssssssssssss -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add ability to populate |Add ability to populate |empty item callnumbers for |empty item call numbers for |a record based on the |a record based on the |itemcallnumber system |itemcallnumber system |preferencesssssssssssssssss |preference |sssssssssssssssssssssssssss | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 158593 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158593&action=edit Bug 34784: (QA follow-up) Fix broken links, re-add newlines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> ---
Yes, but introducing more wrong terminology (see 2). Not quite, see my follow-up.
Thanks for the follow up!
Sorry, but I believe it's worth it! And it works nicely too.
Excellent :)
You could just have done this to keep your line break:
+ msg += "\n" + __('Reload the page?');
Thanks for the example, now I know exactly what you mean!
Yes, but it no longer works :( POST http://localhost:8081/api/v1/biblios/undefined/items/undefined/ populate_empty_callnumbers
The undefined don't look good.
Yes, but it no longer works :( POST http://localhost:8081/api/v1/biblios/undefined/items/ populate_empty_callnumbers
Fixed!
I don't need one, I was just wondering if there was more planned around this.
This is an atomic enhancement, at least for the time being! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158569|0 |1 is obsolete| | --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158627&action=edit Bug 34784: Add REST API endpoints for updating single item or all applicable items on a bib Test Plan: 1) Apply this patch 2) prove t/db_dependent/api/v1/biblios.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158570|0 |1 is obsolete| | --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158628&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item callnumbers for items on a record based on the system preference "itemcallnumber". Only items with empty callnumbers would affected. This would add a button "Populate empty item callnumbers" on catalogue/detail.pl, as well as a "Populate callnumber" button for each line in the holdings table to set the callnumber for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the callnumber the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate callnumbers" button in the cataloging toolbar 7) Add one or more items with no callnumber to the record 8) Test the "Populate callnumbers" button 9) Add another item with no callnumber to the record 10) Test the "Populate callnumber" button for that single item Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158571|0 |1 is obsolete| | --- Comment #21 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158629 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158629&action=edit Bug 34784: (QA follow-up) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158572|0 |1 is obsolete| | --- Comment #22 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158630 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158630&action=edit Bug 34784: (QA follow-up) Terminology: callnumber, biblio, syspref Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158593|0 |1 is obsolete| | --- Comment #23 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158631&action=edit Bug 34784: (QA follow-up) Fix broken links, re-add newlines Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #24 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 160349 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160349&action=edit Bug 34784: (QA follow-up) Add additionalProperties to pass xt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #25 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Kyle, I am sorry, I believe there are still issues here highlighted by the xt/api.t test. Referring to Tomas and Martin to have a look at the API part. As I also was the one to QA this, I think another set of eyes would be no mistake. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com Status|Passed QA |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #26 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- NOTE: Number of tests in t/db_dependent/api/v1/biblios.t also needs to be increased to 15 (had this fixed locally) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #27 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The endpoints introduced here feel very specific and RPC rather than REST.. I'm going to review with Tomas and see if we can come up with something a little more in keeping with the rest of the REST api's -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #28 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Martin Renvoize from comment #27)
The endpoints introduced here feel very specific and RPC rather than REST.. I'm going to review with Tomas and see if we can come up with something a little more in keeping with the rest of the REST api's
I agree and have said something similar on private conversations with Kyle. What I proposed Kyle in that conversation, was that we already have something similar, and flexible enough so we can use the same pattern everywhere... POST /jobs. If we made this particular case process immediately, e.g. POST /jobs/bach_call_number_update could return a regular job object, with Location => /jobs/:job_id, and the usual payload found in the job object would just carry the needed information to avoid a second API call... He didn't like it that it is not really a background job. I mention this conversation in case it triggers some better idea to someone. I have thought about this a bit more, and I feel like we could do something like: POST /biblios/:biblio_id/batch_call_number_update which will return an object, representing the batch operation results (e.g. the items that got modified, those that failed if partial success is accepted, etc). It resembles too much what a 'job' is, hence my hesitation. We should really find some middle ground and move ahead with this cool feature. I don't entirely like the pattern, but it would be more RESTful. My two cents. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #29 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks, Tomas. Kyle, can you take a look and let us know what you think? I certainly agree about the cool feature. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|katrin.fischer@bsz-bw.de |testopia@bugs.koha-communit | |y.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED --- Comment #30 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm going to resume this with a POC endpoint I've talked with Martin about introducing. I'd add that after the recent template changes this needs to be redone UI-wise. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.stelzenmueller@bs | |z-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #31 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 173076 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173076&action=edit Bug 34784: API spec Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #32 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 173077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173077&action=edit Bug 34784: Add RPC route for updating item callnumbers for a biblio This patch takes the idea implemented on the original patch, moves it to the /rpc namespace to make it clear this is not a RESTful endpoint. Code gets improved a bit, using some patterns we are using nowadays. The return value gets a bit more information and. A big change is it now uses `Koha::Items->batch_update`. It originally used `Koha::Items->update` with the `no_trigger` option. It felt like `batch_update` is a bit more smart in terms of triggering indexing at the end of the update, and only for the host biblio. It looks like that was the spirit of the original implementation, but missed to actually trigger indexing at the end of the call. To test: 1. Apply this patches 2.Run: $ ktd --shell k$ yarn api:bundle k$ restart_all 3. Run the tests: k$ prove t/db_dependent/api/v1/rpc/biblios.t => SUCCESS: Tests pass! 4. Try the new routes with Postman or your favourite tool (if they don't match) => SUCCESS: The desired behavior is what you get. 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | Assignee|tomascohen@gmail.com |kyle@bywatersolutions.com --- Comment #33 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Kyle, my promised two cents. I reworked the endpoint. Hope you agree and can adjust your UI implementation on top of it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173077|0 |1 is obsolete| | --- Comment #34 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 173078 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173078&action=edit Bug 34784: Add RPC route for updating item callnumbers for a biblio This patch takes the idea implemented on the original patch, moves it to the /rpc namespace to make it clear this is not a RESTful endpoint. Code gets improved a bit, using some patterns we are using nowadays. The return value gets a bit more information and. A big change is it now uses `Koha::Items->batch_update`. It originally used `Koha::Items->update` with the `no_trigger` option. It felt like `batch_update` is a bit more smart in terms of triggering indexing at the end of the update, and only for the host biblio. It looks like that was the spirit of the original implementation, but missed to actually trigger indexing at the end of the call. To test: 1. Apply this patches 2.Run: $ ktd --shell k$ yarn api:bundle k$ restart_all 3. Run the tests: k$ prove t/db_dependent/api/v1/rpc/biblios.t => SUCCESS: Tests pass! 4. Try the new routes with Postman or your favourite tool (if they don't match) => SUCCESS: The desired behavior is what you get. 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38224 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38224 [Bug 38224] Move populate_empty_callnumbers logic into Koha::Biblio for reusability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|38224 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38224 [Bug 38224] Move populate_empty_callnumbers logic into Koha::Biblio for reusability -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38226 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38226 [Bug 38226] Add RPC endpoint for batch filling empty callnumbers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173076|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=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173078|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=34784 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160349|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=34784 --- Comment #35 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- The endpoint code and discussion is now moved to bug 38224. This patches should get the API portion stripped and resubmitted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #36 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Katrin Fischer from comment #7)
4) Maintenance script? (not blocker)
I wonder about the use case to require such a one by one change. If you have itemcallnumber set, this would only apply to items that have been created before, that have been imported or otherwise added from outside of Koha.
Are there plans for a maintenance script to do this in batch?
As I was rethinking the code, I filed bug 38224 in which I move the code into Koha::Biblio. I think it is worth filing a bug, depending on it, with a proposal for a maintenance script. Maybe someone can/wants to do it. So better provide a good spec. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158627|0 |1 is obsolete| | Attachment #158628|0 |1 is obsolete| | Attachment #158629|0 |1 is obsolete| | Attachment #158630|0 |1 is obsolete| | Attachment #158631|0 |1 is obsolete| | --- Comment #37 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 174241 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174241&action=edit Bug 34784: Implement feature in staff interface Some libraries would like to auto-populate item call numbers for items on a record based on the system preference "itemcallnumber". Only items with empty call numbers would affected. This would add a button "Populate empty item call numbers" on catalogue/detail.pl, as well as a "Populate call number" button for each line in the holdings table to set the call number for that specific item. Test Plan: 1) Set the systempreference to something ( "245a" will make the call number the record title for testing purposes ) 2) Apply this patch set 3) Restart all the things! 4) Browse to a record details page, note no new buttons 5) Enable the new syspref EnablePopulateCallnumbers 5) Reload the record details, note the new "Populate call numbers" button in the cataloging toolbar 7) Add one or more items with no call number to the record 8) Test the "Populate call numbers" button 9) Add another item with no call number to the record 10) Test the "Populate call number" button for that single item -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |andrew@bywatersolutions.com --- Comment #38 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- One small quibble when I use the "Populate call number" option from the item-specific action button in the holdings table. If my item already has a call number, Koha incorrectly tells me that the call number has been populated when no change is actually made. It should report "No items were updated" like the bib-level action does. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Esther Melander <esther.melander@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |esther.melander@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |Laura.escamilla@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 --- Comment #39 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 183330 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183330&action=edit Bug 34784: Add KIT and CLAMS to list of contributing institutions Also corrects the alphabetic ordering for Calyx. To test: * Apply patch * Go to About Koha: you can do so from the more menu or by clicking on the version number in the bottom right corner * Open the tab "Koha team" * Scroll to the bottom of the page and verify that KIT and CLAMS show up in the correct spot in the list of "Contributing companies and institutions" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183330|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=34784 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #40 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, had my bug numbers wrong... -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org