[Koha-bugs] [Bug 21944] Fix waiting holds at wrong location bug

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 4 21:53:07 CET 2019


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

--- Comment #10 from Nick Clemens <nick at bywatersolutions.com> ---

(In reply to Christopher Brannon from comment #6)
> 
> Nick,
> The question is, how do I test the branch destination?  Essentially the test
> needs to check in an item that is waiting at a branch other than the branch
> it is waiting at, and see if the item is put back into transit and the
> destination is set for the pickup branch.  I am not sure how to do this.

Your tests need to cover the change you make. They should illustrate the
expected behavior of the subroutine. In this case: When AddReturn is called
from branch B on an item that is a waiting hold at branch A then the hold
should now be marked as 'not waiting' and the message returned should reflect
the hold's new status

You should (ideally) write your tests first to show how the current code is
problematic, then change the subroutine to match the expectation of the tests.

In this case you need to check that the hold is not waiting and the priority is
set - also that the message returned indicates these values

I added new tests and also switched the code to use 'RevertWaitingStatus' since
that method does exactly what we want

Check these out and let me know if they make sense

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list