]> git.evergreen-ils.org Git - Evergreen.git/commit
Fix shelf_expire_time closed date overlap test
authorJason Etheridge <jason@esilibrary.com>
Sat, 7 Jan 2012 02:02:06 +0000 (18:02 -0800)
committerMike Rylander <mrylander@gmail.com>
Tue, 10 Jan 2012 18:30:09 +0000 (13:30 -0500)
commit9be1f5e4e48cd9e9d0e670988b640a409aa76c3f
treeb28f7acc00b3c1acfefd74a5b6725db7dfb43584
parent86a7abec412afe4f348e53c5a449c599c3648319
Fix shelf_expire_time closed date overlap test

One-liner courtesy of berick.

* Steps to test

This is time and timezone sensitive, so on the server:

Change your timezone to America/Los Angeles: sudo dpkg-reconfigure tzdata
Stop your NTP server: sudo /etc/init.d/ntp stop
Set the time to 5pm: sudo date --set 17:00:00

Stop Evergreen, Restart Postgres, Start Evergreen

On the client:

Make sure the timezone is set to Pacific time.

1) Change the Library Setting "Default hold shelf expire interval" in the Holds group to have a value of "7 days" (without the quotes) for org BR1 (or if there is an existing value, you can keep it).

2) Create a bib with one item: htest1  (Status of Available)

3) Place a title level hold on the bib

4) Check in htest1 (it should get captured for the hold)

5) Browse the Hold Shelf and note the Shelf Expire Time for the hold that captured htest1 (it should be a week from now, unless you already have a conflicting closed date configured)

6) Cancel the hold and re-check-in htest1 (to remove the Hold Shelf status)

7) In the Closed Dates Editor, Add Single Day Closing for the date noticed previously in the Shelf Expire Time for BR1.

8) Place a title level hold on the bib

9) Check in htest1 (it should get captured for the hold)

10) Browse the Hold Shelf and note the Shelf Expire Time for the hold that captured htest1 (now the bug is illustrated if you get the same date for Shelf Expire Time as you did before, since that day is now a Closed Date and should be skipped over.  The patch should fix this.)

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm