Bug 22927 - Item improperly marked returned when changing damaged or withdrawn status
Summary: Item improperly marked returned when changing damaged or withdrawn status
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-16 14:16 UTC by Andrew Fuerste-Henry
Modified: 2019-10-09 13:32 UTC (History)
5 users (show)

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


Attachments
Bug 22927: Do not check an already lost item when marked as withdrawn or damaged (7.03 KB, patch)
2019-06-08 20:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22927: Do not check an already lost item when marked as withdrawn or damaged (7.19 KB, patch)
2019-10-01 09:32 UTC, Claudie Trégouët
Details | Diff | Splinter Review
Bug 22927: Do not check an already lost item when marked as withdrawn or damaged (7.24 KB, patch)
2019-10-08 19:57 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2019-05-16 14:16:03 UTC
This is a matter of how MarkLostItemsAsReturned works on moredetail.pl.

To replicate:
- Set MarkLostItemsAsReturned to "from the items tab of the catalog module."
- Check an item out to a patron
- Use additem.pl to set that item to a lost status without returning it
- go to moredetail.pl for that item
- mark item as either damaged or withdrawn without interacting with the lost dropdown
- note that item has been returned
Comment 1 Andrew Fuerste-Henry 2019-05-16 14:16:35 UTC
Confirmed this behavior in 18.05 and 18.11
Comment 2 Jonathan Druart 2019-06-08 20:37:04 UTC
Created attachment 90443 [details] [review]
Bug 22927: Do not check an already lost item when marked as withdrawn or damaged

Due to how moredetail.pl was written it was hard to know which action
was triggered.

Test plan:
- Set MarkLostItemsAsReturned to "from the items tab of the catalog
module."
- Check an item out to a patron
- Use additem.pl to set that item to a lost status without returning it
- go to moredetail.pl for that item
- mark item as either damaged or withdrawn without interacting with the
lost dropdown
- note that item has not been returned

Note for QA: Maybe we could have just tested if exists $item_changes->{'itemlost'}
to call LostItem
Comment 3 Claudie Trégouët 2019-10-01 09:32:07 UTC
Created attachment 93355 [details] [review]
Bug 22927: Do not check an already lost item when marked as withdrawn or damaged

Due to how moredetail.pl was written it was hard to know which action
was triggered.

Test plan:
- Set MarkLostItemsAsReturned to "from the items tab of the catalog
module."
- Check an item out to a patron
- Use additem.pl to set that item to a lost status without returning it
- go to moredetail.pl for that item
- mark item as either damaged or withdrawn without interacting with the
lost dropdown
- note that item has not been returned

Note for QA: Maybe we could have just tested if exists $item_changes->{'itemlost'}
to call LostItem

Signed-off-by: Claudie Trégouët <claudie.tregouet@biblibre.com>
Comment 4 Katrin Fischer 2019-10-08 19:57:32 UTC
Created attachment 93896 [details] [review]
Bug 22927: Do not check an already lost item when marked as withdrawn or damaged

Due to how moredetail.pl was written it was hard to know which action
was triggered.

Test plan:
- Set MarkLostItemsAsReturned to "from the items tab of the catalog
module."
- Check an item out to a patron
- Use additem.pl to set that item to a lost status without returning it
- go to moredetail.pl for that item
- mark item as either damaged or withdrawn without interacting with the
lost dropdown
- note that item has not been returned

Note for QA: Maybe we could have just tested if exists $item_changes->{'itemlost'}
to call LostItem

Signed-off-by: Claudie Trégouët <claudie.tregouet@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Martin Renvoize 2019-10-09 13:32:41 UTC
Nice work!

Pushed to master for 19.11.00