I have created an outgoing webhook from Jira and would like to pass the subtasks list with summary and status fields. No matter what I do, the JSON parse doesn't work in my target app.
With the below, if there are more than 1 subtask, JSON deserialization expects a comma at the highlighted (Line 8).
{
"key": "{{issue.key}}",
"subtasks": [
{{#issue.subtasks}}
{
"summary": ""{{summary}}",
"status": ""{{status.name}}"
}
{{/}}
]
}
If I add the comma at Line 8, after the subtasks are finished iterating, JSON expects no comma.
Able to resolve the issue by using {{^last}},{{/}}
{
"key": "{{issue.key}}",
"subtasks": [
{{#issue.subtasks}}
{
"summary": ""{{summary}}",
"status": ""{{status.name}}"
}
{{^last}},{{/}}
{{/}}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.