Bug 22563 - Convert lost handling to use 'status' instead of multiple accounttypes
Summary: Convert lost handling to use 'status' instead of multiple accounttypes
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P4 enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 22200 22982
Blocks: 19919 22377 25389 25478
  Show dependency treegraph
 
Reported: 2019-03-22 14:36 UTC by Martin Renvoize (ashimema)
Modified: 2021-03-30 11:03 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
**Reports note**: The `accounttype` for lost item fees has been updated from 'L' to 'LOST' and for lost item returned credits it has been updated from 'CR' to 'LOST_RETURNED'. The `status` field is now used to track the reason why an 'OVERDUE' fee has stopped incrementing and it may include 'LOST'
Version(s) released in:
19.11.00
Circulation function:


Attachments
Bug 22563: Be more descriptive with accountypes (23.99 KB, patch)
2019-03-22 16:43 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (4.20 KB, patch)
2019-03-22 16:43 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.99 KB, patch)
2019-03-27 16:18 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (4.20 KB, patch)
2019-03-27 16:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (8.26 KB, patch)
2019-03-27 16:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.79 KB, patch)
2019-04-09 16:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (3.89 KB, patch)
2019-04-09 16:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (8.26 KB, patch)
2019-04-09 16:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Clean up remaing LR cases (3.92 KB, patch)
2019-04-09 16:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Fix Lost in NoIssuesChargeGuarantees test (1.20 KB, patch)
2019-04-09 16:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Clean up remaining L cases (2.70 KB, patch)
2019-04-09 16:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.79 KB, patch)
2019-04-11 18:44 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (2.89 KB, patch)
2019-04-11 18:44 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (8.26 KB, patch)
2019-04-11 18:44 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Clean up remaing LR cases (3.92 KB, patch)
2019-04-11 18:44 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Fix Lost in NoIssuesChargeGuarantees test (1.20 KB, patch)
2019-04-11 18:45 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Clean up remaining L cases (2.70 KB, patch)
2019-04-11 18:45 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.79 KB, patch)
2019-04-18 09:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (2.89 KB, patch)
2019-04-18 09:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (8.26 KB, patch)
2019-04-18 09:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Clean up remaing LR cases (3.92 KB, patch)
2019-04-18 09:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Fix Lost in NoIssuesChargeGuarantees test (1.20 KB, patch)
2019-04-18 09:29 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Clean up remaining L cases (2.70 KB, patch)
2019-04-18 09:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (3.33 KB, patch)
2019-04-18 09:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.79 KB, patch)
2019-04-18 15:57 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (9.81 KB, patch)
2019-04-18 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.84 KB, patch)
2019-04-18 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (4.84 KB, patch)
2019-04-18 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.38 KB, patch)
2019-04-18 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.62 KB, patch)
2019-04-18 15:58 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.51 KB, patch)
2019-04-25 09:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (7.79 KB, patch)
2019-04-25 09:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.84 KB, patch)
2019-04-25 09:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (4.84 KB, patch)
2019-04-25 09:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.38 KB, patch)
2019-04-25 09:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.62 KB, patch)
2019-04-25 09:12 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.51 KB, patch)
2019-05-08 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (7.79 KB, patch)
2019-05-08 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.84 KB, patch)
2019-05-08 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (4.89 KB, patch)
2019-05-08 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.38 KB, patch)
2019-05-08 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.62 KB, patch)
2019-05-08 11:31 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.58 KB, patch)
2019-05-31 11:04 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.58 KB, patch)
2019-05-31 11:05 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (7.86 KB, patch)
2019-05-31 11:06 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.91 KB, patch)
2019-05-31 11:06 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (4.96 KB, patch)
2019-05-31 11:06 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.45 KB, patch)
2019-05-31 11:06 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.69 KB, patch)
2019-05-31 11:06 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (23.56 KB, patch)
2019-06-04 10:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (7.84 KB, patch)
2019-06-04 10:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.90 KB, patch)
2019-06-04 10:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (5.24 KB, patch)
2019-06-04 10:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.43 KB, patch)
2019-06-04 10:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.67 KB, patch)
2019-06-04 10:21 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (24.86 KB, patch)
2019-06-05 12:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (7.84 KB, patch)
2019-06-05 12:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.90 KB, patch)
2019-06-05 12:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (5.24 KB, patch)
2019-06-05 12:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.43 KB, patch)
2019-06-05 12:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.67 KB, patch)
2019-06-05 12:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (QA follow-up) Use issue_id in chargelostitem (6.86 KB, patch)
2019-06-14 20:04 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (QA follow-up) Catch LOST maninvoice cases (3.10 KB, patch)
2019-06-15 06:19 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: (QA follow-up) Correction to DB update (1.06 KB, patch)
2019-06-17 14:01 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 22563: Be more descriptive with accountypes (24.79 KB, patch)
2019-07-05 17:43 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: Update lost handling to use accountline.status (6.78 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for tests (12.90 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Items LOST should not be RETURNED (5.24 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Corrections for overdue tests (3.43 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database (3.67 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (QA follow-up) Use issue_id in chargelostitem (6.86 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (QA follow-up) Catch LOST maninvoice cases (3.10 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (QA follow-up) Correction to DB update (1.06 KB, patch)
2019-07-05 17:44 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: Typo in query (manualinvoice) (889 bytes, patch)
2019-07-05 17:47 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 22563: (follow-up) Fix tests in Koha/Account.t (1.76 KB, patch)
2019-07-05 17:55 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2019-03-22 14:36:40 UTC
Bug 22512 introduces a new field for tracking the 'state' of various accounttypes; We should convert the current lost handling from using `L`,`Rep`,`W` (denoting "Lost", "Replaced" and "Written Off") in combination with `LR` (denoting fine "Lost Returned"). This will clarify the logic and also pave the way to having a more user definable accounttype configuration.
Comment 1 Martin Renvoize (ashimema) 2019-03-22 16:43:43 UTC
Created attachment 86913 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 2 Martin Renvoize (ashimema) 2019-03-22 16:43:45 UTC
Created attachment 86914 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize (ashimema) 2019-03-27 16:18:57 UTC
Created attachment 87092 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2019-03-27 16:19:00 UTC
Created attachment 87093 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize (ashimema) 2019-03-27 16:19:03 UTC
Created attachment 87094 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2019-04-09 16:30:36 UTC
Created attachment 87637 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2019-04-09 16:30:39 UTC
Created attachment 87638 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize (ashimema) 2019-04-09 16:30:41 UTC
Created attachment 87639 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize (ashimema) 2019-04-09 16:30:44 UTC
Created attachment 87640 [details] [review]
Bug 22563: Clean up remaing LR cases

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize (ashimema) 2019-04-09 16:30:47 UTC
Created attachment 87641 [details] [review]
Bug 22563: (follow-up) Fix Lost in NoIssuesChargeGuarantees test
Comment 11 Martin Renvoize (ashimema) 2019-04-09 16:30:50 UTC
Created attachment 87642 [details] [review]
Bug 22563: Clean up remaining L cases
Comment 12 Martin Renvoize (ashimema) 2019-04-09 16:31:18 UTC
Freshly re-based and ready for SO
Comment 13 Martin Renvoize (ashimema) 2019-04-11 18:44:50 UTC
Created attachment 87801 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize (ashimema) 2019-04-11 18:44:53 UTC
Created attachment 87802 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize (ashimema) 2019-04-11 18:44:55 UTC
Created attachment 87803 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize (ashimema) 2019-04-11 18:44:58 UTC
Created attachment 87804 [details] [review]
Bug 22563: Clean up remaing LR cases

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize (ashimema) 2019-04-11 18:45:01 UTC
Created attachment 87805 [details] [review]
Bug 22563: (follow-up) Fix Lost in NoIssuesChargeGuarantees test
Comment 18 Martin Renvoize (ashimema) 2019-04-11 18:45:04 UTC
Created attachment 87806 [details] [review]
Bug 22563: Clean up remaining L cases
Comment 19 Martin Renvoize (ashimema) 2019-04-11 18:45:17 UTC
Freshly rebased
Comment 20 Michal Denar 2019-04-14 12:48:00 UTC
Martin,
how can I test your patch? Please, gime us some test plan.

Thank you.
Comment 21 Martin Renvoize (ashimema) 2019-04-17 19:38:53 UTC
Resetting to assigned as I've spotted a followup I need to make.

It would seem that accountlines wise we have always marked overdues for lost items as 'returned'. I think this is misleading and should be replaced with an 'OVERDUE' + 'LOST' combination to show the fines final state as LOST rather than RETURNED. I don't believe there's any way to retrospectively apply this to prior records unfortunately.

Followup will come shortly (along with a full test plan.. appologies for not including one before now)
Comment 22 Martin Renvoize (ashimema) 2019-04-18 09:29:47 UTC
Created attachment 88279 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 23 Martin Renvoize (ashimema) 2019-04-18 09:29:50 UTC
Created attachment 88280 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize (ashimema) 2019-04-18 09:29:53 UTC
Created attachment 88281 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize (ashimema) 2019-04-18 09:29:55 UTC
Created attachment 88282 [details] [review]
Bug 22563: Clean up remaing LR cases

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 26 Martin Renvoize (ashimema) 2019-04-18 09:29:58 UTC
Created attachment 88283 [details] [review]
Bug 22563: (follow-up) Fix Lost in NoIssuesChargeGuarantees test
Comment 27 Martin Renvoize (ashimema) 2019-04-18 09:30:01 UTC
Created attachment 88284 [details] [review]
Bug 22563: Clean up remaining L cases
Comment 28 Martin Renvoize (ashimema) 2019-04-18 09:30:04 UTC
Created attachment 88285 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 29 Martin Renvoize (ashimema) 2019-04-18 09:34:48 UTC
Rebased and followup added.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'
Comment 30 Martin Renvoize (ashimema) 2019-04-18 09:48:33 UTC
Back to assigned.. with all the foundations work in patches further up the tree I've lost track somewhat within this one.. Need to go back and come up with a thorough test plan again
Comment 31 Martin Renvoize (ashimema) 2019-04-18 15:57:59 UTC
Created attachment 88323 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Martin Renvoize (ashimema) 2019-04-18 15:58:02 UTC
Created attachment 88324 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 33 Martin Renvoize (ashimema) 2019-04-18 15:58:05 UTC
Created attachment 88325 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 34 Martin Renvoize (ashimema) 2019-04-18 15:58:08 UTC
Created attachment 88326 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 35 Martin Renvoize (ashimema) 2019-04-18 15:58:11 UTC
Created attachment 88327 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 36 Martin Renvoize (ashimema) 2019-04-18 15:58:14 UTC
Created attachment 88328 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 37 Martin Renvoize (ashimema) 2019-04-18 16:11:16 UTC
Test plan:

This patch doesn't strictly change any functionality but rather cleans up the codepaths. The corresponding unit tests have been carefully updated to more thoroughly test the functionality and reflect the updated field values.

Functionality is all around the Lost Item functionalities.

So, using the different ways of marking an item as lost you will want to check the results of charges given the various combinations of charging for lost items and overdue forgiveness preferences.

You will also want to check the cash_register_stats report to ensure it still accurately reflects the above combinations.
Comment 38 Martin Renvoize (ashimema) 2019-04-25 09:12:07 UTC
Created attachment 88720 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 39 Martin Renvoize (ashimema) 2019-04-25 09:12:10 UTC
Created attachment 88721 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 40 Martin Renvoize (ashimema) 2019-04-25 09:12:13 UTC
Created attachment 88722 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 41 Martin Renvoize (ashimema) 2019-04-25 09:12:16 UTC
Created attachment 88723 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 42 Martin Renvoize (ashimema) 2019-04-25 09:12:19 UTC
Created attachment 88724 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 43 Martin Renvoize (ashimema) 2019-04-25 09:12:22 UTC
Created attachment 88725 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 44 Martin Renvoize (ashimema) 2019-04-25 10:12:02 UTC
Ready for SO again
Comment 45 Martin Renvoize (ashimema) 2019-05-08 11:30:46 UTC
Created attachment 89462 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 46 Martin Renvoize (ashimema) 2019-05-08 11:30:49 UTC
Created attachment 89463 [details] [review]
Bug 22563: Update lost handling to use accountline.status

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 47 Martin Renvoize (ashimema) 2019-05-08 11:30:52 UTC
Created attachment 89464 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 48 Martin Renvoize (ashimema) 2019-05-08 11:30:55 UTC
Created attachment 89465 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 49 Martin Renvoize (ashimema) 2019-05-08 11:30:58 UTC
Created attachment 89466 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 50 Martin Renvoize (ashimema) 2019-05-08 11:31:01 UTC
Created attachment 89467 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 51 Kyle M Hall (khall) 2019-05-31 11:04:31 UTC
Created attachment 90221 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 52 Kyle M Hall (khall) 2019-05-31 11:05:59 UTC
Created attachment 90222 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 53 Kyle M Hall (khall) 2019-05-31 11:06:07 UTC
Created attachment 90223 [details] [review]
Bug 22563: Update lost handling to use accountline.status

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 54 Kyle M Hall (khall) 2019-05-31 11:06:11 UTC
Created attachment 90224 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 55 Kyle M Hall (khall) 2019-05-31 11:06:14 UTC
Created attachment 90225 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 56 Kyle M Hall (khall) 2019-05-31 11:06:18 UTC
Created attachment 90226 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 57 Kyle M Hall (khall) 2019-05-31 11:06:21 UTC
Created attachment 90227 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 58 Martin Renvoize (ashimema) 2019-06-04 10:21:01 UTC
Created attachment 90307 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 59 Martin Renvoize (ashimema) 2019-06-04 10:21:05 UTC
Created attachment 90308 [details] [review]
Bug 22563: Update lost handling to use accountline.status

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 60 Martin Renvoize (ashimema) 2019-06-04 10:21:08 UTC
Created attachment 90309 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 61 Martin Renvoize (ashimema) 2019-06-04 10:21:11 UTC
Created attachment 90310 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 62 Martin Renvoize (ashimema) 2019-06-04 10:21:15 UTC
Created attachment 90311 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 63 Martin Renvoize (ashimema) 2019-06-04 10:21:18 UTC
Created attachment 90312 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 64 Martin Renvoize (ashimema) 2019-06-05 12:54:17 UTC
Created attachment 90330 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 65 Martin Renvoize (ashimema) 2019-06-05 12:54:20 UTC
Created attachment 90331 [details] [review]
Bug 22563: Update lost handling to use accountline.status

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 66 Martin Renvoize (ashimema) 2019-06-05 12:54:23 UTC
Created attachment 90332 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 67 Martin Renvoize (ashimema) 2019-06-05 12:54:27 UTC
Created attachment 90333 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 68 Martin Renvoize (ashimema) 2019-06-05 12:54:30 UTC
Created attachment 90334 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 69 Martin Renvoize (ashimema) 2019-06-05 12:54:33 UTC
Created attachment 90335 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 70 Martin Renvoize (ashimema) 2019-06-14 20:04:28 UTC
Created attachment 90632 [details] [review]
Bug 22563: (QA follow-up) Use issue_id in chargelostitem

C4::Accounts::chargelostitem contained a FIXME which asked if an item
should be charged for it lost, returned and then lost again. We add
handling for that case here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 71 Martin Renvoize (ashimema) 2019-06-15 06:19:56 UTC
Created attachment 90637 [details] [review]
Bug 22563: (QA follow-up) Catch LOST maninvoice cases

One could add a manual invoice of type LOST but we would not associate
it with an issue_id. This patch tries to catch such cases and
extrapolate an issue_id to add to the accountline.
Comment 72 Martin Renvoize (ashimema) 2019-06-17 14:01:51 UTC
Created attachment 90667 [details] [review]
Bug 22563: (QA follow-up) Correction to DB update
Comment 73 Tomás Cohen Arazi (tcohen) 2019-07-05 17:43:59 UTC
Created attachment 91338 [details] [review]
Bug 22563: Be more descriptive with accountypes

Convert 'L' to 'LOST' to become more descriptive in it's use.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 74 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:03 UTC
Created attachment 91339 [details] [review]
Bug 22563: Update lost handling to use accountline.status

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 75 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:07 UTC
Created attachment 91340 [details] [review]
Bug 22563: (follow-up) Corrections for tests

Updates to unit tests to reflect the accounttype changes and
introduction of status usage.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 76 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:12 UTC
Created attachment 91341 [details] [review]
Bug 22563: (follow-up) Items LOST should not be RETURNED

Up until now we marked lost items as returned in the accountlines, now
we have the oportunity to mark these distinctly with an appropriate
status we should.

Test Plan
1) Find an overdue with fines
2) Ensure you are not forgiving fines when an item is marked as lost
3) Mark the item as lost
4) Confirm the Fine is given a status of 'Lost'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 77 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:16 UTC
Created attachment 91342 [details] [review]
Bug 22563: (follow-up) Corrections for overdue tests

Updates to unit tests to reflect the accounttype changes and introduction of
status usage for _FixOverduesOnReturn.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 78 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:20 UTC
Created attachment 91343 [details] [review]
Bug 22563: (follow-up) Clean up remaing L, LR and CR cases in the database

Test plan:
1) Confirm that after the DB update there are no L, LR or CR
accountlines present.
2) Read the db update and confirm is makes sense.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 79 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:24 UTC
Created attachment 91344 [details] [review]
Bug 22563: (QA follow-up) Use issue_id in chargelostitem

C4::Accounts::chargelostitem contained a FIXME which asked if an item
should be charged for it lost, returned and then lost again. We add
handling for that case here.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 80 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:28 UTC
Created attachment 91345 [details] [review]
Bug 22563: (QA follow-up) Catch LOST maninvoice cases

One could add a manual invoice of type LOST but we would not associate
it with an issue_id. This patch tries to catch such cases and
extrapolate an issue_id to add to the accountline.
Comment 81 Tomás Cohen Arazi (tcohen) 2019-07-05 17:44:32 UTC
Created attachment 91346 [details] [review]
Bug 22563: (QA follow-up) Correction to DB update
Comment 82 Tomás Cohen Arazi (tcohen) 2019-07-05 17:47:31 UTC
Created attachment 91347 [details] [review]
Bug 22563: Typo in query (manualinvoice)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 83 Tomás Cohen Arazi (tcohen) 2019-07-05 17:55:52 UTC
Created attachment 91348 [details] [review]
Bug 22563: (follow-up) Fix tests in Koha/Account.t

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 84 Tomás Cohen Arazi (tcohen) 2019-07-05 17:57:31 UTC
Rebased on top of master, and added minor follow-ups for the failing tests. All of them
because of the L -> LOST change.

Solid work, Martin. Congrats!
Comment 85 Martin Renvoize (ashimema) 2019-07-15 11:21:42 UTC
Nice work!

Pushed to master for 19.11.00