https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28503

Nick Clemens <n...@bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #121992|0                           |1
        is obsolete|                            |

--- Comment #21 from Nick Clemens <n...@bywatersolutions.com> ---
Created attachment 122282
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122282&action=edit
Bug 28503: Compare item homebranch to patron branch when hold policy set to
'from_home_library'

This fixes an issue in the way we calculate the check for hold policy
'from_home_library'

Currently we change the comparison based on ReservesControlBranch, however,
that should
only control the rule we fetch, not how we compare

When ReservesControlBranch is set to "patron's home library" we compare the
patron's branch to
the patron's branch, this is useless and means we pass the check for all
branches all of the time

We should instead compare the patron's branch to the item's branch, and only
fetch the rule using ReservesControlBranch

To test:
 1 - Have a record with an item from library A and library B
 2 - Set the 'Default checkout, hold and return policy'->Hold policy->From home
library for all libraries
     and ensure you have no branch specific/itemtype specific rules set
 3 - Attempt to place a hold on the record for a patron from library B
 4 - Note that only the library B item is holdable - place a title level hold
(do not choose an item)
 5 - Check in the item from library A
 6 - It fills the hold - This is incorrect - ignore the hold
 7 - Apply patch
 8 - Restart all the things
 9 - Check in the item from library A
10 - No hold found
11 - Check in the item from library B
12 - Hold found, correctly

Signed-off-by: David Nind <da...@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io>

Bug 28503: Clarify what ReservesControlBranch controls

Signed-off-by: David Nind <da...@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io>

Signed-off-by: Jonathan Druart <jonathan.dru...@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <k...@bywatersolutions.com>
(cherry picked from commit 19660a25fa9421373a41fb6aba71215d71c541be)
Signed-off-by: Fridolin Somers <fridolin.som...@biblibre.com>

Bug 28503: Unit tests

Signed-off-by: David Nind <da...@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io>

Signed-off-by: Jonathan Druart <jonathan.dru...@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <k...@bywatersolutions.com>
(cherry picked from commit a4cdeaae3f82ea47fe3fba5e79f419e6911fb524)
Signed-off-by: Fridolin Somers <fridolin.som...@biblibre.com>

Bug 28503: (follow-up) Get rid of tests warnings

Signed-off-by: Tomas Cohen Arazi <tomasco...@theke.io>

Signed-off-by: Jonathan Druart <jonathan.dru...@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <k...@bywatersolutions.com>
(cherry picked from commit 1e677a8755dfa4b5df3ff8df8f2644aedf388eb3)
Signed-off-by: Fridolin Somers <fridolin.som...@biblibre.com>

Bug 28503: [20.11.x] fix unit tests

Impact of Bug 27069
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27069

Bug 28503: [20.11.x] Adjust bad test assumption

The tests set holdpolicy to 'from home library', this is the case we were
fixing

Adjusted test to set policy to 'any library' and tests pass

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to