Inconsistency of mapping rules in database
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Attachments
defines
Checklist
hideTestRail: Results
Activity

Ann-Marie Breaux December 8, 2021 at 3:52 PM
That's really good to hear, . I'm glad the testing went well. Will leave this for or to review and close.

Charlotte Whitt December 8, 2021 at 10:44 AMEdited
and - here verification of Single Record Import functionality
1. T935492 create record by using SRI (OCLC worldcat) works as expected [https://bugfest-kiwi.folio.ebsco.com/inventory/view/389a9eed-7b54-483a-a577-c119ca5557c6?qu[…]ort=title&xidtype=6f171ee7-7a0a-4dd4-8959-bd67ec07cc88|https://bugfest-kiwi.folio.ebsco.com/inventory/view/389a9eed-7b54-483a-a577-c119ca5557c6?query=231790092&sort=title&xidtype=6f171ee7-7a0a-4dd4-8959-bd67ec07cc88]
2. T935493 (overlay of MARC records, source MARC) works as expected [https://bugfest-kiwi.folio.ebsco.com/inventory/view/1906d251-f424-4a2a-aa02-1e9d3d700252?fi[…]ort=title&xidtype=6f171ee7-7a0a-4dd4-8959-bd67ec07cc88|https://bugfest-kiwi.folio.ebsco.com/inventory/view/1906d251-f424-4a2a-aa02-1e9d3d700252?filters=source.MARC&query=wolves&sort=title&xidtype=6f171ee7-7a0a-4dd4-8959-bd67ec07cc88]
11:42
3. T935522 (Overlay existing record with Source FOLIO by Import from OCLC ) works as expected [https://bugfest-kiwi.folio.ebsco.com/inventory/view/b981c769-be43-4234-a6bb-08e41f109e4b?fi[…]ort=title&xidtype=6f171ee7-7a0a-4dd4-8959-bd67ec07cc88|https://bugfest-kiwi.folio.ebsco.com/inventory/view/b981c769-be43-4234-a6bb-08e41f109e4b?filters=source.FOLIO&query=wolves&sort=title&xidtype=6f171ee7-7a0a-4dd4-8959-bd67ec07cc88]

Oleksii Petrenko December 6, 2021 at 12:39 PM
Deployed to Kiwi bugfest. Please proceed with verification

Khalilah Gambrell December 3, 2021 at 12:46 PMEdited
Hey all.
1. This issue prevents multiple mapping rules from being created.
2. Folijet will update Juniper and Kiwi Release Notes ask libraries to review custom mapping rules
3. Folijet will write a script () to be included in the Kiwi Release to remove any multiple mapping rules that were created in Juniper
4. Downgrading this issue from P1 to P2
cc:

Theodor Tolstoy (One-Group.se) December 2, 2021 at 5:45 PM
Thank you for pointing that out. I dived into this because I suspected it being related to https://folio-org.atlassian.net/browse/SUP-57 and I realize I am out on deep water...
Overview:
Each time POST /_/tenant called a new portion of default mapping rules is saved to the database. This may cause that not last updated rules will be used for records mapping.
Steps to Reproduce:
Call POST /_/tenant on an empty database
Call POST /_/tenant one more time
Expected Results: 1 rule per record type in the database
Actual Results: 2 rules per record type in the database.
Open questions:
Should the module replace already existing mapping rules for default when the module is updating to a new version?
We should clear the database from extra rules that have already been saved to the database. But due to database structure, we couldn't detect which rule is last updated. Will it be a big problem if we save default rules to the database instead of already existing?
Approach:
Clear database from existed rules. (depends on the answer to the 2nd question)
Modify database to have a unique constraint for `record_type` column.
Modify logic of saving rules. Depends on the answer to the 1nd question:
Replace existing rules with default ones.
Don't save default rules if rule for recordType already exist in database