[Bug 27879] New: Koha::Hold::is_at_destination function should be removed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 Bug ID: 27879 Summary: Koha::Hold::is_at_destination function should be removed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org Currently Koha::Hold::is_at_destination looks to be unnecessary and it could be replaced with Koha::Hold::is_waiting. However, to make sure nobody adds any code paths in the future we should add some checks to Koha::Hold::set_waiting so that it wouldn't allow set Hold waiting if the item's holding branch is not the hold's pickup library. We should also make sure that e.g. a transfer cannot be initiated for a waiting hold without the hold status going to in transit. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #1 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 117820 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117820&action=edit Bug 27879: Don't allow set holds to be waiting if not at pickup location If the item is not at pickup location when setting the hold to be waiting it would be clearly error because then the status should be in transit instead. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 117821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117821&action=edit Bug 27879: Remove unnecessary Koha::Hold::is_at_destination function It does the same thing as is_waiting(). A waiting hold should never be anywhere else than the pickup branch, if it is it is not a waiting hold. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Martin, could you take a look at this transfers and hold refactoring? I think I remember you saying something that we need tighter integration between holds and transfers, so hopefully this would be step to the right direction. Don't you think we need some integration here so that for example Koha::Item->holdingbranch($newbranch) call would give an exception if the we have an waiting hold? Or if someone tries to initiate a new transfer for item it should be blocked because of already waiting hold for the item. Would love to hear your opinion on this. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I completely agree.. took me a little while there to wrap my head around it, but yes, I agree. If a hold is waiting then it needs to stay waiting unless explicitly changed... * It shouldn't become waiting until it's at its pickup location. * It shouldn't be allowed to change location and remain in waiting. So, yes.. I agree an exception being thrown would be great.. probably with the ability to call a different function to reset the waiting status to another explicit state if you really want to change the current location of the item... that may be to trigger a transfer back to the pickup location, or set the hold back into the queue. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Is this ready for testing? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #6 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Martin Renvoize from comment #5)
Is this ready for testing?
Hmm, seems like the patch "Bug 27879: Don't allow set holds to be waiting if not at pickup location" misses unit tests, so those need to be added. I won't be able to spend any time on it now so feel free to add yourself as Co-author in the patches if you will work on this. But besides missing the tests it seems like the patches are OK. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Still valid it seems: is_at_destination still exists on master. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27879 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Still valid. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org