libraryhackers / library-callnumber-lc

Perl and Python modules for normalizing Library of Congress call numbers
30 stars 2 forks source link

feature request: version of components() method that /doesn't/ normalize the call number #7

Closed gmcharlt closed 9 years ago

gmcharlt commented 9 years ago

Original issue 7 created by gmcharlt on 2013-09-11T14:26:05.000Z:

Koha uses Library::CallNumber::LC to split LC call numbers for printing on spine labels. However, as described in Koha bug 10821 [1], the normalization means that the results of the split can be different from the call number as entered:

[1] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10821

gmcharlt commented 9 years ago

Comment #1 originally posted by gmcharlt on 2014-05-07T16:01:58.000Z:

There are times[1] when calling code may not want forced changes to the callnumber it passes off to the Library::Callnumber::LC object. Since we already handle the conversion to uppercase in the normalize method, there is really no reason to force uppercase on the creation of an L::C::LC object. This patch removes the code which forces uppercase.

This patch also moves the forced addition of a decimal to the first cutter. Again, the caller should not be handed back a normalized callnumber unless specifically asked for.

It also adds another number to t/t_Labels_split_lccn.t

[1] http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10821

Note: I'm not a python guru, but it appears that the python version may do the same thing. Someone else would need to cook up a fix for that as it is outside my comfort zone.

gmcharlt commented 9 years ago

Comment #2 originally posted by gmcharlt on 2014-05-07T16:43:10.000Z:

I want to express my appreciation, Chris, as this issue has been a gigantic one for our library since the change took place. Many thanks!

gmcharlt commented 9 years ago

Comment #3 originally posted by gmcharlt on 2014-12-10T20:14:37.000Z:

I wonder if there is a chance this fix could be pushed and a new release made soon? This problem continues to show up for various users of Koha. Thanks.

gmcharlt commented 9 years ago

Comment #4 originally posted by gmcharlt on 2014-12-10T20:42:05.000Z:

Many apologies for letting this linger! The patch looks reasonable at first glance, so I'll get a new version rolled ASAP. Thanks for the help, and the reminder!

gmcharlt commented 9 years ago

Comment #5 originally posted by gmcharlt on 2014-12-12T18:08:49.000Z:

Patch accepted with some minor whitespace changes to the test file. Thanks again, Chris!

gmcharlt commented 9 years ago

Comment #6 originally posted by gmcharlt on 2014-12-12T19:16:22.000Z:

Kudos Dan!

Thanks a million.