Description
Kyle M Hall (khall)
2020-04-21 11:10:57 UTC
Created attachment 103363 [details] [review] Bug 25227: SIP server returns wrong error message if item was lost and not checked out Even if a library allows returns of lost items, the SIP server returns the error message "Item lost, return not allowed" if the checkin was not ok for any reason other than it being withdrawn ( and withdrawn items not being returnable ). The most clear example of this is that when a lost item is not checked out to a patron and is returned. SIP returns that message even though lost items *can* be returned. The actual problem being that the item was not checked out. Test Plan: 1) Ensure you can return lost items 2) Mark an item as lost 3) Check it in via SIP 4) Note the message you get back is "Item lost, return not allowed" 5) Apply this patch 6) Restart your SIP server 7) Repeat steps 2 and 3 8) Note you no longer get the incorrect message! Created attachment 103739 [details] [review] Bug 25227: SIP server returns wrong error message if item was lost and not checked out Even if a library allows returns of lost items, the SIP server returns the error message "Item lost, return not allowed" if the checkin was not ok for any reason other than it being withdrawn ( and withdrawn items not being returnable ). The most clear example of this is that when a lost item is not checked out to a patron and is returned. SIP returns that message even though lost items *can* be returned. The actual problem being that the item was not checked out. Test Plan: 1) Ensure you can return lost items 2) Mark an item as lost 3) Check it in via SIP 4) Note the message you get back is "Item lost, return not allowed" 5) Apply this patch 6) Restart your SIP server 7) Repeat steps 2 and 3 8) Note you no longer get the incorrect message! Signed-off-by: Frédéric Demians <f.demians@tamil.fr> What about BlockReturnOfWithdrawnItems then? Also I think we should stop adding code to C4::SIP without cover the changes by tests. Created attachment 103757 [details] [review] Bug 25227: Display correct message if item is lost and lost returns are allowed Even if a library allows returns of lost items, the SIP server returns the error message "Item lost, return not allowed" if the checkin was not ok for any reason other than it being withdrawn ( and withdrawn items not being returnable ). The most clear example of this is that when a lost item is not checked out to a patron and is returned. SIP returns that message even though lost items *can* be returned. The actual problem being that the item was not checked out. Test Plan: 1) Ensure you can return lost items 2) Mark an item as lost 3) Check it in via SIP 4) Note the message you get back is "Item lost, return not allowed" 5) Apply this patch 6) Restart your SIP server 7) Repeat steps 2 and 3 8) Note you no longer get the incorrect message! Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Created attachment 103758 [details] [review] 1 Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed Created attachment 103762 [details] [review] Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed Created attachment 103764 [details] [review] Bug 25227: Add unit tests Created attachment 103765 [details] [review] Bug 25227: Display correct message if item is lost and lost returns are allowed Even if a library allows returns of lost items, the SIP server returns the error message "Item lost, return not allowed" if the checkin was not ok for any reason other than it being withdrawn ( and withdrawn items not being returnable ). The most clear example of this is that when a lost item is not checked out to a patron and is returned. SIP returns that message even though lost items *can* be returned. The actual problem being that the item was not checked out. Test Plan: 1) Ensure you can return lost items 2) Mark an item as lost 3) Check it in via SIP 4) Note the message you get back is "Item lost, return not allowed" 5) Apply this patch 6) Restart your SIP server 7) Repeat steps 2 and 3 8) Note you no longer get the incorrect message! Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Created attachment 103766 [details] [review] Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed Created attachment 103770 [details] [review] Bug 25227: Add unit tests Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 103771 [details] [review] Bug 25227: Display correct message if item is lost and lost returns are allowed Even if a library allows returns of lost items, the SIP server returns the error message "Item lost, return not allowed" if the checkin was not ok for any reason other than it being withdrawn ( and withdrawn items not being returnable ). The most clear example of this is that when a lost item is not checked out to a patron and is returned. SIP returns that message even though lost items *can* be returned. The actual problem being that the item was not checked out. Test Plan: 1) Ensure you can return lost items 2) Mark an item as lost 3) Check it in via SIP 4) Note the message you get back is "Item lost, return not allowed" 5) Apply this patch 6) Restart your SIP server 7) Repeat steps 2 and 3 8) Note you no longer get the incorrect message! Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 103772 [details] [review] Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 Backported to 19.11.x for 19.11.06 |