Bug 20435: Allow lowercase prefix in inventory value builder
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 16 Mar 2018 10:59:04 +0000 (11:59 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 6 Nov 2018 17:42:31 +0000 (17:42 +0000)
commit41a172ac4f3255a57c1285c5b47dadb407a4ef22
tree35819c386cb517436469937386bcc1bdc1aa15f1
parent1885e6a2146dfab4784e3d9560161d5f097cfcae
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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
cataloguing/value_builder/stocknumberAV.pl
cataloguing/value_builder/stocknumberam123.pl