Forums

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

Smart values not working in the comments of the featured ticket that is linked to an Epic ticket.

Tom Goode August 31, 2023

I have an automation already linked to an epic ticket on creation.  I created a second automation to grab the description from the already linked Epic and place it in the comments of the created ticket. 

I know I can use smart values but none of them seem to work. It creates the comment section but leaves it blank where I entered a smart values. I have tried the following

{{issue.epic.summary}}

{{issue.parent.epic.summary}}

{{triggerissue.epic.summary}}

{{trigger.issue.parent.epic.summary}}

I even thought it was a timing issue so I ran the comment automation after I linked the file.

 

 

2 answers

1 accepted

0 votes
Answer accepted
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.
August 31, 2023

Hi @Tom Goode 

Context is important for automation rules...

Would you please post images of your complete automation rule, including details of the actions, and of the audit log showing the rule run?  Those may help to explain what you are observing and which smart value expression will help.

Until we see those...

In some cases, issue smart values have information about the related issues, like {{issue.parent}} However those cannot be repeatedly drilled down into, lower (or higher) and so on.  If they did, a single rule could potentially pull in all the data in the Jira site!  Instead we often need to either branch to issues, or access them using actions like Lookup Issues.

Kind regards,
Bill

Tom Goode September 13, 2023

 Maybe I confused it with too much information. I have a custom field "StoreXXX"(Where XXX is the store number) in my user portal form and when they select it and submit, it links it to an epic that matches the store number. All I want is to show the description of that Epic in the comments field of the new ticket. 

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.
September 13, 2023

Again without seeing your rule, I am guessing on the context of where in the rule you are trying to access these fields...

Let's assume the trigger issue is a Story, and that has an Epic parent.

For a company-managed project, the field you want is:

{{triggerIssue.epic.description}}

And for a team-managed project, epics are handled differently.  That would be:

{{triggerIssue.parent.description}}

  

Tom Goode September 21, 2023

Here is the global automation below. Our epics are created for each store. This takes the store number {{store}}  when value changes for store/DC. and uses it to link the ticket to the epic that matches the store number using. Thanks!

 

Epic 1.jpgEpic 2.jpgEpic 3.jpg

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.
September 21, 2023

Thanks for the rule images. 

I do not believe you need those Re-fetch Issue actions as the rule is not changing anything...and I do not see anything else in this rule that could produce timing problems.

Would you please post an image of the audit log details showing the rule execution, and explain for that case what is not working as expected?  That may help to explain what you are seeing.  Thanks!

Like Tom Goode likes this
Tom Goode September 21, 2023

This rule is working however I would like to add to it an action that would copy the summary of the linked epic and place it in the comments of the ticket that was just created. Thanks again. 

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.
September 21, 2023

Gotcha; that cannot be done inside of that branch, as an edit would try changing the linked, epic the rule is branching-to.

Instead, you can do this after the branch:

  • action: lookup issues with JQL to find that same epic
    • component = "{{Shop}}" AND issueType = Epic
  • advanced compare condition: to ensure the lookup found the epic
    • first value: {{lookupIssues.size|0}}
    • condition: equals
    • second value: 1
  • action: comment on issue (this will now edit the trigger issue as it is outside of the branch) with the value of {{lookupIssues.summary}}
Tom Goode September 21, 2023

Ok I will give this a try thanks!

Tom Goode September 21, 2023

Thank you! That worked like a charm!!!

Like Bill Sheboy likes this
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.
September 21, 2023

Awesome; I am glad to learn that helped!

Please consider marking this question as "answered" as that will help others with similar needs find solutions faster.  Thanks!

0 votes
Tom Goode September 13, 2023

Maybe I confused it with too much information. I have a custom field "StoreXXX"(Where XXX is the store number) in my user portal form and when they select it and submit, it links it to an epic that matches the store number. All I want is to show the description of that Epic in the comments field of the new ticket. 

Suggest an answer

Log in or Sign up to answer