Change assignee based on custome field in workflow post function

Hi, How do I change assignee depending on the value of a custom field as a post function of workflow transition?

We have a custome field called 'Requesting Client'. If this has a value 'Internal Test Team', the assignee should be changed. This needs to happen as a post function during a particular transition in our workflow.

Thanks

6 answers

1 accepted

1 vote
Accepted answer

One of options is following:

Create as many transitions as you have custom field different value options. In each put condition for specific value and post function : "Update Issue Field" for specific assignee value.

I'm not sure this is an option as the users will have to choose from executing two transitions that are logically the same and in some cases the transition will not be allowed and they'll have to choose the other wchich seems confusing to me.

I'm not sure this is an option as the users will have to choose from executing two transitions that are logically the same and in some cases the transition will not be allowed and they'll have to choose the other wchich seems confusing to me.

For example:

==================

Transition 1

Name: ABC

Condition: Value Field (Requesting Client = Internal Test Team

Post function: Update Issue Field (Assignee = some_user)

==================

Transition 2

Name: ABC

Condition: Value Field (Requesting Client != Internal Test Team)

Post function: -

Users will only see one transition(Because of condition(not validator)). So they will choose correct one every time.

Yes you're right, i missed that :)

The only problem is that you cannot have two transitions with the same name.

It's work but It's not completely transparent for the user.

You can use a post function from Jira Misc Workflow Exensions("Set Field Value to constant or Groovy expression") to set the asignee field value. It allows putting a groovy condition, so the field will be set only if the condition is true.

This solution looks better but I don't have the experience to make it.

Thanks Boris and Andris. I will try these options and post my feedback.

Creating 2 transition with different conditions works great. Thank you very much.

Can we use this for "create issue" transition? I do not see Conditions for create issue transition. We have JIRA on demand instance.

The only problem is that you cannot have two transitions with the same name.

It's work but It's not completely transparent for the user.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 13, 2019 in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

624 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you