Bug 11481 - new reservation syspref HoldOnlyWhenAllItemsOnLoan
Summary: new reservation syspref HoldOnlyWhenAllItemsOnLoan
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Koha Team University Lyon 3
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 11482
  Show dependency treegraph
 
Reported: 2014-01-06 17:23 UTC by Koha Team University Lyon 3
Modified: 2017-05-23 19:55 UTC (History)
7 users (show)

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


Attachments
Bug-11481-HoldOnlyWhenAllItemsOnLoan-new-syspref.patch (8.55 KB, patch)
2014-01-06 17:36 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 11481 HoldOnlyWhenAllItemsOnLoan new syspref (8.54 KB, patch)
2014-01-15 14:21 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 11481 HoldOnlyWhenAllItemsOnLoan new syspref (8.54 KB, patch)
2014-03-11 14:40 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2014-01-06 17:23:10 UTC
This new syspref sets the following behavior about reserves :
When enabled, placing hold is possible only if all the items potentially holdable of a record are on loan. By "potentially holdable", we mean these which can be reserved according to circulation rules and have neither notforloan, withdrawn, lost, nor damaged status.

Test Plan :

1) Enable RequestOnOpac and HoldOnlyWhenAllItemsOnLoan sysprefs
2) Choose one borrower (patron1) to place holds : get his category, login and pasword.
 3) Go to Administration/Circulation and fine rules.
4) in the ALL libraries table (selected by default) set a circulation rule for the borrower category adding an amount of holds in "Holds allowed" column
For a beginning , you can set only one rule with itemtype as All or several rules with different item type.
5) In the pro interface, choose a record with some items : you can choose a notforloan status for one, set an itemtype with a circ rule without holds allowed for another etc.
6) Check out on your count as much items of this record as it's possible.
Do not forget to change branch to checkout the items from their homebranch.
7) go to opac and search for the detailed record
8) You do not see the Place hold button yet : you must first authenticate yourself as patron1 to make it appear.
Then you can pursue the Placing hold process as usual.
9) reconnect as admin and go to pro interface , search for the detailed record
10) click the Holds tab and enter patron1 in text box
11) the usual form appears :  you can choose there the pickup location and select a specific item in the items table.
12) Now, check in one of the items and go back to opac detailed record
13) Even if you are already authentified  (as patron1), the "Place hold" icon is no more visible (hold is no more possible)
14) reconnect as admin and go back in the pro interface to the detailed record
15) Enter patron1 again in patron textbox :
the "Cannot place hold message" displayed with the following explanation : 
             "All reservable items of the record must be on loan"
Comment 1 Koha Team University Lyon 3 2014-01-06 17:36:37 UTC Comment hidden (obsolete)
Comment 2 Aurélie Fichot 2014-01-10 13:48:19 UTC
I do the test plan but I always see the Place hold button...
:-((((
Comment 3 Koha Team University Lyon 3 2014-01-15 14:21:47 UTC Comment hidden (obsolete)
Comment 4 jmbroust 2014-03-11 13:09:21 UTC
<h1>Something went wrong !</h1>Applying: Bug 11481 HoldOnlyWhenAllItemsOnLoan
new syspref
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging C4/Reserves.pm
Auto-merging installer/data/mysql/sysprefs.sql
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
Auto-merging opac/opac-detail.pl
Auto-merging reserve/request.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 11481 HoldOnlyWhenAllItemsOnLoan new syspref
When you have resolved this problem run git bz apply --continue.
If you would prefer to skip this patch, instead run git bz apply --skip.
To restore the original branch and stop patching run git bz apply --abort.
Bug 11481 - new reservation syspref HoldOnlyWhenAllItemsOnLoan

24397 - Bug 11481 HoldOnlyWhenAllItemsOnLoan new syspref
Comment 5 Koha Team University Lyon 3 2014-03-11 14:40:34 UTC
Created attachment 26112 [details] [review]
Bug 11481 HoldOnlyWhenAllItemsOnLoan new syspref

patch rebased
Comment 6 michot 2014-03-12 11:54:18 UTC
Tests done today on sandbox :

It seems Ok when there is only one item type on the the same record :

1 item available + 1 item on a notforloan statu
= Opac : no hold button (when patron is authentificated)
= Staff : Alert message ( with possibility to overstep) but wrong text « Cannot place hold : to many holds »)

1 item On loan + 1 item on a notforloan statu
= Opac : hold button (when patron is authentificated)
= Staff : hold OK

1 item available + 1 item on a notforloan statu + 1 item lost
= Opac : no hold button (when patron is authentificated)
= Staff : Alert message ( with possibility to overstep) but wrong text « Cannot place hold : to many holds »)

1 item on a notforloan statu + 1 item lost
= Opac : no hold button (when patron is authentificated)
= Staff : No alert message ( with possibility to overstep)

1 item available in another library + 1 item on a notforloan statu 
= Opac : no hold button (when patron is authentificated)
= Staff : Alert message ( with possibility to overstep) but wrong text « Cannot place hold : to many holds »)

1 item available in transfer + 1 item on a notforloan statu 
= Opac : no hold button (when patron is authentificated)
= Staff : Staff : Alert message ( with possibility to overstep) but wrong text « Cannot place hold : to many holds »)


When there is 2 different itemtypes on the same record, one of which with a circ rule without holds allowed :
- 1 item available (with holds allowed) + 1 item available (with NO holds allowed) 
= Opac : no hold button (when patron is authentificated)
	= Staff : 2 Alert messages( with possibility to overstep) : one with wrong text « Cannot place hold : to many holds ») + one with good text « All reservable items of the record must be on loan »

- 1 item on loan (with holds allowed) + 1 item available (with NO holds allowed) 
= Opac : no hold button (when patron is authentificated)
ERROR : patron could hold cause the only item hold allowed is on loan
	= Staff : 2 Alert messages( with possibility to overstep) : one with wrong text « Cannot place hold : to many holds ») + one with good text « All reservable items of the record must be on loan »

 

Conclusion : we don't sign off because of the last case
Comment 7 Koha Team University Lyon 3 2014-03-20 17:09:16 UTC
(In reply to michot from comment #6)
> Tests done today on sandbox :
> 
> It seems Ok when there is only one item type on the the same record :
> 
> 1 item available + 1 item on a notforloan statu
> = Opac : no hold button (when patron is authentificated)
> = Staff : Alert message ( with possibility to overstep) but wrong text «
> Cannot place hold : to many holds »)
> 
> 1 item On loan + 1 item on a notforloan statu
> = Opac : hold button (when patron is authentificated)
> = Staff : hold OK
> 
> 1 item available + 1 item on a notforloan statu + 1 item lost
> = Opac : no hold button (when patron is authentificated)
> = Staff : Alert message ( with possibility to overstep) but wrong text «
> Cannot place hold : to many holds »)
> 
> 1 item on a notforloan statu + 1 item lost
> = Opac : no hold button (when patron is authentificated)
> = Staff : No alert message ( with possibility to overstep)
> 
> 1 item available in another library + 1 item on a notforloan statu 
> = Opac : no hold button (when patron is authentificated)
> = Staff : Alert message ( with possibility to overstep) but wrong text «
> Cannot place hold : to many holds »)
> 
> 1 item available in transfer + 1 item on a notforloan statu 
> = Opac : no hold button (when patron is authentificated)
> = Staff : Staff : Alert message ( with possibility to overstep) but wrong
> text « Cannot place hold : to many holds »)
> 
> 
> When there is 2 different itemtypes on the same record, one of which with a
> circ rule without holds allowed :
> - 1 item available (with holds allowed) + 1 item available (with NO holds
> allowed) 
> = Opac : no hold button (when patron is authentificated)
> 	= Staff : 2 Alert messages( with possibility to overstep) : one with wrong
> text « Cannot place hold : to many holds ») + one with good text « All
> reservable items of the record must be on loan »
> 
> - 1 item on loan (with holds allowed) + 1 item available (with NO holds
> allowed) 
> = Opac : no hold button (when patron is authentificated)
> ERROR : patron could hold cause the only item hold allowed is on loan
> 	= Staff : 2 Alert messages( with possibility to overstep) : one with wrong
> text « Cannot place hold : to many holds ») + one with good text « All
> reservable items of the record must be on loan »
> 
>  
> 
> Conclusion : we don't sign off because of the last case

Can you give more details about the hold rules (hold for all libraries,
( rule for a specific library, hold policy for such library, holds policy by item ? ) and the level of itype (syspref item-level_itypes) you applied for your test because I don't get this error in my tests.

Olivier Crouzet
Comment 8 michot 2014-04-12 15:54:34 UTC
Sorry
but I don't accede to any sandbox, so i can't look at the rules
Comment 9 Koha Team University Lyon 3 2014-04-24 13:13:34 UTC
I drop this patch.
Comment 10 Josef Moravec 2017-05-23 19:55:15 UTC
We have this functionality - it can be set up on circulation rules page