Bug 40159 - When modifying a subscription with received issues, prediction pattern doesn't start from next issue date
Summary: When modifying a subscription with received issues, prediction pattern doesn'...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-18 07:53 UTC by Arthur Suzuki
Modified: 2025-10-20 09:22 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
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 (1.79 KB, patch)
2025-06-18 08:14 UTC, Arthur Suzuki
Details | Diff | Splinter Review
renewal doesn't show the proper number of issues (53.41 KB, image/png)
2025-07-29 13:55 UTC, Arthur Suzuki
Details
another example (56.90 KB, image/png)
2025-07-29 13:55 UTC, Arthur Suzuki
Details
screenshot for comment 6 (63.39 KB, image/jpeg)
2025-10-19 13:49 UTC, Mathieu Saby
Details

Note You need to log in before you can comment on or make changes to this bug.
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?
Comment 3 Arthur Suzuki 2025-07-29 13:55:14 UTC
Created attachment 184808 [details]
renewal doesn't show the proper number of issues
Comment 4 Arthur Suzuki 2025-07-29 13:55:33 UTC
Created attachment 184809 [details]
another example
Comment 5 Arthur Suzuki 2025-07-29 13:57:21 UTC
Hi Esther,
The problem occurs when selecting "months" or "weeks" rather than "number of issues" when trying the numbering pattern.
Best,
Arthur
Comment 6 Mathieu Saby 2025-10-19 13:48:07 UTC
The behaviour of prediction models remains a bottomless mystery to me, and the manual isn't much help.

Maybe I'm not knowledgeable enough on the subject, but I've just tested it and can't see any difference between the behaviour with and without the patch. 

Here's a screenshot.

From the manuel I read that the « 1st issue publication date » is the « date from which the prediction pattern will start »

1st issue publication date : June 1st 2024
Frequency : 1/month
Subscription length : 12 months
Subscription start date : 01/01/2025
Subscription start date : blank
Numbering pattern : Volume, number
Parameters for the prediction pattern : 
- Begins with VOLUME = 2024 ; Number = 6 (it must fit the information about the 1st issue used for calculating the predicton pattern, so june 2024)
- Inner counter = 5 (because before june 2024, 5 issues have been published)

The prediction pattern seems the same with and without the patch, and seems correct
 
But when I try to receive an actual issue, Koha expect the issue « Vol 2024, No. 6 » published on « 06/01/2024 » and expected on « 06/01/2024 ».  Same behavior with and without the patch.
If my subscription begins the 01/01/2025, should not Koha expect as the 1st issue the « Vol. 2025, no. 1 » ?
Comment 7 Mathieu Saby 2025-10-19 13:49:27 UTC
Created attachment 188125 [details]
screenshot for comment 6
Comment 8 Mathieu Saby 2025-10-20 07:38:21 UTC
Sorry, I was so focused on understanding the module that I didn't read the test plan carefully or understand the problem that was raised! I'll check now to see what happens if an issue has been received.
Comment 9 Mathieu Saby 2025-10-20 09:20:20 UTC
I suppose when you wrote "set the next acquisition date to today" you were making reference to the "Set the date received to today?" button while "multireceving" issues ?
Reception date is not the same thing as aquisition date.

It is hard to know how Koha is **supposed** to work. The multireceiving feature is not in the manual, not to speak of the "Set the date received to today?"
Comment 10 Mathieu Saby 2025-10-20 09:22:57 UTC
The manual does not specify how Koha should behave if the date of the first issue is earlier than the subscription start date. Are we sure that this type of configuration is allowed?