jirasoy-templates

How do I exact value from an object for soy template?


We are in the process of modifying the JIRA Service Desk 3 notification soy templates to make them more useful while we wait for JSD-218 to be actioned. Primarily we are editing the issue-conversational-notifications.soy.

We can easily get {$issue.key} and {$issue.summary} to display, but pulling out the value for description is proving a challenge. Description is nested within the {$issue.fields} object, which looks like:

[{id: description, label: Description, value: {html: <p>Testing notification</p>, rawValue: Testing notification }}] 

However the easy assumption of {$issue.fields.value.html} does not work. Reading through the documentation on closure templates as kind of got me lost on how to pull out the value of HTML for the key value, which is the value of the key fields?

Have also tried:

Has anyone had any success on this front? I've asked on Atlassian answers to a deafening quiet.


Solution

  • As per Wheeler's response, answer is:

    {$issue.fields[0].value.html}