Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,557,117
Community Members
 
Community Events
184
Community Groups

Updating Issue's sprint: Finding a string Value in Webhook response

Edited

Preview

after reading many wonderful post here, i decide to share my solution to the problem of assigning Story to a specific sprint (not 'Next') enhance by cloning the story and moving all Sub tasks that are not in StatusCategory Done 

Rule Trigger: A comment in the main comment ' Split: [Sprint_Name'

Strategy:

1. Parse Latest comment and find the Sprint Name (why name?!, as the team leader          see it, I didn't want to update the rule for every Sprint ID)

image.png

 

2. Setting a variable (and a log) for capturing the the Comment

image.png

3. one last tweak for preatify

image.png

And I have the Assigned sprint name in a variable to use later.

 

4. After much research, i saw no solution how to get Sprint ID according to name, basically I was lookin for get SprintI D by Sprint Name logic.

I solved the problem by adding a web request to an End point in Jira

after playing with Postman for a couple of minutes(authentication mainly - ended up using basic. I am a Jira admin so creating API key was easy), the GET was complete and legitimate response.

BOARD ID is visible in the board public url  - making this dynamic will be the next phase for now it will be hard coded

image.png

I validated the response (also in Postman) and on to Phase 3... extract the Key-value for sprintName and Sprint ID

 

3. Parsing the Web response is where i got stuck for 2 days. read every documentation on smart value and lists - didn't understand it. smart values and JSON didn't help

and I assume Some one can help me here, because i dont have a plan. 

after cleaning a bit in VS code

image.png

What is need is how to look for a string: Sprint_2_id within the web response, and get the matching sprint name (sprint names are unique between board)

Any on can help??

 

1 answer

1 accepted

0 votes
Answer accepted
Sebastian Mondry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 20, 2023

Hi there,

Great work so far :) !

You can indeed achieve what you're after. 
So, after you've fired the Webhook, create a New Branch component and select Advanced Branching. 
For the Smart value, provide {{webResponse.body.<name of attribute containing the list>}} and assign it a variable name, such as Sprint. 

Then, create an Advanced compare condition, whereby;
First value: {{Sprint.id}} 
Condition: equals
Second value: "sprint_2_Id"

Then, you can access all required Sprint names, e.g. Log Action {{Sprint.name}}.
Hope that helps ~

@Sebastian Mondry Amazing, thanks for ur help. 

II see a lot of people struggling with the issue i managed to solve any particular forum to share the initial problem and solutions? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events