Bug 15149 - Serials: Test prediction pattern does not consider Subscription start and end date
Summary: Serials: Test prediction pattern does not consider Subscription start and end...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Josef Moravec
URL:
Keywords:
Depends on:
Blocks: 22404
  Show dependency treegraph
 
Reported: 2015-11-06 11:57 UTC by Mirko Tietgen
Modified: 2020-01-06 20:17 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15149: Serial test prediction pattern does not consider end date (1.38 KB, patch)
2019-02-22 10:55 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 15149: Serial test prediction pattern does not consider end date (1.58 KB, patch)
2019-02-22 12:50 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 15149: Serial test prediction pattern does not consider end date (1.63 KB, patch)
2019-02-22 20:00 UTC, Bin Wen
Details | Diff | Splinter Review
Bug 15149: Serial test prediction pattern does not consider end date (1.68 KB, patch)
2019-02-25 08:36 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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