Bug 20978 tried to add a single source of truth for this values, but an error was introduced.
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
Causation bug 20978 not in 18.05.x series.