Bug 20435 - Allow lowercase prefix in inventory value builder
Summary: Allow lowercase prefix in inventory value builder
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-16 10:45 UTC by Fridolin Somers
Modified: 2019-10-14 19:56 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 20435: Allow lowercase prefix in inventory value builder (2.59 KB, patch)
2018-03-16 14:18 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 20435: Allow lowercase prefix in inventory value builder (3.01 KB, patch)
2018-10-17 15:52 UTC, Cori Lynn Arnold
Details | Diff | Splinter Review
k (757 bytes, patch)
2018-10-27 20:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20435: Allow lowercase prefix in inventory value builder (3.06 KB, patch)
2018-10-27 20:40 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2018-03-16 10:45:36 UTC
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.
Comment 1 Fridolin Somers 2018-03-16 14:18:53 UTC
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
Comment 2 Cori Lynn Arnold 2018-10-17 15:52:53 UTC
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>
Comment 3 Katrin Fischer 2018-10-27 20:38:52 UTC
Created attachment 81367 [details] [review]
k
Comment 4 Katrin Fischer 2018-10-27 20:39:30 UTC
Comment on attachment 81367 [details] [review]
k

Typo.
Comment 5 Katrin Fischer 2018-10-27 20:40:56 UTC
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>
Comment 6 Katrin Fischer 2018-10-27 20:41:59 UTC
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 :)
Comment 7 Nick Clemens 2018-11-06 17:54:47 UTC
Awesome work all!

Pushed to master for 18.11
Comment 8 Martin Renvoize 2018-11-16 12:39:42 UTC
Enhancement will not be backported to 18.05.x series.