[Koha-bugs] [Bug 24842] New: Automatic serials missing list feeding does not work when the numbering sequence includes regexp specific characters

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 10 15:20:35 CET 2020


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

            Bug ID: 24842
           Summary: Automatic serials missing list feeding does not work
                    when the numbering sequence includes regexp specific
                    characters
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Serials
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: koha at univ-lyon3.fr
        QA Contact: testopia at bugs.koha-community.org
                CC: colin.campbell at ptfs-europe.com

We can encounter this issue, when we choose to automatically feed the serials
missing list of a subscription (Manual history is uncheck in the subcription
planning form).
When setting or removing the missing status to a serial issue in the staff
interface, the process in the code of adding the issue numering sequence or
removing it from  the missinglist is based on some regular expression.
It's not uncommon that librarians use characters like parenthesis in this
sequence, for exemple to add year detail :
No 236 (2019)
We can even fall upon + or * characters.
The consequence is that they are interpreted by the regexp as capturing
characters rather then litterals and this causes the process to fail. The
result is the creation of multiple doubles in the missing list.

This patch aims to solve the problem

Test plan :

To go faster, choose an existing subscription, click on "Edit/Edit as
new(duplicate)"
Uncheck Manual history and go to next page
Choose whatever simple config for this new subscription
Exemple :
Frequency : 1/month
Subscription length : 12
Subscription start date : 01/01/2020
Subscription end date : nothing
Numbering pattern : Volume, number
Last value 
    volume :2019
    number : 1

Click on "Hide advanced pattern" then "Modify pattern"
In the "Numbering formula pattern" zone, add parenthesis around {X}:
   Vol({X}), No {Y}
or an other critical character like + :
   Vol ({X}), No {Y} + suppl.
Fullfill the "Pattern name" : MyTest
Save as new pattern
Test prediction pattern
Save subscription

1) Receive one or two issues on this subscription
2) For the next expected one, set to any missing status rather than arrived one
3) Go to check the missing list in the summary tab of subscription :
   you can see that the issue had not been added to the list.

Install the patch

1) go back to Receive page and set the expected issue as missing.
2) go back to check the missing list : now the issue number is in the list
3) go back to Receive page and set the last missing issue as arrived.
4) go back to missing list : the issue had been removed.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list