[Bug 37796] New: Generated issue has incorrect number in pattern when receiving
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Bug ID: 37796 Summary: Generated issue has incorrect number in pattern when receiving Change sponsored?: --- Product: Koha Version: 24.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: esther.melander@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Created attachment 170927 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170927&action=edit Incorrect number on generated issue Discovered while testing Bug 35646 To Replicate 1. Follow Bug 35646 and create a numbering pattern for {MonthName} {Year}. 2. Test the pattern for a 1/month frequency, subscription start date on the first day of the month. See that the numbering pattern increments correctly for the month names and year. 3. Find a serial in the catalog and add a new subscription. 4. On the second page of the subscription configuration, select the numbering pattern for MonthName Year. 5. Test the prediction pattern and see everything increments correctly. 6. Save the subscription. 7. Receive. See the the first issue displays correctly for the month name and year. 8. Mark the issue as arrived and generate the next issue. See the next issue does not have the correct month name and year. (image attached). 9. Mark the next issue Arrived and generate the third issue. The date published and number continue to increment incorrectly. Possibly connected to bug 20653, though this example is not irregular. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 171498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171498&action=edit Bug 37796: Pass correct publication date when generating the next serial form the serial collection page This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers To test: 1 - On the serial used in previous patch go to 'Serial collection' 2 - Generate next issue 3 - Confirm the numbering is correctly generated after this patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 171499 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171499&action=edit Bug 37796: Adjust unit tests -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 171500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171500&action=edit Bug 37796: Adjust GetNextSeq unit test file The crux of the change here was adding an extra param to the call, but when it died I had no idea where it did. Taking the liberty to tidy, move to subtests, and add diag -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.05 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #4 from Esther Melander <esther.melander@bywatersolutions.com> --- Created attachment 177654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177654&action=edit Serial numbering pattern when receiving I tested this and the numbering pattern still seems to be off. When the prediction pattern is tested in the subscription it appears to be correct, but when receiving it is still one month off. I also tested this with a daily subscriptions and the generated issues were one day off. Attached screen shot of the generated issues for the month/year subscription. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Esther Melander <esther.melander@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yach@morainevalley.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Esther Melander <esther.melander@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |esther.melander@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Megan McShane <megan.mcshane@churchofjesuschrist.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |megan.mcshane@churchofjesus | |christ.org --- Comment #5 from Megan McShane <megan.mcshane@churchofjesuschrist.org> --- We would appreciate any updates on this as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m Status|Needs Signoff |Failed QA --- Comment #6 from Lisette Scheer <lisette@bywatersolutions.com> --- I had the same issue as Esther. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171498|0 |1 is obsolete| | Attachment #171499|0 |1 is obsolete| | Attachment #171500|0 |1 is obsolete| | --- Comment #7 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 185723 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185723&action=edit Bug 37796: Pass correct publication date when generating the next serial form the serial collection page Before this patch, we pass the previous issue date to generate the next seq - this works for the pattern as we are incrementing. When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers. To test: 0 - Follow the plan to recreate from the initial bug description and recreate 1 - Apply patch 2 - On the serial used in previous patch go to 'Serial collection' 3 - Generate next issue 4 - Confirm the numbering is correctly generated after this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Needs Signoff |Failed QA --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Without this patch, the predicted pattern before saving the serial shows the correct month and year values for all expected issues. But after saving the subscription and receiving an issue, the pattern fails to progress correctly. With this patch, the predicted pattern before saving is incorrect, showing the current month and year for all predicted values. However, after saving the subscription and receiving an issue, the pattern DOES progress correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #9 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 186532 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186532&action=edit Bug 37796: (follow-up) Correct call in showpredictionpattern.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185723|0 |1 is obsolete| | --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 186537 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186537&action=edit Bug 37796: Pass correct publication date when generating the next serial form the serial collection page Before this patch, we pass the previous issue date to generate the next seq - this works for the pattern as we are incrementing. When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers. To test: 0 - Follow the plan to recreate from the initial bug description and recreate 1 - Apply patch 2 - On the serial used in previous patch go to 'Serial collection' 3 - Generate next issue 4 - Confirm the numbering is correctly generated after this patch Signed-off-by: Wesley Owen <wesleyowen@churchofjesuschrist.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186532|0 |1 is obsolete| | --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 186538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186538&action=edit Bug 37796: (follow-up) Correct call in showpredictionpattern.pl Signed-off-by: Wesley Owen <wesleyowen@churchofjesuschrist.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Andreas Jonsson <andreas.jonsson@kreablo.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andreas.jonsson@kreablo.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What happens where, is not that trivial in the Serials module.. The commit message says: "When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date" GetNextSeq used planneddate before: - my $dt = dt_from_string($planneddate); + my $dt = dt_from_string($nextpublisheddate); But the planneddate passed was $expected->{publisheddate} coming from the GetNextExpected sub. Which uses: $nextissue->{$_} //= strftime( '%Y-%m-%d', localtime ); Could you please explain how this went wrong previously? The planneddate comes from a date field in the serial table or is defaulted to a ISO date. Wondering if we solve the issue in the right place? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Changing status. Please provide feedback -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #15 from Megan McShane <megan.mcshane@churchofjesuschrist.org> --- Can we get an update on this patch and when it might be applied? Does the previous comment mean more testing is required? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #16 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #13)
What happens where, is not that trivial in the Serials module.. The commit message says: "When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date"
GetNextSeq used planneddate before: - my $dt = dt_from_string($planneddate); + my $dt = dt_from_string($nextpublisheddate);
But the planneddate passed was $expected->{publisheddate} coming from the GetNextExpected sub. Which uses: $nextissue->{$_} //= strftime( '%Y-%m-%d', localtime );
Could you please explain how this went wrong previously? The planneddate comes from a date field in the serial table or is defaulted to a ISO date.
Wondering if we solve the issue in the right place?
I generate the next published date earlier, but only so it can be passed into the sub GetNextSeq, planned date is still passed and didn't use this value previously, so I am not affecting that use. In bug 36546 I additionally used 'planneddate' for calculating the date parts of the serial, I was wrong ;-) This change only affects the issue number calculation as it relates to date parts, the test plan should cover the change here and illustrate the problem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #17 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens (kidclamp) from comment #16)
(In reply to Marcel de Rooy from comment #13) In bug 36546 I additionally used 'planneddate' for calculating the date parts of the serial, I was wrong ;-)
35646 actually, look who QAed that ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #18 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Tests calling ModSerialStatus: prove t/Serials/ModSerialStatus.t t/db_dependent/Letters.t t/db_dependent/Serials.t t/Serials/ModSerialStatus.t .. ok t/db_dependent/Letters.t ..... ok t/db_dependent/Serials.t ..... ok All tests successful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186537|0 |1 is obsolete| | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 190196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190196&action=edit Bug 37796: Pass correct publication date when generating the next serial form the serial collection page Before this patch, we pass the previous issue date to generate the next seq - this works for the pattern as we are incrementing. When the patter is translated ot words, we need to do this from the date of the next issue, so we must pass in the next published date This patch changes the call to GetNextSeq from serial-collection.pl to ensure the new issue publication date is used to generate the numbers. To test: 0 - Follow the plan to recreate from the initial bug description and recreate 1 - Apply patch 2 - On the serial used in previous patch go to 'Serial collection' 3 - Generate next issue 4 - Confirm the numbering is correctly generated after this patch Signed-off-by: Wesley Owen <wesleyowen@churchofjesuschrist.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186538|0 |1 is obsolete| | --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 190197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190197&action=edit Bug 37796: (follow-up) Correct call in showpredictionpattern.pl Signed-off-by: Wesley Owen <wesleyowen@churchofjesuschrist.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 190198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190198&action=edit Bug 37796: (QA follow-up) nextpublisheddate in t/db../GetNextSeq.t Just adding the fifth parameter here, since that actually should be the next published date. But note that it is just a placeholder, since the test does not use the associated date substitutions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #22 from Megan McShane <megan.mcshane@churchofjesuschrist.org> --- Thanks for the QA on this. Wondering when it will be released? Is this a patch or part of the next version? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 alysonjaynereid@ChurchofJesusChrist.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alysonjaynereid@ChurchofJes | |usChrist.org --- Comment #23 from alysonjaynereid@ChurchofJesusChrist.org --- This is really impacting our work. Looking forward to this release as soon as possible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 matsondc@churchofjesuschrist.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matsondc@churchofjesuschris | |t.org --- Comment #24 from matsondc@churchofjesuschrist.org --- This is stopping our workflow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #25 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | CC| |david@davidnind.com Text to go in the| |This fixes an issue with release notes| |incorrect numbering | |patterns and the next | |expected issue shown, after | |a serial is received. | | | |Example of an incorrect | |numbering pattern before | |this fix: | |- Monthly serial received | |for August 2025 (its status | |shows as 'Arrived' for | |August 2025). | |- The next expected serial | |was then shown as August | |2025 instead of September | |2025 (its status was shown | |as 'Expected' with a | |incorrect numbering pattern | |of August 2025) --- Comment #26 from David Nind <david@davidnind.com> --- I've attempted a release note, please update it if I haven't made it understandable or if it is incorrect. Note that this fix will be in the next release of Koha (26.05). As it is a bug, it should ideally be backported to supported versions of Koha by the respective release maintainer, but it is up to the release maintainers to decide this. If you would like it backported, please mention the version you are using at the moment in a comment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jacob.omara@openfifth.co.uk --- Comment #27 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.01 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37796 --- Comment #28 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org