Forums

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

Is there a SmartValue for team members so I can Assign Tasks?

Justin Turner February 7, 2022

Hi All - I am trying to auto create template tasks for each member of my team. I would like to use the advanced branching function so that I can create the task just once in the rule and end up with: FOR EACH Team Member CREATE Task

 

I saw from another thread that there is no SmartValue for groups, does this apply to teams as well? Is there a way to manually create a list in a SmartValue that can be called later in an automation? 

Just to be clear, I am not looking to round robin assign, assign one person to one issue or assign many people to one issue. I am trying to create the same issue multiple times and each one is assigned to a member of my team so that every member gets assigned their own copy of the issue.  

1 answer

1 accepted

0 votes
Answer accepted
John Funk
Community Champion
February 7, 2022

Hi Justin,

I don't know of a way this would be possible with Automation. Maybe with the API? 

@Bill Sheboy  - thoughts?

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.
February 7, 2022

Hi @Justin Turner and @John Funk 

You are correct that most of the smart values are issue-based, but your use case is possible with the REST API...and there is a quicker way to expedite this.

First the longer way:

If you have not called the REST API from a rule before, please take a look at this article for how-to: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

Such a rule will take several seconds for each REST API call.  If your team membership is stable, the quicker way to get this done is to identify the account ID values for the people, and hardcode those values in a created variable...then use that in the advanced branch.

Kind regards,
Bill

Justin Turner February 9, 2022

@Bill Sheboy Thank you so much for this detailed response. I have not tried using the REST API yet, so will dive into learning that. 

As far as the quick way, my team is very stable - as in one change every couple of years. So hard coding it would not be to problematic for me. However, I can't figure out how to put all the IDs into one variable. I tried entering a comma separated list of user IDs (aaa,bbb,ccc) but the smart value seems to be treated as one item instead of a list. Am I missing something?

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.
February 9, 2022

Hi, Justin!

Please try dropping the parentheses and just use the accountId values and commas, like this.  Remember to use the actual accountId values and not the names.

userId1,userId2,userId3

Then in your advanced branch, split them like this, substituting your variable name for myVariableName:

{{myVariableName.split(",")}}

 

Like Justin Turner likes this
Justin Turner February 10, 2022

Thanks for all your help on this @Bill Sheboy I had to do one additional step after the above. I still couldn't use 

{{advancedBranching}}

in the Assignee field for creating subtasks. However, I could create a new variable, assign the value of the new variable to be advancedBranching, and then use that new variable in the assignee field. 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer