Bug 23243 - Allow filtering out of historic subscription expirations in the check expiration of serials page
Summary: Allow filtering out of historic subscription expirations in the check expirat...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
: 12452 (view as bug list)
Depends on: 6968
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-01 11:19 UTC by Martin Renvoize
Modified: 2022-06-06 20:29 UTC (History)
18 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Bug 15171 reversed the behaviour of the serials page to always display expired serial subscriptions. This bug makes that filtering optional using a new checkbox.
Version(s) released in:
21.05.00


Attachments
Bug 23243: Restore filtering out historic expired subscriptions (4.29 KB, patch)
2019-07-01 11:19 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23243: Adjust previous patch (2.52 KB, patch)
2019-12-12 10:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23243: Restore filtering out historic expired subscriptions (4.29 KB, patch)
2020-06-02 14:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23243: Adjust previous patch (2.57 KB, patch)
2020-06-02 14:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23243: (follow-up) Update wording as requested (1.07 KB, patch)
2020-06-02 14:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 23243: Restore filtering out historic expired subscriptions (4.45 KB, patch)
2021-04-02 15:20 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 23243: Adjust previous patch (2.73 KB, patch)
2021-04-02 15:20 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 23243: (follow-up) Update wording as requested (1.22 KB, patch)
2021-04-02 15:20 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 23243: Restore filtering out historic expired subscriptions (4.51 KB, patch)
2021-04-18 10:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23243: Adjust previous patch (2.78 KB, patch)
2021-04-18 10:01 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 23243: (follow-up) Update wording as requested (1.27 KB, patch)
2021-04-18 10:01 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2019-07-01 11:19:14 UTC
+++ This bug was initially created as a clone of Bug #6968 +++

The Check Expiration page in Serials is now hardcoded (bug 15171) to always show all subscriptions that expire/expired before the date specified. We should have optionally enabled filtering out the historic expirations that have happened before today rather than removing that feature entirely.
Comment 1 Martin Renvoize 2019-07-01 11:19:47 UTC
Created attachment 91138 [details] [review]
Bug 23243: Restore filtering out historic expired subscriptions

The 'Check Expiration' page in Serials is now hardcoded to display all
expired subscriptions before the entered date. This patch restores the
ability to limit the results to just those expiring between 'today'
and the date entered.

Original code taken from bug 6968 autored by Maxime Pelletier, rebased
by Charles Farmer and then moved to a new report and rebased again by
Martin Renvoize.

Test plan:
1) Without the patch any results after a search from this page will
   result in matches both before after todays date (but before the date
   you entered).
2) With the patch you should see a 'Show historic expirations' checkbox
   which will allow you to limit the results to just those that expire
   between the date you enter and today.

Sponsored-by: CCSR
Rescued-by: Charles Farmer <charles.farmer@inlibro.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 2 Martin Renvoize 2019-07-01 11:20:30 UTC
Patch reworked from bug 6968 and attached, ready for testing.
Comment 3 Katrin Fischer 2019-07-30 21:34:42 UTC
I am sorry, some issues with the QA script here:

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/serials/checkexpiration.tt
   OK	  filters
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  js_in_body
   OK	  spelling
   FAIL	  tt_valid
		lines 50
   OK	  valid_template

 FAIL	serials/checkexpiration.pl
   OK	  critic
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  pod
   OK	  spelling
   FAIL	  valid
		Global symbol "$expiration_dt" requires explicit package name (did you forget to declare "my $expiration_dt"?) 
		serials/checkexpiration.pl had compilation errors.
Comment 4 Martin Renvoize 2019-08-05 08:20:12 UTC
Hmm, 

I just ran the QA scripts here and can't replicate the failures.. 

Will try to grab you on IRC later Katrin and see if we can replicate it together.
Comment 5 Jonathan Druart 2019-12-12 10:14:56 UTC
Created attachment 96215 [details] [review]
Bug 23243: Adjust previous patch
Comment 6 Jonathan Druart 2019-12-12 10:16:33 UTC
*** Bug 12452 has been marked as a duplicate of this bug. ***
Comment 7 Katrin Fischer 2020-01-03 07:25:35 UTC
I can see the point of this change and agree with it, but wonder if it really makes things clearer to the end user: What is a historic expiration? (and how to translate that...)

Wondering if usability wise this would be a better solution:

Provide 2 date fields: 

Expired between (preset to today) 
And ____

Or maybe instead of 'history expirations' we should say: 

Include expirations before today.

The date logic on the form is a bit hard to grasp in training in my experience.

QA tools are clean now.
Comment 8 Katrin Fischer 2020-05-23 12:43:38 UTC
Hi Martin, could you please take a look at my last comment?
Comment 9 Martin Renvoize 2020-06-02 14:25:45 UTC
I'm OK with `Include expirations before today.`  Seems like a simple change; I'm less sure about expanding it to two inputs, I think that adds more complexity to the patch than is really required here.
Comment 10 Martin Renvoize 2020-06-02 14:27:40 UTC
Created attachment 105491 [details] [review]
Bug 23243: Restore filtering out historic expired subscriptions

The 'Check Expiration' page in Serials is now hardcoded to display all
expired subscriptions before the entered date. This patch restores the
ability to limit the results to just those expiring between 'today'
and the date entered.

Original code taken from bug 6968 autored by Maxime Pelletier, rebased
by Charles Farmer and then moved to a new report and rebased again by
Martin Renvoize.

Test plan:
1) Without the patch any results after a search from this page will
   result in matches both before after todays date (but before the date
   you entered).
2) With the patch you should see a 'Show historic expirations' checkbox
   which will allow you to limit the results to just those that expire
   between the date you enter and today.

Sponsored-by: CCSR
Rescued-by: Charles Farmer <charles.farmer@inlibro.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2020-06-02 14:27:44 UTC
Created attachment 105492 [details] [review]
Bug 23243: Adjust previous patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2020-06-02 14:27:48 UTC
Created attachment 105493 [details] [review]
Bug 23243: (follow-up) Update wording as requested
Comment 13 Séverine Queune 2021-04-02 15:20:41 UTC
Created attachment 119129 [details] [review]
Bug 23243: Restore filtering out historic expired subscriptions

The 'Check Expiration' page in Serials is now hardcoded to display all
expired subscriptions before the entered date. This patch restores the
ability to limit the results to just those expiring between 'today'
and the date entered.

Original code taken from bug 6968 autored by Maxime Pelletier, rebased
by Charles Farmer and then moved to a new report and rebased again by
Martin Renvoize.

Test plan:
1) Without the patch any results after a search from this page will
   result in matches both before after todays date (but before the date
   you entered).
2) With the patch you should see a 'Show historic expirations' checkbox
   which will allow you to limit the results to just those that expire
   between the date you enter and today.

Sponsored-by: CCSR
Rescued-by: Charles Farmer <charles.farmer@inlibro.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 14 Séverine Queune 2021-04-02 15:20:45 UTC
Created attachment 119130 [details] [review]
Bug 23243: Adjust previous patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 15 Séverine Queune 2021-04-02 15:20:49 UTC
Created attachment 119131 [details] [review]
Bug 23243: (follow-up) Update wording as requested

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 16 Katrin Fischer 2021-04-18 10:01:38 UTC
Created attachment 119826 [details] [review]
Bug 23243: Restore filtering out historic expired subscriptions

The 'Check Expiration' page in Serials is now hardcoded to display all
expired subscriptions before the entered date. This patch restores the
ability to limit the results to just those expiring between 'today'
and the date entered.

Original code taken from bug 6968 autored by Maxime Pelletier, rebased
by Charles Farmer and then moved to a new report and rebased again by
Martin Renvoize.

Test plan:
1) Without the patch any results after a search from this page will
   result in matches both before after todays date (but before the date
   you entered).
2) With the patch you should see a 'Show historic expirations' checkbox
   which will allow you to limit the results to just those that expire
   between the date you enter and today.

Sponsored-by: CCSR
Rescued-by: Charles Farmer <charles.farmer@inlibro.com>
Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2021-04-18 10:01:43 UTC
Created attachment 119827 [details] [review]
Bug 23243: Adjust previous patch

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2021-04-18 10:01:48 UTC
Created attachment 119828 [details] [review]
Bug 23243: (follow-up) Update wording as requested

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Jonathan Druart 2021-04-21 13:29:38 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 20 Fridolin Somers 2021-04-29 13:26:23 UTC
Enhancement not pushed to 20.11.x