Bug 24592 - Clarify LOST_RETURN process by using FOUND over RETURNED
Summary: Clarify LOST_RETURN process by using FOUND over RETURNED
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
: 6383 (view as bug list)
Depends on:
Blocks: 24474
  Show dependency treegraph
 
Reported: 2020-02-05 11:45 UTC by Martin Renvoize
Modified: 2020-03-05 01:02 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


Attachments
Bug 24592: Reword LOST_RETURN to LOST_FOUND (11.85 KB, patch)
2020-02-05 12:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24592: Database Update (2.43 KB, patch)
2020-02-05 12:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24592: Reword LOST_RETURN to LOST_FOUND (15.65 KB, patch)
2020-02-05 13:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24592: Database Update (2.43 KB, patch)
2020-02-05 13:46 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24592: Database Update (3.09 KB, patch)
2020-02-10 11:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24592: Reword LOST_RETURN to LOST_FOUND (15.65 KB, patch)
2020-02-10 11:22 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24592: Database Update (3.15 KB, patch)
2020-02-10 18:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 24592: Reword LOST_RETURN to LOST_FOUND (15.74 KB, patch)
2020-02-10 18:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 24592: Database Update (3.29 KB, patch)
2020-02-13 15:01 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 24592: Reword LOST_RETURN to LOST_FOUND (15.85 KB, patch)
2020-02-13 15:01 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2020-02-05 11:45:24 UTC
The phrasing of LOST_RETURN is confusing, the item is not always immediately returned, sometimes it is renewed for example.. I think it would be clearer to reword this to use 'FOUND' to more clearly reflect the states..

I intend to do this in the accounts handling as well as rename the _FixAccountForLostAndReturned method in C4::Circulation.
Comment 1 Martin Renvoize 2020-02-05 12:20:18 UTC
Created attachment 98457 [details] [review]
Bug 24592: Reword LOST_RETURN to LOST_FOUND

This patch updates the wording in the 'lost and found' process to more
closely reflect what the process is achieving by replacing 'RETURNED'
with 'FOUND'
Comment 2 Martin Renvoize 2020-02-05 12:20:21 UTC
Created attachment 98458 [details] [review]
Bug 24592: Database Update
Comment 3 Martin Renvoize 2020-02-05 13:46:09 UTC
Created attachment 98481 [details] [review]
Bug 24592: Reword LOST_RETURN to LOST_FOUND

This patch updates the wording in the 'lost and found' process to more
closely reflect what the process is achieving by replacing 'RETURNED'
with 'FOUND'

Test plan:
1) Grep codebase for _FixAccountForLostAndReturned and note there are no
   longer any instanced of it.
2) Run t/db_dependent/Circulation.t and note it passes
3) Test returning/renewing an item that has been marked as lost and note
   the updated values in the accountlines now use LOST_FOUND as
   credit_type_code and 'FOUND' as the status for the 'LOST' fee
   (debit_type_code 'LOST')
Comment 4 Martin Renvoize 2020-02-05 13:46:11 UTC
Created attachment 98482 [details] [review]
Bug 24592: Database Update
Comment 5 Martin Renvoize 2020-02-10 11:22:08 UTC
Created attachment 98643 [details] [review]
Bug 24592: Database Update
Comment 6 Martin Renvoize 2020-02-10 11:22:11 UTC
Created attachment 98644 [details] [review]
Bug 24592: Reword LOST_RETURN to LOST_FOUND

This patch updates the wording in the 'lost and found' process to more
closely reflect what the process is achieving by replacing 'RETURNED'
with 'FOUND'

Test plan:
1) Grep codebase for _FixAccountForLostAndReturned and note there are no
   longer any instanced of it.
2) Run t/db_dependent/Circulation.t and note it passes
3) Test returning/renewing an item that has been marked as lost and note
   the updated values in the accountlines now use LOST_FOUND as
   credit_type_code and 'FOUND' as the status for the 'LOST' fee
   (debit_type_code 'LOST')
Comment 7 David Nind 2020-02-10 18:45:36 UTC
Created attachment 98680 [details] [review]
Bug 24592: Database Update

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2020-02-10 18:45:40 UTC
Created attachment 98681 [details] [review]
Bug 24592: Reword LOST_RETURN to LOST_FOUND

This patch updates the wording in the 'lost and found' process to more
closely reflect what the process is achieving by replacing 'RETURNED'
with 'FOUND'

Test plan:
1) Grep codebase for _FixAccountForLostAndReturned and note there are no
   longer any instanced of it.
2) Run t/db_dependent/Circulation.t and note it passes
3) Test returning/renewing an item that has been marked as lost and note
   the updated values in the accountlines now use LOST_FOUND as
   credit_type_code and 'FOUND' as the status for the 'LOST' fee
   (debit_type_code 'LOST')

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2020-02-10 18:48:38 UTC
Here is an updated test plan (I had to work out how to do some of the things, so I hope it is useful to others and what was intended to check):

1) Apply the patch and run the database update
   (perl installer/data/mysql/updatedatabase.pl)
2) Grep th codebase for _FixAccountForLostAndReturned and note there are no
   longer any instanced of it (grep -r1 "_FixAccountForLostAndReturned" koha)
3) Run t/db_dependent/Circulation.t and note it passes
4) For a patron:
   - Check out an item (Circulation > Check out)
   - Create a manual invoice for the item using the 'Lost item' type
     (Patrons > [Account for patron] > Accounting > Create manual invoice > 
     Enter the barcode and amount)
   - Edit the record for the item and change the 'Lost status' to 'Lost'
     (From the list of transactions  click on the barcode, and change the 
     'Lost status' to 'Lost' and then 'clcik 'Set status')
   - Check in the lost item (Circulation > Check in)
   - A message should pop up saying 'Item was lost, now found.....'
   - Check the transactions for the patron: there should now be a transaction
     with a refund, the account type will say 'Lost item fee refund', and 
     in the description it will say 'Item found...'
5) Check the database to see the changes:
   - koha-mysql kohadev
   - Use the query 'select * from accountlines'
   - For the original manual invoice the debit_type_code will show as 'LOST'
     and the status will show as 'FOUND'
   - For the transactions to reverse the lost item fee the credit_type_code
     will show as "LOST_FOUND'
Comment 10 Martin Renvoize 2020-02-11 09:18:14 UTC
Thanks for testing David :)
Comment 11 Martin Renvoize 2020-02-11 12:57:21 UTC
*** Bug 6383 has been marked as a duplicate of this bug. ***
Comment 12 Joonas Kylmälä 2020-02-13 15:01:13 UTC
Created attachment 98852 [details] [review]
Bug 24592: Database Update

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 13 Joonas Kylmälä 2020-02-13 15:01:16 UTC
Created attachment 98853 [details] [review]
Bug 24592: Reword LOST_RETURN to LOST_FOUND

This patch updates the wording in the 'lost and found' process to more
closely reflect what the process is achieving by replacing 'RETURNED'
with 'FOUND'

Test plan:
1) Grep codebase for _FixAccountForLostAndReturned and note there are no
   longer any instanced of it.
2) Run t/db_dependent/Circulation.t and note it passes
3) Test returning/renewing an item that has been marked as lost and note
   the updated values in the accountlines now use LOST_FOUND as
   credit_type_code and 'FOUND' as the status for the 'LOST' fee
   (debit_type_code 'LOST')

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 14 Martin Renvoize 2020-02-13 16:02:00 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 15 Joy Nelson 2020-03-05 01:02:21 UTC
enhancement not backported to 19.11.x