adiwg / mdTranslator

Metadata translation tool built using Ruby

Home Page:https://www.adiwg.org/mdTranslator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sbJSON contacts inherited from associated records

jlblcc opened this issue · comments

See adiwg/mdEditor#225.

Basically, the responsibility objects from associateResources should be excluded from the sbJSON output.

aResponsibility = @Namespace.nested_objs_by_element(intObj, 'roleName')

I changed the method to exclude the search from any object named in the exclude list as shown below:

aResponsibility = @Namespace.nested_objs_by_element(intObj, 'roleName', ['associatedResources'])

Are we capturing the funding contacts in the search? Those contacts are only ids, see https://mdtools.adiwg.org/#viewer-page?v=2-6-0-0-0-3. We may need to add a role of "recipient" to support that....

Not sure. In the sbJSON writer the name associated with sourceId and recipientId contacts are written into the annualBudgets.fundingSources array. They would also be written as contacts to sbJSON IF they were included in allocation.responsibleParty.

Thus there is no guarantee the sourceId and recipientId are included as contacts. This could be added using assumed role names.

I'd suggest writing out the sourceId as a funder and the recipient with no sbJSON role, since there's not an equivalent role in SB.

In retrospect, I suppose we should've just added allocation.responsibleParty from the start and a recipient role. That's what we get for trying to make things simpler...

Did this get resolved?