[Bug 17865] New: If a subscription has no history end date, it shows as expired today in OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Bug ID: 17865 Summary: If a subscription has no history end date, it shows as expired today in OPAC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com If there is no subscription histenddate (NULL) in subscriptionhistory, the subscription will show as expired today in the OPAC. I think this happens becasue of this bit in GetSubscriptionsFromBiblionumber: 451 if ( $subs->{enddate} eq '0000-00-00' ) { 452 $subs->{enddate} = ''; 453 } else { 454 $subs->{enddate} = output_pref( { dt => dt_from_string( $subs->{enddate}), dateonly => 1 } ); 455 } I am not sure why this appears to return the current date, but it seems a good candidate to start the search. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Where is it displayed? On opac-detail I see "Subscription from: 01/01/2017 to: now (current)" -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Ok click on "More details" and arrived on /opac-serial-issues.pl Since 3.00.00.106 we should not have 0000-00-00 anymore in subscription.enddate, so 451 if ( $subs->{enddate} eq '0000-00-00' ) { should be 451 if ( not defined $subs->{enddate} ) { -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #3 from Luke Honiss <luke.honiss@gmail.com> --- Created attachment 59049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59049&action=edit Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' fixed --TEST PLAN-- 1. Find a record in the OPAC with a serial subscription 2. Check more details under subscription tab 3. The expiration date should be incorrect 4. Apply patch 5. Reload and now the expiration date should now be correct -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Luke Honiss <luke.honiss@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Luke Honiss <luke.honiss@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59049|0 |1 is obsolete| | --- Comment #4 from Luke Honiss <luke.honiss@gmail.com> --- Created attachment 59050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59050&action=edit Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' fixed --TEST PLAN-- 1. Find a record in the OPAC with a serial subscription 2. Check more details under subscription tab 3. The expiration date should be incorrect 4. Apply patch 5. Reload and now the expiration date should now be correct -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure why, but Jonathan's suggested change doesn't seem to do the trick: For the subscription without history end date, it still shows the current date in the OPAC for me. For a subscription with an end date in the past, the display is correct. For a subscription end date in the future, the note shows as well. I have restarted Plack to make sure that's not the problem. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Actually it's histenddate that is displayed, not enddate. Katrin, what's the expected behaviour? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- You are right, I was not clear in my description, we are always talking about the history end date here. If it's empty, it should not display the subscription as expired - that still happened to my surprised when I applied the patch. I was wondering if we should also check for a subscription history end date in the future, but that seems outside of scope here. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Luke Honiss <luke.honiss@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Luke Honiss <luke.honiss@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59050|0 |1 is obsolete| | --- Comment #8 from Luke Honiss <luke.honiss@gmail.com> --- Created attachment 59179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59179&action=edit Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' fixed --TEST PLAN-- 1) View a subscription with no history end date 2) Search for an item with a subcription in OPAC 3) Under subscription tab click more details 4) The end date will be the current date 5) Apply patch and refresh 6) The end date will be replaced with a message -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This is much better, I think the date checking now works correctly. I have a bit worried that patrons won't know what "The subscription has no history end date" means. If the date is empty, it means that the subsription is possibly still active - I think it would be better not to display something in this case. What do you think? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Luke Honiss <luke.honiss@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luke.honiss@gmail.com --- Comment #10 from Luke Honiss <luke.honiss@gmail.com> --- I thought it may be a bit confusing. In the staff checkout it shows a similar field as being blank, but having the title for that field is "History end date" which is why I put the message as that. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think for the librarians it probably makes sense - more or less. Serials is one of the more complicated modules of Koha. I think for the patrons it might be confusing, that's why I think maybe only show the expired message, but not the other message. I was also pondering to rephrase it to something like "The library still subscribes to this serial", but I am not sure if the history end date is always set if a subscription is not renewed - so that might not be right in all cases. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #12 from Luke Honiss <luke.honiss@gmail.com> --- I'll just remove the line. There should hopefully be no confusion that way -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Luke Honiss <luke.honiss@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #13 from Luke Honiss <luke.honiss@gmail.com> --- Created attachment 59199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59199&action=edit Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' --TEST PLAN-- 1) View a subscription with no history end date 2) Search for an item with a subcription in OPAC 3) Under subscription tab click more details 4) The end date will be the current date 5) Apply patch and refresh 6) The end date will not be shown -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |luke.honiss@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59179|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #14 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 59199 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=59199 Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' Review of attachment 59199: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17865&attachment=59199) ----------------------------------------------------------------- My concern with the conditions modified is the poor date handling of MySQL. Sometimes unset dates were 0000-00-00, sometimes they were null. When and how aren't the issue, but for those still using MySQL 5.5 in less than strict mode, defined might not be sufficient. In MySQL 5.7 or strict mode, defined is perfectly okay. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The installation I have seen this in was using Debian, so I think the less strict MySQL and all the dates were empty, not invalid ones. I think it should be ok. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #16 from Baptiste <baptiste.wojtkowski@biblibre.com> --- Created attachment 60430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60430&action=edit [SIGNED OFF] Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' --TEST PLAN-- 1) View a subscription with no history end date 2) Search for an item with a subcription in OPAC 3) Under subscription tab click more details 4) The end date will be the current date 5) Apply patch and refresh 6) The end date will not be shown Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #59199|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Baptiste <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60430|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 60453 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60453&action=edit Bug 17865 'If a subscription has no history end date, it shows as expired today in OPAC' --TEST PLAN-- 1) View a subscription with no history end date 2) Search for an item with a subcription in OPAC 3) Under subscription tab click more details 4) The end date will be the current date 5) Apply patch and refresh 6) The end date will not be shown Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Note that this patch also fixes the same problem on /serials/serial-issues.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #19 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Luke! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This patch has been pushed to 16.11.x and will be in 16.11.04. Thx Luke! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com --- Comment #21 from Mason James <mtj@kohaaloha.com> --- Pushed to 16.05.x, for 16.05.10 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17865 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #22 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.18 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org