Bug 15149

Summary: Serials: Test prediction pattern does not consider Subscription start and end date
Product: Koha Reporter: Mirko Tietgen <mirko>
Component: SerialsAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Josef Moravec <josef.moravec>
Severity: normal    
Priority: P5 - low CC: colin.campbell, fridolin.somers, janet.mcgowan, jesse, josef.moravec, jschmidt, marjorie.barry-vila, martin.renvoize, nick, sandboxes, severine.queune
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15148
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13877
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10450
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15480
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 22404    
Attachments: Bug 15149: Serial test prediction pattern does not consider end date
Bug 15149: Serial test prediction pattern does not consider end date
Bug 15149: Serial test prediction pattern does not consider end date
Bug 15149: Serial test prediction pattern does not consider end date

Description Mirko Tietgen 2015-11-06 11:57:46 UTC
To reproduce: add or edit a serial, Set dates for
First issue,
Subscripton start
Subscription end

do not set Subscription length.

Test prediction pattern. You will get a list of 1000 issues, starting from first issue date (not subscription start date) and going well beyond subscripton end date.

Expected: show only the issues within the date range. If subscription length is set to a number of issues, you only get these in the pattern.

Also expected: start at subscription start date, not first issue date. I opened an extra bug for that, see Bug 15148

(Numbering pattern in my tests was set to 'Number')
Comment 1 Fridolin Somers 2019-02-21 16:43:49 UTC
What a dirty bug.
I think I found a trivial fix.
I'm on a patch.
Comment 2 Fridolin Somers 2019-02-22 10:55:21 UTC
Created attachment 85501 [details] [review]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.
Comment 3 Biblibre Sandboxes 2019-02-22 12:50:12 UTC
Patch tested with a sandbox, by Séverine QUEUNE <severine.queune@bulac.fr>
Comment 4 Biblibre Sandboxes 2019-02-22 12:50:36 UTC
Created attachment 85523 [details] [review]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 5 Séverine Queune 2019-02-22 12:52:10 UTC
Looks good, thanks Frido !
Comment 6 Bin Wen 2019-02-22 20:00:25 UTC
Created attachment 85574 [details] [review]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: zhihui <zhihui@inlibro.com>
Comment 7 Josef Moravec 2019-02-25 08:36:07 UTC
Created attachment 85586 [details] [review]
Bug 15149: Serial test prediction pattern does not consider end date

To reproduce:

1) add a serial.
2) set first issue = today
3) set frequency = 1/month
4) dont set subscription length
5) set subscription start date = today
6) set subscription start date = today + 1 year
7) set numbering pattern = Number
8) test prediction pattern.
=> Without patch : you will get a list of 1000 issues, going well beyond subscripton end date.
=> With patch : shows only the issues within the date range.

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: zhihui <zhihui@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Josef Moravec 2019-02-25 08:38:14 UTC
Passing QA as it fixes the described bug. Please notice there are some more bugs in the subsricption add form. But we can continue with them on another report, which I am going to open.
Comment 9 Nick Clemens 2019-02-26 14:39:05 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2019-03-01 11:04:45 UTC
Pushed to 18.11.x for 18.11.04
Comment 11 Jesse Maseto 2019-03-08 18:47:25 UTC
Pushed to 18.05.x for 18.05.11