Change assignee based on custome field in workflow post function

Vidula Kulkarni March 30, 2014

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
Answer accepted
Andris Grinbergs
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.
March 30, 2014

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.

Boris Green March 30, 2014

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.

Boris Georgiev _Appfire_
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.
March 30, 2014

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.

Andris Grinbergs
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.
March 30, 2014

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: -

Andris Grinbergs
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.
March 30, 2014

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

Boris Georgiev _Appfire_
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.
March 30, 2014

Yes you're right, i missed that :)

Stéphane Eursels August 18, 2017

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.

1 vote
Boris Georgiev _Appfire_
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.
March 30, 2014

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.

Stéphane Eursels August 18, 2017

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

0 votes
Stéphane Eursels August 18, 2017

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.

0 votes
rishi_goel November 12, 2014

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

0 votes
Vidula Kulkarni March 31, 2014

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

0 votes
Vidula Kulkarni March 31, 2014

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

Suggest an answer

Log in or Sign up to answer