Done
Details
Assignee
Yaroslav KiriakYaroslav KiriakReporter
Lynne ForsLynne ForsPriority
P2Story Points
3Sprint
NoneDevelopment Team
FolijetFix versions
Release
Quesnelia (R1 2024)RCA Group
Incomplete/missing requirementsAffected releases
Poppy (R2 2023)Orchid (R1 2023)Affected Institution
!!!ALL!!!TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Yaroslav Kiriak
Yaroslav KiriakReporter
Lynne Fors
Lynne ForsPriority
Story Points
3
Sprint
None
Development Team
Folijet
Fix versions
Release
Quesnelia (R1 2024)
RCA Group
Incomplete/missing requirements
Affected releases
Poppy (R2 2023)
Orchid (R1 2023)
Affected Institution
!!!ALL!!!
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created October 20, 2023 at 2:47 PM
Updated March 18, 2024 at 6:36 PM
Resolved January 10, 2024 at 9:35 PM
Overview: When running a job that has a field mapping for statistical codes in the item record, the mapped field/subfield must be present in the incoming MARC record for the item record to be created. If the mapped field/subfield are not present, the item record is discarded and not created at all.
Current workaround: Using the UI, manually create each item record and populate all fields that were mapped
Steps to Reproduce:
Log into Orchid Bugfest as diku_admin
Load any .mrc file that uses the field mappings in this job (https://bugfest-orchid.int.aws.folio.org/settings/data-import/job-profiles/view/854d499b-5309-4dbc-b1ba-2e5ca7f4b1ea?query=LF%20-%20&sort=name)
Some records should have a 949$s and some should not have a 949$s
Make sure to use a unique barcode for each item
Use job "LF - Testing adding statistical codes to items on create"
Run the job
Expected Results: Instance, holdings, and item records would be created. For item records: If there was data in the 949$s, that statistical code would be populated. If there was no 949$s in the incoming MARC record, the mapped subfield would be ignored and no statistical code would be populated.
Actual Results: Instance, holdings, and items were created for those records that had a 949$s value. Records that did not include a 949$s were discarded and not created. This error message is given in the log: io.vertx.core.impl.NoStackTraceThrowable: {"errors":[{"message":"elements in list must match pattern","type":"1","code":"elements in list must match pattern","parameters":[{"key":"statisticalCodeIds","value":"[{}]"}]}]}
Additional Information: Orchid Bugfest Data Import job logs: https://bugfest-orchid.int.aws.folio.org/data-import/job-summary/86f6afca-c9b4-4bfb-b7fb-7b17cfcb54a6 ; https://bugfest-orchid.int.aws.folio.org/data-import/job-summary/f1a09f2c-f5c4-40a7-8ee0-7f2bb20e22d1
Interested parties:
BE notes:
Check approach with required property for the field statisticalCodeIds in the mapping profiles for Instance, Holdings, Items (see UIDATIMP-1384 for details, but note that it has a different structure than the notes objects)
If approach works - add migration script to populate mapping rule with "true" for "required" property for existing mapping profiles (Instance mapping profiles, Holdings mapping profiles, Item mapping profiles)
Add ticket for UI to populate that property when mapping profiles are created
UPD: this approach was checked and it turned out that it's not the case, so during the following investigation we found that the reason is empty value for statisticalCodeIds or value is statisticalCode name instead of ID when the name does not match ID.