I am trying to get the Automation to build new sprints using our naming convention.
<KEY> Sprint <X>
I have a string of rules, but basically.
GET Web Request - which returns
{maxResults=50, startAt=0, total=1, isLast=true, values=[{id=295, self=https://<DOMAIN>.atlassian.net/rest/agile/1.0/sprint/295, state=active, name=CLD Sprint 1, startDate=2024-12-09T20:38:07.083Z, endDate=2024-12-23T05:00:00.000Z, createdDate=2024-12-06T14:19:28.599Z, originBoardId=54, goal=}]}
Then, I create a variable from this response.
NewSprintNumber - which should see the # after Sprint and Iterate it 1.
{{webResponse.body.match("name=.*Sprint ([0-9]+)").group(1).asNumber.plus(1)}}
The NewSprintNumber doesn't log, and is not available for later commands.
Any assistance would be greatly appreciated.
I would debug it with this approach:
Can you follow me? Try to get the basics work first, and until it does, don't look any further.
Hi @Jon Hays -- Welcome to the Atlassian Community!
Scenarios like this with automation often require two steps due to the way smart values like the web response are parsed:
This approach also helps because the variable may be written to the audit log to confirm your parsing is correct for a match() expression.
And...you may want to adjust the input to that match to reduce the scope, perhaps with:
{{webResponse.body.values.first}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.