Bug 25227 - SIP server returns wrong error message if item was lost and not checked out
Summary: SIP server returns wrong error message if item was lost and not checked out
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-21 11:10 UTC by Kyle M Hall
Modified: 2020-05-08 22:11 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.06


Attachments
Bug 25227: SIP server returns wrong error message if item was lost and not checked out (1.78 KB, patch)
2020-04-21 11:13 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25227: SIP server returns wrong error message if item was lost and not checked out (1.91 KB, patch)
2020-04-27 07:39 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 25227: Display correct message if item is lost and lost returns are allowed (1.92 KB, patch)
2020-04-27 11:07 UTC, Kyle M Hall
Details | Diff | Splinter Review
1 Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed (1.20 KB, patch)
2020-04-27 11:08 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed (1.19 KB, patch)
2020-04-27 12:06 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25227: Add unit tests (3.55 KB, patch)
2020-04-27 12:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25227: Display correct message if item is lost and lost returns are allowed (1.92 KB, patch)
2020-04-27 12:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed (1.19 KB, patch)
2020-04-27 12:30 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 25227: Add unit tests (3.61 KB, patch)
2020-04-27 12:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25227: Display correct message if item is lost and lost returns are allowed (1.98 KB, patch)
2020-04-27 12:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed (1.25 KB, patch)
2020-04-27 12:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2020-04-21 11:10:57 UTC
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.
Comment 1 Kyle M Hall 2020-04-21 11:13:43 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!
Comment 2 Frédéric Demians 2020-04-27 07:39:05 UTC
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>
Comment 3 Jonathan Druart 2020-04-27 10:17:45 UTC
What about BlockReturnOfWithdrawnItems then?

Also I think we should stop adding code to C4::SIP without cover the changes by tests.
Comment 4 Kyle M Hall 2020-04-27 11:07:54 UTC
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>
Comment 5 Kyle M Hall 2020-04-27 11:08:05 UTC
Created attachment 103758 [details] [review]
1 Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed
Comment 6 Kyle M Hall 2020-04-27 12:06:32 UTC
Created attachment 103762 [details] [review]
Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed
Comment 7 Kyle M Hall 2020-04-27 12:29:46 UTC
Created attachment 103764 [details] [review]
Bug 25227: Add unit tests
Comment 8 Kyle M Hall 2020-04-27 12:30:24 UTC
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>
Comment 9 Kyle M Hall 2020-04-27 12:30:27 UTC
Created attachment 103766 [details] [review]
Bug 25227: Display correct message if item is withdrawn and withdrawn returns are allowed
Comment 10 Jonathan Druart 2020-04-27 12:38:09 UTC
Created attachment 103770 [details] [review]
Bug 25227: Add unit tests

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2020-04-27 12:38:13 UTC
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>
Comment 12 Jonathan Druart 2020-04-27 12:38:16 UTC
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>
Comment 13 Martin Renvoize 2020-04-29 15:25:25 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 14 Joy Nelson 2020-05-08 22:11:32 UTC
Backported to 19.11.x for 19.11.06