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

Automation help: Advanced branching and smart values

Breanna Williams July 19, 2023

Hello, I am in a company managed project as an admin.

 

I am trying to set up an automation with specific criteria

  • When all of the sub-tasks within the parent are transitioned to "completed" i would like for the Project owner (custom field) to be tagged in a comment 

I have used smart value advanced branching for this comment tagging before but cannot figure out the order the rule should go in.

 

Thank you in advance!

1 answer

1 vote
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.
July 19, 2023

Hi @Breanna Williams 

Would you please post images of your complete rule and the audit log details showing the execution?  Those may provide context for the community to offer ideas.  Thanks!

Until we see those...

I am unclear why you would need an advanced branch for this scenario.  An alternative would be:

  • trigger: issue transitioned to completed
  • action: lookup issues with JQL to find all sibling sub-tasks of the trigger issue which are NOT completed
  • advanced compare condition: confirm there are none with {{lookupIssues.size|0}} equals 0
  • action: add the comment with the user mentioned.  This will mention the user in the trigger issue (subtask).  I you instead want the comment in the parent story, you could branch to that first.

Kind regards,
Bill

Breanna Williams July 19, 2023

I was needing to use advanced branch using smart values due to it not being a specific user, but using the custom field -- making a smart value from the custom field and then mentioning the person within that field. Vs. using a specific persons account ID.

 

I do not have a screenshot of the rule as I was unable to piece it together.

@Bill Sheboy 

Like John Funk 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.
July 19, 2023

Is your custom field a user field or something else?  If it is a user field the accountId value is still available:

{{issue.myCustomUserField.accountId}}

Like John Funk likes this
Breanna Williams July 19, 2023

Screen Shot 2023-07-19 at 7.15.32 PM.png

This did not tag them when the automation occurred! It did leave the comment but there was no mention.

Breanna Williams July 19, 2023

Screen Shot 2023-07-19 at 7.17.12 PM.png

An example of what I have done before using the smart value @Bill Sheboy 

Breanna Williams July 19, 2023

Oops sorry - yes it is a custom field for a user picker (single)

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

I wonder if the smart value you are using for your field is incorrect.

Smart values are name, spacing, and case-sensitive, and when they are incorrect they just return an empty / null string.

You can confirm field's smart value using this how-to article.  Essentially you identify an example issue which has your field, call the REST API from a browser, and then search for your field on the page to find the correct smart value.

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events