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

Automation Assign Issue transition to someone who wasn't just working on it

Adrienne Van Halem October 11, 2022

I would like to create an Automation:

When: Issue transitioned from In Progress to Ready for Review

Assign issue to A user in a defined list, Round-Robin

User list: X, Y, Z

But not the person who just did the last task. 

Documents are being written and it needs to be assigned to someone new for review. ie. X,Y and Z are all on the list of people who can be assigned to, but X did the document writing, so Y or Z should review it.

Any way to add this rule? like a NOT {{assigned to}} limiter?

Thank you!

3 answers

1 accepted

0 votes
Answer accepted
Adrienne Van Halem October 11, 2022

@Bill Sheboy @Mark Segall Using 'Balanced workload' I've attempted to put 

assignee != currentassignee

into 'JQL to restrict issues'.

I'm not sure if this will work as intended. It's allowed me to list users to choose from, does this function limit the selection of the assignee to be NOT the current assignee?

Small team. 3 people the flow could go to. 6 people who could be 'current assignee'

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.
October 11, 2022

When using balanced workload with that JQL statement, the rule editor states that:

The issue will be assigned to the user with the least amount of open issues assigned to them as defined by the jql. If multiple users have the same count, one will be randomly selected. For project scoped rules, only issues in that project will be counted.

So...I interpret that statement means if your JQL excludes the current user assigned from issues then the current user is more likely to be selected: they will have a zero number of issues returned by the JQL.

Like Simmo likes this
Simmo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2022

That's right, the JQL is intended to help balance the load not filter out

Like # people like this
Adrienne Van Halem October 13, 2022

I was attempting to do it via Smart Value but I'm struggling with the syntax (not a coder). Would it be possible to do that way?

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.
October 13, 2022

Adrienne, would you please explain what you mean another way, as I am not understanding?  Thanks!

Adrienne Van Halem October 14, 2022

Right now I was trying to do it wrongly using the JQL filter, but there's a Smart Value option.

I was thinking {{assignee}} != {{currentassignee}} to generate a return where the person it is then assigned (reviewer) to is not the same as the one who it is currently assigned to (writer). And if this does work, is there a way I can also add specific people/group to the pool of who it chooses from?

X is writing it and is done. I want it to randomly choose from X,Y or Z who are reviewers, but I want to eliminate X as an option because they wrote it.

It could also be that A or B wrote it and therefore XYZ are all available for random review assignment.

image.png

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.
October 14, 2022

The "Assign the issue to"..."Smart value" does not work that way; it assigns to the one-and-only-one user identified by the smart value expression.  For example, just to {{issue.reporter}}

As I noted earlier, I tried an experiment to dynamically create a list of users (e.g. X, Y, Z), remove the current assignee (e.g. X), and then randomly select from the remainder.  That was not possible because of limitations in smart value processing. 

(Specifically, a created variable cannot be used in a function for list filtering.  Atlassian has indicated they do not plan to fix/change that behavior: https://codebarrel.atlassian.net/browse/AUT-2430 )

Adrienne Van Halem October 17, 2022

Thank you for the feedback and update, oh well, not going to happen. thanks for the info!

Like Bill Sheboy likes this
3 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.
October 11, 2022

Hi @Adrienne Van Halem -- Welcome to the Atlassian Community!

I do not think that is easily supported with out-of-the box features of automation rules.  I suggest trying team or self-assignment instead.

More on your specific use case...

I just did a quick test and confirmed I was not able to do this with a created variable list of users.  (The problem is the list function get() cannot take a variable as a parameter; if it did this would be possible by generating a random number to pick the next person.)

An elaborate work-around would be to create a Jira user group specifically for this assignment, replace the members with the REST API function to not include the current assignee, and then use the built-in random assignment.

Kind regards,
Bill

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 11, 2022

Hi @Adrienne Van Halem and welcome to the community!

The round robin could get quite complex.  How many people are on the team?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events