Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to update a smart value?

Clara Beyer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2020

Hi team! Here's what I'm trying to do - and there are a couple routes that I think might get me there.

I'm creating a jira automation. What i want it to do is look at an issue, look at all the subtasks on that issue, find those subtasks due dates, and print the whole "project timeline" into the description of the main issue, for visibility's sake. 

Theory 1: I can use JQL.

Well, I can use a JQL lookup to get the subtasks. But the {{lookupItems}} variable doesn't give me access to all of the subtasks' fields - and due date isn't on the list of fields I get access to. So that's not going to work.

Theory 2: I can use the subtasks loop.

If I open up a branch to loop through the subtasks of the parent issue, then I can get the subtasks' due dates, but I can't set them to a variable that I could then use outside of the loop, I don't think. I tried creating a variable outside the subtasks loop, then re-assigning that variable inside the loop, but it didn't work (Screenshots attached).

Screen Shot 2020-06-26 at 5.15.04 PM.pngScreen Shot 2020-06-26 at 5.15.23 PM.png

 

So. I'm stuck. Is there a way to concatenate values and put them in a smart variable, as I've tried to do here? Then I could separate the string into a list and iterate through.

Or: is there a way to query more fields from the lookup issues action? I just want to be able to reference the due dates on subtasks! It feels like that should be possible!

 

[ EDIT ]: I have, since posting this, looked into using webhooks! However, I would basically then be using entity properties as just temporary memory for a variable. Within the subtask loop, I would have to GET-request the "duedates" entity property on the parent issue, then POST-request that entity again with the "old value + this issue's duedate". which would be, for an issue with 8 subtasks, 16 different http requests just to build an array. which seems WILDLY inefficient. 

I'm now looking at entity properties in general as a solution... any further insights here, team? 

1 answer

1 accepted

2 votes
Answer accepted
Sherry Goyal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2020

Hello Clara

 

Thanks for writing to us and doing so much of research

Can you try something like this:

Screen Shot 2020-07-03 at 3.31.41 pm.png

Cheers

Sherry

Clara Beyer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2020

Oh my god it was this simple and i was out here considering creating a lambda server for webhooks like an absolute madwoman.  I had no idea variables could have spaces in them, so I'd tried duedate and dueDate.... 

This worked perfectly. Thank you!

Like Daniel Eads likes this
Sherry Goyal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 6, 2020

@Clara Beyer  No worries. Glad it worked out!

Cheers
Sherry

Suggest an answer

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

Atlassian Community Events