https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24194 --- Comment #39 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Joonas Kylmälä from comment #36)
ReserveExpiration should be moved out of set_waiting() method because it makes using set_waiting method really confusing because you are really expecting it to only set the waiting status and not do much more, documentation and testing of the function becomes also more difficult.
I'm not sure I understand what you mean here, expiration date logic is already in the set_waiting method before my patch. I think moving that logic out is beyond the scope of this work.
The best way to do this would be to block adding expiration date already when creating a new hold. So please add the necessary code to OPAC, Staff and REST. For OPAC and Staff I see there is already some code, REST is missing completely.
What code is missing for OPAC and staff? I will add it to REST in a follow-up.
Also if I'm not mistaken the reason you added ReserveExpiration to set_waiting() is because of ReservesMaxPickUpDelay not working really well – what you could do here is do a DB upgrade so that ReservesMaxPickUpDelay value '' => 0 so then when ReservesMaxPickUpDelay is not an integer value it would simply not add expiration date.
I added it to set_waiting because the code already exists there - when we set a hold as waiting it may have a specified shelf time for awaiting pickup. -- You are receiving this mail because: You are watching all bug changes.