Hello,
I need to map a sprint name -which is matching a specific string value- to its corresponding Id:
1. First, I get all sprints in my board: /jira/rest/agile/1.0/board/boardid/sprint
Example of the webhook body:
{id=163608, self=xxx, state=closed, name=Sprintname1, startDate=xx, endDate=xx, completeDate=xx, activatedDate=xx, originBoardId=boardid, synced=false, autoStartStop=false}, {id=163650, self=xx, state=closed, name=Sprintname2, startDate=xx, endDate=xx, completeDate=xx, activatedDate=xx, originBoardId=boardid, synced=false, autoStartStop=false}
2. Now I'm trying to filter through the webhook body to extract a certain sprint id only. However I'm facing issues with the filtering query.
If I use this query: {{#webhookResponse.body.values}}{{name}}={{id}}, {{/}}
I get following output: Sprintname1=163608, Sprintname2=163650, Sprintname3=163641...
However I need to only print the Id of the Sprint which is matching a certain string value in its name.
e.g Sprintname2 = R44/23:
Output I need: 163650
I tried a few things, but nothing worked so far:
{{#webhookResponse.body.values}}{{#if(name,"R44/23")}}{{id}}{{/}}{{/}}
{{#webhookResponse.body.name}}{{#if("R44/23")}}{{id}}{{/}}{{/}}
{{#webhookResponse.body.values.name}} {{#if("R44/23")}} {{webhookResponse.body.values.id}}{{/}}{{/}}
Does anyone have an idea what could be wrong with above queries?