Bug 29221 - On returns.tt modal displays wrong message when lost items are returned
Summary: On returns.tt modal displays wrong message when lost items are returned
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 23091 18501
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-13 13:56 UTC by Lucas Gass
Modified: 2022-06-06 20:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00


Attachments
Bug 29221: Correctly display refund info (1.52 KB, patch)
2021-10-19 09:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29221: Correctly display refund info (1.58 KB, patch)
2021-10-19 10:07 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 29221: Correctly display refund info (1.64 KB, patch)
2021-10-19 22:30 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 Lucas Gass 2021-10-13 13:56:45 UTC
TO recreate:

1. Set BlockReturnOfLostItems to 'don't block'
2. Make sure your 'Default lost item fee refund on return policy' circ rule is set to 'Leave lost item charge'
3. Check something out and then mark it as lost.
4. Check the item in and notice that the modal popup says "A refund has been applied to the borrowing patron's account."
5. This is not true, a refund is not issued.

Pretty sure this is caused by Bug 23091
Comment 1 Jonathan Druart 2021-10-19 09:39:44 UTC
Looks related to commit bb7a865fb8142252732a5fb255a1db95fe92c3e0
Bug 18501: set the is_refunded flag as internal var
Comment 2 Jonathan Druart 2021-10-19 09:41:36 UTC
Created attachment 126476 [details] [review]
Bug 29221: Correctly display refund info

2132             $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded};

But, in returns.pl:
495     elsif ( $code eq 'LostItemFeeRefunded' ) {
496         $template->param( LostItemFeeRefunded => 1 );
497     }

1. Set BlockReturnOfLostItems to 'don't block'
2. Make sure your 'Default lost item fee refund on return policy' circ rule is set to 'Leave lost item charge'
3. Check something out and then mark it as lost.
4. Check the item in
=> No message to tell there was a refund
Comment 3 Martin Renvoize 2021-10-19 10:07:44 UTC
Created attachment 126478 [details] [review]
Bug 29221: Correctly display refund info

2132             $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded};

But, in returns.pl:
495     elsif ( $code eq 'LostItemFeeRefunded' ) {
496         $template->param( LostItemFeeRefunded => 1 );
497     }

1. Set BlockReturnOfLostItems to 'don't block'
2. Make sure your 'Default lost item fee refund on return policy' circ rule is set to 'Leave lost item charge'
3. Check something out and then mark it as lost.
4. Check the item in
=> No message to tell there was a refund

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2021-10-19 10:07:59 UTC
Good catch, signing off.
Comment 5 Katrin Fischer 2021-10-19 22:30:37 UTC
Created attachment 126557 [details] [review]
Bug 29221: Correctly display refund info

2132             $messages->{'LostItemFeeRefunded'} = $updated_item->{_refunded};

But, in returns.pl:
495     elsif ( $code eq 'LostItemFeeRefunded' ) {
496         $template->param( LostItemFeeRefunded => 1 );
497     }

1. Set BlockReturnOfLostItems to 'don't block'
2. Make sure your 'Default lost item fee refund on return policy' circ rule is set to 'Leave lost item charge'
3. Check something out and then mark it as lost.
4. Check the item in
=> No message to tell there was a refund

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-10-21 08:33:06 UTC
Pushed to master for 21.11, thanks to everybody involved!