Open jlblcc opened 6 years ago
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?
See adiwg/mdEditor#225.
Basically, the responsibility objects from associateResources should be excluded from the sbJSON output.
https://github.com/adiwg/mdTranslator/blob/f6868cb0c2eaae6c7611248fa23253c98b1478c7/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb#L23