Bug 28181 - Archived debit type still shows as available in Point of Sale
Summary: Archived debit type still shows as available in Point of Sale
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low normal
Assignee: Martin Renvoize (ashimema)
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on: 23354
Blocks: 13985
  Show dependency treegraph
 
Reported: 2021-04-20 16:20 UTC by Esther Melander
Modified: 2021-12-13 21:10 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.05.00,20.11.06,20.05.12
Circulation function:


Attachments
Bug 28181: Filter out archived debit types in point of sale (1.41 KB, patch)
2021-04-22 12:15 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 28181: Filter out archived debit types in point of sale (1.47 KB, patch)
2021-05-07 11:20 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 28181: Filter out archived debit types in point of sale (1.53 KB, patch)
2021-05-07 14:00 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Esther Melander 2021-04-20 16:20:50 UTC
I archived a debit type, however when I return to the point of sale page, the archived debit still shows as available. This means the archived debit could still be used for transactions. The archived debit still had the library selected in library limitations. I restored the debit, deselected the library, saved the debit, then re-archived the debit. With a multi-branch configuration, this led to the debit being made available to all libraries despite being archived. I went back, restored the debit and have temporarily assigned the debit to the Placeholder branch so that it is only available there. I assumed an archived debit would no longer be made available making it impossible to continue to use.

To duplicate:
1. Create a debit with library limitation of logged in library.
2. Archive the debit
3. Go to Point of Sale page. Archived debit will be visible and available for use by the library.
Comment 1 Martin Renvoize (ashimema) 2021-04-22 12:15:05 UTC
Created attachment 120001 [details] [review]
Bug 28181: Filter out archived debit types in point of sale

The filter for only displaying un-archived debit types on the point of
sale page had been missed.

NOTE: It would be beneficial to move this to a default filter in the
Koha:: objects search method for both debit_types and credit_types.. but
I opted for the quick fix here to resolve the bug and will impliment
default filtering in a subsequent enhancement bug.

Test plan
1/ Archive a debit type that is marked as 'Can be sold'
2/ Go to the point of sale page and confirm the above debit type appears
3/ Apply the patch
4/ Confirm the debit type no longer appears in the point of sale page.
Comment 2 PTFS Europe Sandboxes 2021-05-07 11:20:53 UTC
Created attachment 120677 [details] [review]
Bug 28181: Filter out archived debit types in point of sale

The filter for only displaying un-archived debit types on the point of
sale page had been missed.

NOTE: It would be beneficial to move this to a default filter in the
Koha:: objects search method for both debit_types and credit_types.. but
I opted for the quick fix here to resolve the bug and will impliment
default filtering in a subsequent enhancement bug.

Test plan
1/ Archive a debit type that is marked as 'Can be sold'
2/ Go to the point of sale page and confirm the above debit type appears
3/ Apply the patch
4/ Confirm the debit type no longer appears in the point of sale page.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Sally 2021-05-07 11:21:18 UTC
Worked as described - signed off.
Comment 4 Nick Clemens (kidclamp) 2021-05-07 14:00:19 UTC
Created attachment 120694 [details] [review]
Bug 28181: Filter out archived debit types in point of sale

The filter for only displaying un-archived debit types on the point of
sale page had been missed.

NOTE: It would be beneficial to move this to a default filter in the
Koha:: objects search method for both debit_types and credit_types.. but
I opted for the quick fix here to resolve the bug and will impliment
default filtering in a subsequent enhancement bug.

Test plan
1/ Archive a debit type that is marked as 'Can be sold'
2/ Go to the point of sale page and confirm the above debit type appears
3/ Apply the patch
4/ Confirm the debit type no longer appears in the point of sale page.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-05-10 14:18:55 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 6 Fridolin Somers 2021-05-12 14:39:19 UTC
Pushed to 20.11.x for 20.11.06
Comment 7 Andrew Fuerste-Henry 2021-05-25 12:56:39 UTC
Pushed to 20.05.x for 20.05.12
Comment 8 Victor Grousset/tuxayo 2021-05-25 14:37:06 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.