Bug 6139

Summary: Automatic incrementation of call number does not work if given prefix contains a '
Product: Koha Reporter: Sophie MEYNIEUX <sophie.meynieux>
Component: CatalogingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, f.demians, koha.sekjal, paul.poulain
Version: 3.4   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Fix automatic incrementation if prefix contains ' and also fix incrementation if it is the first number with this prefix
proposed patch (passed QA)

Description Sophie MEYNIEUX 2011-04-08 09:35:27 UTC

    
Comment 1 Sophie MEYNIEUX 2011-04-08 09:38:16 UTC
For example, create an item with call number SHS-PERC'ESP
Comment 2 Sophie MEYNIEUX 2011-04-08 10:18:14 UTC Comment hidden (obsolete)
Comment 3 Sophie MEYNIEUX 2011-04-08 10:24:53 UTC
To test, you should have a framework with callnumber field connected to callnumber.pl plugin
Then you try to create an item on a biblio with this framework. In field callnumber you enter the prefix and then click on ...
Without the patch if your prefix contains a ' (like SHS-PERC'ESP for example), this does nothing. With the patch, callnumber is automatically updated with te next value corresponding (SHS-PERC'ESP 549 for example)
If you enter a new prefix (never used before) without the patch, callnumber is cleared. With the patch it returns the first callnumber for this prefix (WXZ 1 for example)
Comment 4 Paul Poulain 2011-08-10 11:56:46 UTC
Created attachment 4928 [details] [review]
proposed patch (passed QA)

QA comment

* small patch
* good explanations to reproduce the problem and the fixed behaviour

passed QA earned easily.

Just one note:
-            return => $code,
+            return => $code
=> this change was useless, it's perfectly valid to have something like 
$template->param (xxx => xxx,); in Perl (with a trailing comma at the end)

But is not wrong to have none, so won't refuse passed QA just for this ;-)
Comment 5 Chris Cormack 2011-08-14 08:29:19 UTC
Pushed, please test
Comment 6 Jared Camins-Esakov 2012-12-31 00:22:38 UTC
There have been no further reports of problems so I am marking this bug resolved.