https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23488

            Bug ID: 23488
           Summary: Line wrapping doesn't always respect word order in
                    Patron card creator
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Label/patron card printing
          Assignee: cnighswon...@foundations.edu
          Reporter: maryse.sim...@inlibro.com
        QA Contact: testo...@bugs.koha-community.org

In patron card creator, layouts can define up to three lines of text to print
to the card. When the text of a line is too long, wrapping will happen. If the
wrapped text contains a word that is repeated at least once in the string, the
words in the text can be rearranged, the repeated words being grouped together.

To reproduce, I use the following text that I put in a card layout : "one two
three one two three one two three one two three one two three one two three one
two three one two three" I then export some patron cards using this layout. In
the resulting file, the words are all out of order : all of the ones appear
first, followed by all the twos and only then the threes.

The problem is that wrapping happens by finding the last word that can be cut
from the string and putting it in a new line. But, when the word is then
removed from the original text, only the first occurrence is removed if it
appears more than once. The new last word to be removed from the end of the
line is
the same word again and again until there is none left.

We should make sure to remove the word at the end of the line, exactly where we
found it to start with.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to