Smart Value for Parent Issue's worklog

Nawaaz SOHAWON March 5, 2021

Hi,

I am trying to get the "Worklog" value from a parent ticket to be added to a linked issue's "Worklog"

{
"update": {
"worklog" : [
{
"add": {
"timeSpent" : "2d"
}
}
]
}
}
}

I need the smart value for the PARENT ISSUE'S WORKLOG as value for the "timeSpent". 

I have already tried the following:

  • "timeSpent" : "{{issue.parent.worklog.timeSpent}}"
  • "timeSpent" : "{{issue.parent.worklog}}"

Anyone knows the answer?

Regards,

Nawaaz

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2021

Hi @Nawaaz SOHAWON 

Automation doesn't load all the issues in the tree (issue to parent to links...) into the scope at run time.  Instead, I believe that you will first need to get at the parent issue, perhaps using a Branch statement, and then store the value in a Create Variable.  Then you could use that variable's smart value in the child issue.

Best regards,

Bill

Nawaaz SOHAWON March 5, 2021

Hello @Bill Sheboy ,

Thanks for your response.

Actually I managed to pull the trigger issue's worklog time spent by using this value:

{
"update": {
"worklog" : [
{
"add": {
"timeSpent" : "{{triggerissue.worklog.timeSpent}}"
}
}
]
}
}
}

And it works perfectly.

Regards,

Nawaaz

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events