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,639,537
Community Members
 
Community Events
196
Community Groups

Automation loop through WebResponse results

Hi,
I am accessing the Tempo Plan Times in an automation via Web Response. Now I would like to know how to make a loop through the individual planed packages via the Jira automations. To get the ids of a specific description to delete the entire. Comparable to the loop you can create for LookupIssues.

Logic: 

  • Loop through entries
  • Condition:  If {{webResponse.body.results.get(entries).description}} contains "Firma AB
  • Then:  Delete Plan via Web Response 

 

Web Response Result with 2 entries 
"metadata": {

"count": 2

},

"results": [

{

"id": 30,

"startDate": "2022-09-20",

"endDate": "2022-09-20",

"description": "TEST-117 - Firma XY",

"plannedSecondsPerDay": 1020,

"includeNonWorkingDays": false,

"rule": "NEVER",

"recurrenceEndDate": "2022-09-20",

"totalPlannedSecondsInScope": 1020 },

{

"id": 31,

"startDate": "2022-09-20",

"endDate": "2022-09-20",

"description": "TEST-117 - Firma AB",

"plannedSecondsPerDay": 60,

"includeNonWorkingDays": false,

"rule": "NEVER",

"recurrenceEndDate": "2022-09-20",

"totalPlannedSecondsInScope": 60

}

Is this somehow possible? Any Ideas? 
Greetings
Nicole 

1 answer

1 accepted

3 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Sep 21, 2022

Hi @Nicole Ahlborn 

I'm still a bit of a novice myself with the Send Web Request, but you would need to perform an advanced branch against {{webResponse.body}}. You'll give your branch a variable like {{varIterate}} Then for each action you want to take you would simply go with {{varIterate.YOURDESIREDATTRIBUTE}} and it will process through the results.

NOTE - There will be a limitation of 50 results it can process in a single branch.

Hi @Mark Segall 
Thank you very much! Now it has finally worked.
I had to go one level further than body ({{webResponse.body.results}}), but it works!

Like Mark Segall likes this

Hi @Nicole Ahlborn 
I'm in a similar scenario, Can you please share how did you manage to do this one in details please?

Hi @Nicole Ahlborn or @Mark Segall , please share how you did this? I'm also in a similar situation

Hi @Christine Kihanya 

you can use the Advanced branching on Smart Values 

Bildschirmfoto 2023-06-20 um 08.02.00.png

In the step you just use an Advanced compare condition to get the one entry you need. 

e.G. check if the planed time is planned for this issue

Bild 20.06.23 um 08.10.jpeg

Greetings

Nicole 

Hi @Nicole Ahlborn ,

I'm trying to get the timestamp of the last status change.

 

This is what I've done:

The REST API url is https://<domain>/rest/api/3/issue/{{issue.key}}?expand=changelog 

With the response, I've used this smart value to display the logs starting with "On" for every line

On 2022-09-30T22:42:41.792+0000 resolution changed to Resolved status changed to Closed On 2022-09-30T20:55:15.242+0000 Workflow changed to Copy of DevOps Workflow On 2022-06-28T20:28:11.684+0000 Workflow changed to IT Testing Workflow On 2022-06-28T20:14:59.903+0000 Workflow changed to Helpdesk workflow On 2022-06-28T20:00:17.603+0000 Workflow changed to IT Testing Workflow

 

What I want is to only retrieve the latest status change created timestamp. This is what I've tried. I've created the advanced branching

My {{Hists}} variable has the below smart value. 

{{webResponse.body.changelog.histories.items.field}}

 

Condition: contains "status". But when I display the logs, I'm getting every field change, not just status 

Image.JPG

See results:

Workflow, resolution, status

 

Any help is appreciated, thx.

 

Christine 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events