Bug 28691 - Quick spine label should split the same way the label creator does / use splitting rules
Summary: Quick spine label should split the same way the label creator does / use spli...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Chris Nighswonger
QA Contact: Testopia
URL:
Keywords:
: 23021 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-07-08 14:08 UTC by Andrew Fuerste-Henry
Modified: 2023-08-02 20:32 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-07-08 14:08:30 UTC
The two label printers treat LCC call numbers differently. They should work the same.
To recreate:
- have an item with call number "AB123" and source of classification LCC, set to LCC splitting rule
- use the Label Creator to print a spine label containing only itemcallnumber, notice it splits as:

AB
123

- use the Quick Spine Label Creator to print a spine label. Notice it does not split:

AB123


See also Bug 23021, the quick spine tool won't follow a regex splitting rule.
Comment 1 Heather 2023-02-08 18:10:11 UTC
Yes please yes please yes please yes please!!!
Comment 2 Katrin Fischer 2023-04-16 12:51:16 UTC
I believe the quick spine labels just break on spaces. You can add a lot of logic using JS and CSS, but that's quite painful.

Using the splitting rules makes a lot of sense here, I'll mark bug 32021 as a duplicate of this, as the general problem is the splitting rules not being used.
Comment 3 Katrin Fischer 2023-04-16 12:51:39 UTC
*** Bug 23021 has been marked as a duplicate of this bug. ***
Comment 4 Caroline Cyr La Rose 2023-08-01 19:59:28 UTC
We've just had someone on IRC ask about this. https://irc.koha-community.org/koha/2023-08-01#i_2501434

They had a label printer and wanted to use the quick spine label creator to print the spine labels with a specific splitting rule.

Test plan :
1. Create a splitting rule that splits on periods and spaces
   1.1. Go to Administration > Classification configuration
   1.2. Click 'New splitting rule'
   1.3. Fill out the form
        - Splitting rule code: TEST
        - Description: Split on period and spaces
        - Splitting routine: RegEx
        - Regular expression: s/\s/\n/g (click 'New' to add a second regex) 
                              s/\./\n\./g
   1.4. Optionally, test the regex by entering a call number, e.g. 822.33 H521
        It should be split as follows

        822
        .33
        H521

   1.5. Click 'Save'

2. Add this splitting rule to the Other/Generic Classification Scheme
   2.1. In Classification sources, click 'Edit' next to Other/Generic Classification Scheme
   2.2. Edit as follows
        - Source in use: Check
        - Splitting rule: Split on period and spaces (TEST)
   2.3. Click 'Save'

3. Create or edit an item to add a call number
   3.1. Find or create a record
   3.2. Edit or create an item
   3.3. Edit/Create the item as follows
        - 2 - Source of classification or shelving scheme: Other/Generic Classification Scheme
        - o - Full call number: 822.33 H521
        - p - Barcode: enter a barcode, note this down, you'll need it later
        - y - Koha item type: fill this out if it's not already
   3.4. Click 'Add item' or 'Save changes'

4. Print a quick label
   4.1. Go to Cataloging > Quick spine label creator
   4.2. Enter the barcode of the item and press Enter
        --> The call number is not split according to the rule
Comment 5 Katrin Fischer 2023-08-01 20:37:30 UTC
The regex rules don't work, but there is a lot of mark-up useful for splitting with jQuery and CSS if you have a look at how it presents in HTML.
Comment 6 Heather 2023-08-02 17:52:16 UTC
I was able to follow the test plan on a sandbox!  I needed to enable the SpineLabelShowPrintOnBibDetails syspref, and to make the Other/generic... classification source "in use."

When I followed the test plan with the regex and tested the regex (when adding the splitting rule) the call number split correctly.  But after putting that exact same call number into an item record and trying the "spine label" button in the "Normal" display of the bib record to quick print a spint label, the call number did not split, even though I had configured the Other/generic to use the TEST splitting rule.

So, does that help?  Is there something else to do/test?

Cheerio!
h2