[Bug 28950] New: serialsUpdate cron does not mark an issue late until the next issue is expected
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Bug ID: 28950 Summary: serialsUpdate cron does not mark an issue late until the next issue is expected Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When running the cron it does this: 1 - Get all issues with a published date + grace period before today 2 - Loop the related subscriptions 3 - Check the next published date for the serial 4 - Compare the next issues publisheddate to today 5 - Mark late/generate the next issue if the next issue should already be published For a monthly serial with a 30 day grace period, this is usually ok For a yearly serial this is a problem 1 - Issue expected 2021-07-01, 30 day grace period 2 - As of 2021-08-01 that serial is past the grace period 3 - Next issue is planned for 2022-07-01 4 - Serial not marked late for a year -- 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=28950 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |caroline.cyr-la-rose@inlibr | |o.com, | |katrin.fischer@bsz-bw.de, | |sbrown@bywatersolutions.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27499 -- 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=28950 Patrick Robitaille <patrick.robitaille@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick.robitaille@collecto | |.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- 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=28950 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 135205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135205&action=edit Bug 28950: Mark serial late when past grace period This script had some oddities: - There was a LEFT JOIN to subscription, but no error printed if no subscription I changed this to a JOIN as there is a constraint, so this shoudl not happen - Publisheddate was checked after the SQL, moved into query - We checked for the next issue, and marked late only if that issue was already expected This overruled grace period, which should be the mnarker for a serial being late The grace period should be extended if you wish to wait for next issue - If no next published date, we reported an error on the planneddate - Script without confirm had no reporting -- 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=28950 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=28950 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi Status|Needs Signoff |Patch doesn't apply --- Comment #2 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Doesn't apply. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135205|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140324&action=edit Bug 28950: Mark serial late when past grace period This script had some oddities: - There was a LEFT JOIN to subscription, but no error printed if no subscription I changed this to a JOIN as there is a constraint, so this shoudl not happen - Publisheddate was checked after the SQL, moved into query - We checked for the next issue, and marked late only if that issue was already expected This overruled grace period, which should be the mnarker for a serial being late The grace period should be extended if you wish to wait for next issue - If no next published date, we reported an error on the planneddate - Script without confirm had no reporting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 --- Comment #4 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Nick can you confirm, it seems that now after this patch we will create a new issue to be expected if the current one is late, and then this will continue until we have ran into subscription end date or subscription issue length? I'm just wondering if libraries are prepared for this and haven't set their end dates for subscriptions to the year 2999. The old code seems to have stopped creating these new Expected/Missing entries (not 100% on this...). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Joonas Kylmälä from comment #4)
Nick can you confirm, it seems that now after this patch we will create a new issue to be expected if the current one is late, and then this will continue until we have ran into subscription end date or subscription issue length? I'm just wondering if libraries are prepared for this and haven't set their end dates for subscriptions to the year 2999. The old code seems to have stopped creating these new Expected/Missing entries (not 100% on this...).
I don't believe this changes for how long we wil generate issues, but only when we will mark them late. In either case we check the next published date for generating the new, but prior to this patch it also determines when we mark it late - after this patch we will call the same routine to generate the next, we will just do it after the grace period using the expected date, not using the next planned date -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Joonas Kylmälä <joonas.kylmala@iki.fi> 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=28950 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140324|0 |1 is obsolete| | --- Comment #6 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 140462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140462&action=edit Bug 28950: Mark serial late when past grace period This script had some oddities: - There was a LEFT JOIN to subscription, but no error printed if no subscription I changed this to a JOIN as there is a constraint, so this shoudl not happen - Publisheddate was checked after the SQL, moved into query - We checked for the next issue, and marked late only if that issue was already expected This overruled grace period, which should be the mnarker for a serial being late The grace period should be extended if you wish to wait for next issue - If no next published date, we reported an error on the planneddate - Script without confirm had no reporting Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Nick Clemens from comment #5)
(In reply to Joonas Kylmälä from comment #4)
Nick can you confirm, it seems that now after this patch we will create a new issue to be expected if the current one is late, and then this will continue until we have ran into subscription end date or subscription issue length? I'm just wondering if libraries are prepared for this and haven't set their end dates for subscriptions to the year 2999. The old code seems to have stopped creating these new Expected/Missing entries (not 100% on this...).
I don't believe this changes for how long we wil generate issues, but only when we will mark them late.
Thanks, you are right, I was too lazy to test this, but now did so and indeed, we are generating with and without this patch the new expected issues until we reach the end of the subscription. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140462|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 141487 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141487&action=edit Bug 28950: Mark serial late when past grace period This script had some oddities: - There was a LEFT JOIN to subscription, but no error printed if no subscription I changed this to a JOIN as there is a constraint, so this shoudl not happen - Publisheddate was checked after the SQL, moved into query - We checked for the next issue, and marked late only if that issue was already expected This overruled grace period, which should be the mnarker for a serial being late The grace period should be extended if you wish to wait for next issue - If no next published date, we reported an error on the planneddate - Script without confirm had no reporting Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- All working as described, no regressions found and QA script is happy. This is the sort of thing I'd love to see move into a module and get unit tested.. but as it's all in the script at the moment, there's no precedent for tests here. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28950 --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org