Bug 12450 - Closing libraries for the summer
Summary: Closing libraries for the summer
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Bugs List
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 8133 11211
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-18 23:10 UTC by Christopher Brannon
Modified: 2019-06-03 07:49 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
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.