Lookup of numeric range mappings not taking into account deleted records and is passing the code through for the context

Description

The patron types are not being mapped correctly for Sierra, they are using numeric mappings, the query for numericRangeMappingRepository.findMappedValueFor is not taking into account deleted records and secondly the value passed down the chain is the hostLmsCode and not the context heirarchy or at worse the first value from the context hierarchy.

This affects a couple of sites going live sometime in the next few weeks.

From running the sql manually the result you get is below and unfortunatly it takes the first one which has been deleted and therefore the patron cannot make a request.

Ignoring deleted records needs to be resolved and using the correct value for the context also needs to be resolved.

{ "hits" : [ { "change_category" : null, "change_reference_url" : null, "context" : "CHRISTIAN_COUNTY", "deleted" : "t", "domain" : "patronType", "id" : "6a198614-662b-5db8-854e-a6e6ce4b9904", "last_edited_by" : null, "last_imported" : null, "lower_bound" : "29", "mapped_value" : "NOT_ELIGIBLE", "reason" : null, "target_context" : "DCB", "upper_bound" : "234" }, { "change_category" : "Details changed", "change_reference_url" : null, "context" : "CHRISTIAN_COUNTY", "deleted" : "f", "domain" : "patronType", "id" : "5138a039-bdc7-5270-84c7-2bff7265b8a5", "last_edited_by" : "55d17ce9-d72a-4caf-9db8-d0f1ed83ee9f", "last_imported" : "2025-03-26 16:40:15.162051", "lower_bound" : "31", "mapped_value" : "UNDERGRADUATE", "reason" : "Broken Software", "target_context" : "DCB", "upper_bound" : "31" } ], "sqlStatement" : "SELECT * from numeric_range_mapping nrm where nrm.context='CHRISTIAN_COUNTY' and nrm.domain='patronType' and nrm.lower_bound <= 31 and nrm.upper_bound >= 31 and nrm.target_context='DCB'" }

Activity

Show:

Alex Scott last week

Released in DCB Service v8.20.1

Alex Scott March 28, 2025 at 1:06 PM

code is in main. Will be in the next release.

Details

Assignee

Reporter

Effort Estimate

20

Priority

Created March 27, 2025 at 2:51 PM
Updated last week

Flag notifications