Bugzilla – Attachment 80733 Details for
Bug 20435
Allow lowercase prefix in inventory value builder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20435: Allow lowercase prefix in inventory value builder
Bug-20435-Allow-lowercase-prefix-in-inventory-valu.patch (text/plain), 3.01 KB, created by
Cori Lynn Arnold
on 2018-10-17 15:52:53 UTC
(
hide
)
Description:
Bug 20435: Allow lowercase prefix in inventory value builder
Filename:
MIME Type:
Creator:
Cori Lynn Arnold
Created:
2018-10-17 15:52:53 UTC
Size:
3.01 KB
patch
obsolete
>From eea98b6833a853613907565041108dcb032dc060 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 16 Mar 2018 11:59:04 +0100 >Subject: [PATCH] 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> >--- > cataloguing/value_builder/stocknumberAV.pl | 2 +- > cataloguing/value_builder/stocknumberam123.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/value_builder/stocknumberAV.pl b/cataloguing/value_builder/stocknumberAV.pl >index 789a05527e..ac9d41f537 100755 >--- a/cataloguing/value_builder/stocknumberAV.pl >+++ b/cataloguing/value_builder/stocknumberAV.pl >@@ -85,7 +85,7 @@ my $launcher = sub { > > # If a prefix is submited, we look for the highest stocknumber with this prefix, and return it incremented > $code =~ s/ *$//g; >- if ( $code =~ m/^[A-Z]+$/ ) { >+ if ( $code =~ m/^[a-zA-Z]+$/ ) { > my $sth = $dbh->prepare("SELECT lib FROM authorised_values WHERE category='INVENTORY' AND authorised_value=?"); > $sth->execute( $code); > >diff --git a/cataloguing/value_builder/stocknumberam123.pl b/cataloguing/value_builder/stocknumberam123.pl >index 17d64ac790..afed9e96ee 100755 >--- a/cataloguing/value_builder/stocknumberam123.pl >+++ b/cataloguing/value_builder/stocknumberam123.pl >@@ -86,7 +86,7 @@ my $launcher = sub { > ); > } > # If a prefix is submited, we look for the highest stocknumber with this prefix, and return it incremented >- } elsif ( $code =~ m/^[A-Z]+$/ ) { >+ } elsif ( $code =~ m/^[a-zA-Z]+$/ ) { > my $sth = $dbh->prepare("SELECT MAX(CAST(SUBSTRING_INDEX(stocknumber,' ',-1) AS SIGNED)) FROM items WHERE stocknumber LIKE ?"); > $sth->execute($code.' %'); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20435
:
73047
|
80733
|
81367
|
81368