Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not. It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders. Note that in database the text is not case-sensitive.
Created attachment 73047 [details] [review] Bug 20435: Allow lowercase prefix in inventory value builder Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not. It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders. Note that in database the text is not case-sensitive. Test plan: 1) Configure stocknumberAV.pl value builder on an item subfield 2) Create an autorized value category 'INVENTORY' 3) Create in this category a value with code 'UC' and description '10' 4) Create in this category a value with code 'lc' and description '20' 5) Create a new item 6) Focus on stocknumber subfield 7) Enter '123' and click on value builder, the entry stays '123' 8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011' 9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021' Same for stocknumberam123.pl
Created attachment 80733 [details] [review] Bug 20435: Allow lowercase prefix in inventory value builder Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not. It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders. Note that in database the text is not case-sensitive. Test plan: 1) Configure stocknumberAV.pl value builder on an item subfield 2) Create an autorized value category 'INVENTORY' 3) Create in this category a value with code 'UC' and description '10' 4) Create in this category a value with code 'lc' and description '20' 5) Create a new item 6) Focus on stocknumber subfield 7) Enter '123' and click on value builder, the entry stays '123' 8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011' 9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021' Same for stocknumberam123.pl To elaborate on step #1: Go to Administration->MARC Bibliographic framework Click on the "Action" button to view the framework for the item you will be creating, view MARC structure. Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA)) Select Actions->Subfields Edit subfield i for "Inventory Number" In the "Other options" pane, select the plugin to test. Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com>
Created attachment 81367 [details] [review] k
Comment on attachment 81367 [details] [review] k Typo.
Created attachment 81368 [details] [review] Bug 20435: Allow lowercase prefix in inventory value builder Cataloging value builders for inventory stocknumberAV.pl and stocknumberam123.pl use a regexp to define if entered text is a prefix or not. It actually only allows uppercase characters. A library may want to catalog with lowercase characters in inventory number and using those value builders. Note that in database the text is not case-sensitive. Test plan: 1) Configure stocknumberAV.pl value builder on an item subfield 2) Create an autorized value category 'INVENTORY' 3) Create in this category a value with code 'UC' and description '10' 4) Create in this category a value with code 'lc' and description '20' 5) Create a new item 6) Focus on stocknumber subfield 7) Enter '123' and click on value builder, the entry stays '123' 8) Enter 'UC' and click on value builder, the entry turn to 'UC 0000000011' 9) Enter 'lc' and click on value builder, the entry turn to 'lc 0000000021' Same for stocknumberam123.pl To elaborate on step #1: Go to Administration->MARC Bibliographic framework Click on the "Action" button to view the framework for the item you will be creating, view MARC structure. Search for Tag 952 (LOCATION AND ITEM INFORMATION (KOHA)) Select Actions->Subfields Edit subfield i for "Inventory Number" In the "Other options" pane, select the plugin to test. Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I have to admit we use a variation of this plugin that allows any prefix - numbers too. The most common use case here is having the year as prefix. 2018/1... But this patch works of course :)
Awesome work all! Pushed to master for 18.11
Enhancement will not be backported to 18.05.x series.