Bug 18547

Summary: On shelf holds allowed > "If all unavailable" ignores default hold policy
Product: Koha Reporter: Mirko Tietgen <mirko>
Component: Hold requestsAssignee: Mirko Tietgen <mirko>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: costalc, gmcharlt, jonathan.druart, katrin.fischer, m.de.rooy, nick
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18015
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18366
Whiteboard:
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:
Attachments: Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default hold policy
Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default hold policy

Comment 1 Mirko Tietgen 2017-05-05 07:55:47 UTC
Created attachment 63157 [details] [review]
Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default hold policy

If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable",
default hold policy "From home library" is ignored.

Test plan:

- Have a test user from one branch (eg Centerville)

- Set "On shelf holds allowed" to "If all unavailable" for your patron and item
  category (or everyone and everything)
- For "Default checkout, hold and return policy", set hold policy to "From home library"
  -> make sure there is no "Default holds policy by item type" to override the setting

- Have two items for a record.
  1. An item with home branch same as test user (eg Centerville)
  -> check this item out to somebody else
  2. an item with a different home branch (eg Fairfield)
  -> available, not checked out
- Try to place a hold for your test user. Does not work.

- Apply the patch
- Try to place a hold. Should work now.
Comment 2 Alex Buckley 2017-05-07 13:53:54 UTC
Created attachment 63227 [details] [review]
Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default hold policy

If in the circ rules matrix you set "On shelf holds allowed" to "If all unavailable",
default hold policy "From home library" is ignored.

Test plan:

- Have a test user from one branch (eg Centerville)

- Set "On shelf holds allowed" to "If all unavailable" for your patron and item
  category (or everyone and everything)
- For "Default checkout, hold and return policy", set hold policy to "From home library"
  -> make sure there is no "Default holds policy by item type" to override the setting

- Have two items for a record.
  1. An item with home branch same as test user (eg Centerville)
  -> check this item out to somebody else
  2. an item with a different home branch (eg Fairfield)
  -> available, not checked out
- Try to place a hold for your test user. Does not work.

- Apply the patch
- Try to place a hold. Should work now.

Followed test plan, worked as intended
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Comment 3 Claudio 2017-05-07 19:20:50 UTC
I tested it in a local installation (16.11.07) but can not make it works...

(see #18366)
Comment 4 Claudio 2017-05-10 14:43:09 UTC
(In reply to Alex Buckley from comment #2)
> Created attachment 63227 [details] [review] [review]
> Bug 18547 - On shelf holds allowed > "If all unavailable" ignores default
> hold policy
> 
> If in the circ rules matrix you set "On shelf holds allowed" to "If all
> unavailable",
> default hold policy "From home library" is ignored.
> 
> Test plan:
> 
> - Have a test user from one branch (eg Centerville)
> 
> - Set "On shelf holds allowed" to "If all unavailable" for your patron and
> item
>   category (or everyone and everything)
> - For "Default checkout, hold and return policy", set hold policy to "From
> home library"
>   -> make sure there is no "Default holds policy by item type" to override
> the setting
> 
> - Have two items for a record.
>   1. An item with home branch same as test user (eg Centerville)
>   -> check this item out to somebody else
>   2. an item with a different home branch (eg Fairfield)
>   -> available, not checked out
> - Try to place a hold for your test user. Does not work.
> 
> - Apply the patch
> - Try to place a hold. Should work now.
> 
> Followed test plan, worked as intended
> Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Alex, this is a great fix but does not work. I cannot figure the reason...
Comment 5 Mirko Tietgen 2017-05-10 15:01:31 UTC
(In reply to Claudio from comment #4)

> Alex, this is a great fix but does not work. I cannot figure the reason...

We use this patch in production and it works. Maybe you have another problem related to this feature which is not covered by the patch.
Comment 6 Claudio 2017-05-10 17:58:35 UTC
(In reply to Mirko Tietgen from comment #5)
> (In reply to Claudio from comment #4)
> 
> > Alex, this is a great fix but does not work. I cannot figure the reason...
> 
> We use this patch in production and it works. Maybe you have another problem
> related to this feature which is not covered by the patch.

Thanks Mirko!

I noticed that changing ReservesControlBranch syspref to "item's home library" the fix works (in my Koha installation ReservesControlBranch was set to "patron's home library"). Is it right?
Comment 7 Jonathan Druart 2017-05-11 15:49:02 UTC
Any chances to see tests covering this change?
Comment 8 Marcel de Rooy 2017-05-19 09:49:11 UTC
(In reply to Jonathan Druart from comment #7)
> Any chances to see tests covering this change?

Changing status.
Comment 9 Katrin Fischer 2017-08-17 11:27:23 UTC
Any chance to get this moving again? I think this is one of the things that a lot of libraries would like.
Comment 10 Katrin Fischer 2017-08-17 13:39:27 UTC
*** Bug 18366 has been marked as a duplicate of this bug. ***