Bug 12450 - Easily close a branch
Summary: Easily close a branch
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: master
Hardware: All All
: P3 new feature with 10 votes (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 12090 (view as bug list)
Depends on: 8133 11211
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-18 23:10 UTC by Christopher Brannon
Modified: 2024-03-15 18:32 UTC (History)
16 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2014-06-18 23:10:25 UTC
Currently, there is no way to close a library in Koha for a specified period of time.  A good example for this is when we have public schools closed for the summer.  We should not be able to place holds on their items or use their location as a pickup location.

Right now, we have to do several things to accomplish this.

First, we have set the default rule for the closed library to "No holds allowed".

Next we have to remove the library from all staff pickup locations listed with jquery:

$("#pickup option[value='SILVERHILL'],select[name='pickup'] option[value='SILVERHILL']").hide();

Then we have to do the same for the OPAC:

$("option[value='SILVERHILL']").hide();

But then we also have to warn the patron that they can't pick up at their library, and then change the default to another library.  Otherwise, it will still set their library as the pickup location, even though the choice is hidden in the list:

if($("select[name='branch'] :selected").val() =="SILVERHILL") {
alert("Your home branch is closed for the summer.  Please select a different pickup location.");
$("select[name='branch'] option:contains('Wallace Library')").prop("selected",true);
};

If we don't change the default selection and the patron places the hold with their library as the pickup location, the hold ends up in limbo.  It doesn't show on a queue anywhere!

It isn't necessary, but should be done for the staff side as well.  Right now we don't, because the pickup location defaults to the logged in library.  Our closed libraries would not be logged in at this time.  But, ideally it should be done to prevent issues.

Ideally, I would like to see a setting in the libraries or calendars that would do all of this.

Christopher
Comment 1 Magnus Enger 2014-06-19 06:15:38 UTC
Hi! 

I'm working on exactly these same things at the moment, for Oslo Public Library. Do you plan to work on this, or is it more of a wishlist? Either way I'd be happy to collaborate. :-)
Comment 2 Christopher Brannon 2014-06-19 14:28:34 UTC
> Do you plan to work on this, or is it more of a wishlist? Either
> way I'd be happy to collaborate. :-)

This is a wish list.  I have no skills in writing patches at this point.

Christopher
Comment 3 Magnus Enger 2014-06-24 06:25:39 UTC
I'm starting to work on this now. I'll link to some code and a demo in a day or two.
Comment 4 Christopher Brannon 2014-12-04 19:42:35 UTC
(In reply to Magnus Enger from comment #3)
> I'm starting to work on this now. I'll link to some code and a demo in a day
> or two.

Checking to see whatever came of this.  :)
Comment 5 Magnus Enger 2014-12-05 08:59:15 UTC
(In reply to Christopher Brannon from comment #4)
> Checking to see whatever came of this.  :)

Thanks for checking! :-) I have been working on this, but I started out in the wrong direction so things have taken longer than expected. 

Another obstacle is that bug 11211 and bug 8133 change a lot of code in relevant areas of Koha, so I have been trying to push those forward before I really start working on the present bug.
Comment 6 Johanna Räisä 2019-05-31 10:29:04 UTC
Lot of work for closing a library for a period of time. Could this be only a single preference in libraries, probably the easiest way than try to add this to calendar?
Comment 7 Christopher Brannon 2019-06-01 17:06:04 UTC
(In reply to Johanna Räisä from comment #6)
> Lot of work for closing a library for a period of time. Could this be only a
> single preference in libraries, probably the easiest way than try to add
> this to calendar?

That was one of the suggestions in the first comment.
Comment 8 Magnus Enger 2019-06-03 07:49:10 UTC
(In reply to Magnus Enger from comment #5)
> (In reply to Christopher Brannon from comment #4)
> > Checking to see whatever came of this.  :)
> 
> Thanks for checking! :-) I have been working on this, but I started out in
> the wrong direction so things have taken longer than expected. 

I should probably say that I never got any useful results for this, and I am not working on it any longer.
Comment 9 Katrin Fischer 2020-01-05 14:39:15 UTC
*** Bug 12090 has been marked as a duplicate of this bug. ***
Comment 10 Christopher Brannon 2020-06-26 18:32:34 UTC
Just an update on this.  We have been able to transition away from using jQuery to block pickup locations.  At some point we discovered the preference under the library settings that allow us to turn the pickup location on and off.  So, this simplified things.

I don't know at this point, if the patron's pickup location is turned off, if they are warned that their pickup location has changed, when they place a hold.  Also, what does this do for items that are already on hold with that pickup location specified?  To my knowledge, the setting only affects selecting that location on new holds.  Those current holds are stuck in limbo.

I do think that a lot of pieces are in place.  Ideally, it would be great if there was a closure tool that set several of these pieces for you:

* Do you want to mark the location as closed?
  - From what date to what date?
* Do you want the pickup location turned off during this time?
  - This should turn off the pickup location, and then back to the prior state, based on the schedule above.
* Do you want patrons to be able to place holds on these items?
  - This should set the default hold policy for this library and then return to prior state, according to the schedule above.
* Do you want items to return to this library or to another library?
  - Set to new library and then prior state, according to the schedule above.
* Do you want circulation rules set with a hard due date?
  - Set to new condition, then prior state, according to the schedule above.
* Do you want a news announcement made?
  - Set new message that is set and expires according to the schedule above.

Those are just some things I can think of.  All of these are things that we can do, manually.  You just have to remember to do them all.  If there was a page that guided you through this process, showed you schedules that have been set to do all of these things, this would be a great enhancement.
Comment 11 Martha Fuerst 2020-08-12 15:55:31 UTC
We have had to do a version of this process when we have closed branches for periods of time, it's always been very checklist heavy. This would be a great, efficient way to do it.
Comment 12 Michael Adamyk 2021-12-09 17:33:47 UTC
+1
Comment 13 Christopher Brannon 2022-07-28 17:19:41 UTC
I think ideally this should be set through the calendar.  If you block a time that a library is closed, when you specify that it is closed, it presents you with the previous checklist and you fill out what you need.

Thoughts?  Ideas?