Bug 9206

Summary: Only allow place holds in records that the patron don't have in his possession
Product: Koha Reporter: Vitor Fernandes <vfernandes>
Component: Hold requestsAssignee: Vitor Fernandes <vfernandes>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: new feature    
Priority: P1 - high CC: anthony.laquerre, chris, gmcharlt, jonathan.druart, katrin.fischer, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 16260    
Attachments: BUG 9206 - Only allow place holds in records that the patron don't have in his possession
[SIGNED-OFF] Bug 9206 - Only allow place holds in records that the patron don't have in his possession
Bug 9206 - Only allow place holds in records that the patron don't have in his possession - QA Followup
Bug 9206 - Only allow place holds in records that the patron don't have in his possession
Bug 9206 - Only allow place holds in records that the patron don't have in his possession - QA Followup
Bug 9206: Followup QA FIX

Description Vitor Fernandes 2012-12-04 10:17:02 UTC
The idea is to check if the patron have any document of the record that he is trying to place hold.
This verification will be done almost ate the same time than if book can be reserved and item can be reserved by the patron.
There will be a system preference to turn on/off this verification (AllowHoldsOnPatronsPossessions or something like that).
Comment 1 Vitor Fernandes 2012-12-04 15:58:36 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2012-12-14 14:34:13 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2012-12-14 14:34:29 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2012-12-14 14:35:53 UTC
My followup fixes up some minor syntax errors and wording. If anyone feels these changes justify a second SO please reset the status.
Comment 5 Jonathan Druart 2012-12-26 14:02:06 UTC
QA Comments:

Looks good to me.
I tested the feature (on/off) at the opac and the intranet, I didn't find any issue.

I will submit a followup (fix indentation and the return of the new routine CheckIfIssuedToPatron).
Jared, could you switch back the status to Needs signoff if you require one for it?

Marked as Passed QA.
Comment 6 Jonathan Druart 2012-12-26 14:02:42 UTC
Created attachment 14266 [details] [review]
Bug 9206 - Only allow place holds in records that the patron don't have in his possession

Added a system preference to turn on/off this feature.
By default the system allow the patron to place holds even if it is in his possession.
Script to place holds check if the system preference is off and if patron has at least one item to block holds.
Messages to say that are already in patron possession added to templates.
Method to check if patron has one issue from one record added to C4::Circulation

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Jonathan Druart 2012-12-26 14:03:17 UTC
Created attachment 14267 [details] [review]
Bug 9206 - Only allow place holds in records that the patron don't have in his possession - QA Followup

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 8 Jonathan Druart 2012-12-26 14:03:40 UTC
Created attachment 14268 [details] [review]
Bug 9206: Followup QA FIX

- Fix indentation
- It is useless to loop on all items. If at least 1 item is already
  issued, we want to return 1.
Comment 9 Jared Camins-Esakov 2012-12-27 14:49:19 UTC
This patch has been pushed to master.
Comment 10 Katrin Fischer 2013-01-13 21:07:25 UTC
*** Bug 3551 has been marked as a duplicate of this bug. ***
Comment 11 Katrin Fischer 2013-05-11 11:41:11 UTC
*** Bug 9702 has been marked as a duplicate of this bug. ***