Migrate deleted:null mappings to deleted:false so DCB Admin can show them correctly

Description

There are a number of mappings within the database that have null as their value for the “deleted” attribute. This has long caused us issues in DCB Admin, and has cropped up again by causing numeric range Item Type mappings to not show up when they should be.

The solution is a migration to be applied across all environments, setting mappings with deleted:null to deleted:false instead, which DCB Admin and the querying services can handle appropriately.

In scope

  • Define a migration to migrate both numeric range and reference value mappings with deleted:null to deleted:false.

  • Test this migration locally to ensure it is correctly migrating the mappings.

Activity

Show:

Casey Henderson March 27, 2025 at 10:44 AM

Fixed on dev:

Previous examples were 0 to 0 for CALS and 1 to 1 for SCCL as null values -

The migration was then run and these mappings now show up in DCB Admin, with deleted:false

https://admin.dcbdev.lsphost.com/libraries/b74e9bba-8030-5e61-800e-03c93e7e3f2b/numericRangeMappings/itemType

https://admin.dcbdev.lsphost.com/libraries/0d65405b-bdd7-5c64-88ab-e54bda2457cf/numericRangeMappings/itemType

 

Worth noting that this might require a rebuild of the ES/OS index to show up - there was some behaviour where the mappings had changed to deleted:false but were not being picked up by the query.

Shouldn’t be an issue as rebuild_index.sh needs to be run on all DCB Service deployments post 8.1.7 anyway, and this is included in 8.1.8.

Fixed

Details

Assignee

Reporter

Components

Priority

Created March 10, 2025 at 2:55 PM
Updated March 27, 2025 at 10:44 AM
Resolved March 27, 2025 at 10:40 AM