Bug 6139 - Automatic incrementation of call number does not work if given prefix contains a '
Summary: Automatic incrementation of call number does not work if given prefix contain...
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 3.4
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
Depends on:
Reported: 2011-04-08 09:35 UTC by Sophie MEYNIEUX
Modified: 2013-12-05 20:04 UTC (History)
4 users (show)

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

Fix automatic incrementation if prefix contains ' and also fix incrementation if it is the first number with this prefix (1.62 KB, patch)
2011-04-08 10:18 UTC, Sophie MEYNIEUX
Details | Diff | Splinter Review
proposed patch (passed QA) (1.68 KB, patch)
2011-08-10 11:56 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.