ChalmersLibrary / chami

CHAlmers library MIddleware for FOLIO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add mapping for contributor property "primary" (True or False)

branchedelac opened this issue · comments

Migrated record, before updating with Chami:
"contributors" : [ { "contributorNameTypeId" : "2b94c631-fca9-4892-a730-03ee529ffe2a", "name" : "Johansson, Birgitta", "contributorTypeId" : "5daa3848-958c-4dd8-9724-b7ae83a99a27", "contributorTypeText" : null, "primary" : true }, { "contributorNameTypeId" : "f5bda109-a719-4f72-b797-b9c22f45e4e1", "name" : "Formas", "contributorTypeId" : "5daa3848-958c-4dd8-9724-b7ae83a99a27", "contributorTypeText" : null, "primary" : false } ],

The same record after I update it using Chami:
"contributors" : [ { "contributorNameTypeId" : "2b94c631-fca9-4892-a730-03ee529ffe2a", "name" : "Johansson, Birgitta, 1945-", "contributorTypeId" : "5daa3848-958c-4dd8-9724-b7ae83a99a27", "contributorTypeText" : null, "primary" : null }, { "contributorNameTypeId" : "f5bda109-a719-4f72-b797-b9c22f45e4e1", "name" : "Formas", "contributorTypeId" : "5daa3848-958c-4dd8-9724-b7ae83a99a27", "contributorTypeText" : null, "primary" : null } ],

As you can see, Chami sets "primary" to null instead of True or False.

This issue becomes very tangible if you use the token {{primaryContributor}} in a patron notice template, and end up with notice emails missing contributor data.