Bug 13030 - Show hold expiration date for waiting holds on circulation.pl
Summary: Show hold expiration date for waiting holds on circulation.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 13851
Blocks: 13853
  Show dependency treegraph
 
Reported: 2014-10-06 13:43 UTC by Kyle M Hall
Modified: 2016-12-05 21:23 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl (4.97 KB, patch)
2014-10-06 14:00 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl (5.00 KB, patch)
2014-10-08 16:43 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl (5.16 KB, patch)
2014-10-29 18:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl (5.11 KB, patch)
2015-06-09 16:34 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl (5.29 KB, patch)
2015-06-09 17:36 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13030 [QA Followup] - Fix unit testsBug 13030 [QA Followup] - Fix unit tests (2.00 KB, patch)
2015-06-19 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13030 [QA Followup] - Fix unit tests (1.96 KB, patch)
2015-06-19 15:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl (5.36 KB, patch)
2015-06-19 16:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13030: Remove the unnecessary double call (1.50 KB, patch)
2015-06-19 16:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2014-10-06 13:43:28 UTC
We should show the date a waiting hold is set to expire for each hold in the list of waiting holds in circulation.pl
Comment 1 Kyle M Hall 2014-10-06 14:00:51 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2014-10-08 16:43:15 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2014-10-25 13:06:24 UTC
I'm unable to apply this patch to my devel Git repository, with a very strange error message:

  fatal: sha1 information is lacking or useless (Koha/Hold.pm).
Comment 4 Owen Leonard 2014-10-25 15:21:23 UTC
(In reply to Frédéric Demians from comment #3)
>   fatal: sha1 information is lacking or useless (Koha/Hold.pm).

This usually means you didn't apply a dependent patch first.
Comment 5 Owen Leonard 2014-10-29 18:02:30 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2014-10-29 21:51:56 UTC
Needs 12892 and 13019.
Comment 7 Chris Cormack 2014-11-15 06:08:02 UTC
Since 12892 was rewritten to not depend on 13019, this bug is no longer blocked
Comment 8 Katrin Fischer 2014-11-16 09:32:16 UTC
Patch won't apply - is it possible it relies on code from one of the other solutions for the waiting holds bug?
Comment 9 Kyle M Hall 2014-11-21 17:52:41 UTC
(In reply to Chris Cormack from comment #7)
> Since 12892 was rewritten to not depend on 13019, this bug is no longer
> blocked

I'm afraid instead of removing the block, it's broken the patch entirely! I'll have to fix it up.
Comment 10 Jonathan Druart 2015-04-17 08:21:29 UTC
This patch is blocked for QA by bug 13851, please reintroduce it in the QA queue when it will be ready.
Comment 11 Katrin Fischer 2015-06-08 10:59:39 UTC
We need to get bug 13851 signed off first in order to continue here.
Comment 12 Kyle M Hall 2015-06-09 16:34:26 UTC Comment hidden (obsolete)
Comment 13 Kyle M Hall 2015-06-09 17:36:56 UTC Comment hidden (obsolete)
Comment 14 Jonathan Druart 2015-06-16 12:40:37 UTC
Do the tests pass for you?

I get the following errors:

t/Hold.t .. 2/5 DBIx::Class::Storage::DBI::_warn_undetermined_driver(): This version of DBIC does not yet seem to supply a driver for your particular RDBMS and/or connection method ('Mock'). While we will attempt to continue anyway, the results are likely to be underwhelming. Please upgrade DBIC, and if this message does not go away, file a bugreport including the following info:
{
  DBD => "DBD::Mock",
  DBD_VER => "1.45",
  DBIC_DRIVER => "DBIx::Class::Storage::DBI",
  DBIC_DSN => sub {
      package Koha::Database;
      use warnings;
      use strict;
      use feature 'say', 'state', 'switch', 'unicode_strings';
      'C4::Context'->dbh;
  },
  DBIC_VER => "0.082810",
  DBI_VER => "1.631"
}
DBIx::Class::Storage::DBI::sql_maker(): Your storage class (DBIx::Class::Storage::DBI) does not set sql_limit_dialect and you have not supplied an explicit limit_dialect in your connection_info. DBIC will attempt to use the GenericSubQ dialect, which works on most databases but can be (and often is) painfully slow. Please file an RT ticket against 'DBIx::Class::Storage::DBI' at Koha/Objects.pm line 85
Comment 15 Kyle M Hall 2015-06-19 15:33:11 UTC Comment hidden (obsolete)
Comment 16 Kyle M Hall 2015-06-19 15:33:56 UTC Comment hidden (obsolete)
Comment 17 Jonathan Druart 2015-06-19 15:53:28 UTC
Comment on attachment 40038 [details] [review]
[SIGNED-OFF] Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl

Review of attachment 40038 [details] [review]:
-----------------------------------------------------------------

::: koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ +775,4 @@
>  
>                                  <br/>
>                                  [% IF ( w.branch.branchcode == Branches.GetLoggedInBranchcode()  ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]
> +                                    Waiting at [% w.branch.branchname | html %] [% IF w.waiting_expires_on %] until [% w.waiting_expires_on | $KohaDates %] [% END %]

Sorry, I didn't see that before: there are 2 calls to the waiting_expires_on method.
It is easy to make only 1 call.
Comment 18 Jonathan Druart 2015-06-19 16:09:00 UTC
Created attachment 40414 [details] [review]
Bug 13030 - Show waiting hold expiration date for waiting holds on circulation.pl

We should show the date a waiting hold is set to expire for each hold in
the list of waiting holds in circulation.pl

Test Plan:
1) Apply this patch
2) Find a waiting hold for a patron, browser to circulation.pl
   for that patron
3) Set system preference ReservesMaxPickUpDelay to 5
4) Refresh circulation.pl, note the waiting holds now display a
   "waiting until" part with the waiting date plus 5 days
5) Set system preference ReservesMaxPickUpDelay to 0 ( or empty
   string )
6) Refresh circulation.pl, note the waiting hols no longer have a
   "waiting until" line.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Followed test plan successfully. Automated tests successful.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Cathi Wiggins <CWIGGINS@ci.arcadia.ca.us>

Signed-off-by: Megan Wianecki <mwianecki@mplmain.mtpl.org>

Bug 13030 [QA Followup] - Fix unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 19 Jonathan Druart 2015-06-19 16:09:07 UTC
Created attachment 40415 [details] [review]
Bug 13030: Remove the unnecessary double call

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Comment 20 Jonathan Druart 2015-06-19 16:09:48 UTC
I have squashed the 2 patches to avoid the add/del of a file in the same patch set.
Comment 21 Tomás Cohen Arazi 2015-08-11 18:17:21 UTC
Patches pushed to master.

Thanks Kyle!