Summary: | Wrong offset type for Lost Item | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | alexbuckley, kyle, martin.renvoize, nick, pierre-marc.thibault |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 2696, 20978 | ||
Bug Blocks: | 13098, 21715 | ||
Attachments: |
Bug 21584: Wrong offset type for Lost Item
Bug 21584: Wrong offset type for Lost Item Bug 21584: Wrong offset type for Lost Item |
Description
Tomás Cohen Arazi
2018-10-16 18:13:24 UTC
Created attachment 80676 [details] [review] Bug 21584: Wrong offset type for Lost Item Bug 2696 introduced account_offset_type.inc but 'Lost Item Return' doesn't match what is added on the database. Moreover, bug 20978 added references to this wrong value too in Koha::Account This patch performs a trivial fix for this. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Can we have a test plan to validate that both changes are effective? The original bug is in: koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc it is not easy to 'reproduce', as the code that should generate credit return offsets is not working properly (bug 13098). This is my attempt: - View the following file: installer/data/mysql/account_offset_types.sql $ less installer/data/mysql/account_offset_types.sql - Notice there's 'Lost Item' in line 4 - View koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc $ less koha-tmpl/intranet-tmpl/prog/en/includes/account_offset_type.inc - Notice it maps the values from the account_offset_types.sql file into english descriptions. => FAIL: There's no mapping for 'Lost Item', but there's a mapping for 'Lost Item Return', which doesn't really exist in account_offset_types.sql - Apply the patch => SUCCESS: The value <-> description mapping in account_offset_type.inc makes sense now. It respects the values that would be stored on the DB if the feature worked correctly. => BONUS: Koha/Account.pm gets fixed to generate the right value too. Notice there's a hash with mappings for some keywords into both account_offset_types and account types. Created attachment 81048 [details] [review] Bug 21584: Wrong offset type for Lost Item Bug 2696 introduced account_offset_type.inc but 'Lost Item Return' doesn't match what is added on the database. Moreover, bug 20978 added references to this wrong value too in Koha::Account This patch performs a trivial fix for this. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Patch matches what was outlined in test plan, also passes qa test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Created attachment 81057 [details] [review] Bug 21584: Wrong offset type for Lost Item Bug 2696 introduced account_offset_type.inc but 'Lost Item Return' doesn't match what is added on the database. Moreover, bug 20978 added references to this wrong value too in Koha::Account This patch performs a trivial fix for this. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Patch matches what was outlined in test plan, also passes qa test tool Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Awesome work all! Pushed to master for 18.11 |