Bug 40159

Summary: When modifying a subscription with received issues, prediction pattern doesn't start from next issue date
Product: Koha Reporter: Arthur Suzuki <arthur.suzuki>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: esther.melander
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 40159: Fix prediction pattern when editing an ongoing subscription

Description Arthur Suzuki 2025-06-18 07:53:33 UTC
To reproduce the issue :
Make a record and create a subscription for this record with a week or month subscription length and a first issue date in the past (like 2016).
Receive at least one issue.
Edit the subscription and test the prediction pattern.
The displayed prediction shows only one number (unless you set the subscription length for like a thousand issues).
Comment 1 Arthur Suzuki 2025-06-18 08:14:49 UTC
Created attachment 183320 [details] [review]
Bug 40159: Fix prediction pattern when editing an ongoing subscription

Test plan :
- Without the patch, create a subscription for a record with weekly or monthly subscription length and a first acquisition date long ago.
- Receive at least one issue for this subscription.
- Edit the subscription and set the next acquisition date to today.
- Check that testing the prediction pattern doesnt show the number of issues set in the subscription length (less issues).
- Apply patch
- Test the prediction pattern again, it will show the proper number of issues.
Comment 2 Esther Melander 2025-06-23 19:15:02 UTC
I tried testing this bug and I'm not sure I'm seeing what is described before the patch is applied. I tried creating a subscription without the patch, tested the numbering pattern and had the correct number of issues.

Would it be possible to get an example screenshot of the subscription settings that do not show the correct number of issues when tested?