"Assign to Role based on Custom Field value"?

Lara Ramsay
Contributor
July 28, 2011

Here is my situation:

Example: The transition between Steps Open and Review is called "Send for Review"

What I want to do is say "If Phase = AB, assign to AB lead" and "If Phase = XY, assign to XY lead"

Where Phase is a custom field and where I have defined AB Lead, XY Lead (and other leads) in my project roles.

Is this possible? I want a post function that says something like "Assign to Role based on Custom Field value"

At present, the way I am solving it is by having (oh dear) 5 transitions that are nearly identical.

I have a conditions on each that says the transition can only be executed if the Phase = X and then a post function assining to Lead X.

Repeat this along the workflow (I'd like this between several steps, not just the Open and Review steps) and this means where I really need to create/maintain 5 or 6 transitions in a workflow I have...25 to 30 to manage. It's less than ideal.

(I do know I could do this by creating a component and assigning to the component lead - this doesn't work for us because our projects use multiple components with multiple leads and JIRA doesn't handle this well (no way to ask "assign to which component lead?")

This doesn't seem like a super uncommon use case to me, so I'm hoping I'm just missing something really simple (it's been known to happen!)

Thanks muchly for any help.

4 answers

1 vote
MinC
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 29, 2011

Hm. What I can think of is to use the combination of the following plugins:

You need to add the Update Issue Custom Field Post-Function provided by the JIRA Suite Utilities because there is no built-in feature in JIRA which allows to update custom field post-function. Then, you need to add the Assign to role member post-function provided by the JIRA Misc Workflow Extensions plugin. This is only just my thought based from my understanding to your description. I haven't try it yet and I'm not sure if this will really work but I don't think there is any harm to give it a try.

Yes, there is no built-in assign to project role post-function in JIRA. There is a feature request has been filed here:

Add "Assign to Role Member" workflow post-function

1 vote
AlexH
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 29, 2011

I can't think of anyway to do this with the built-in functionality.

However, this would be pretty simple plugin that provides a new workflow postfunction that is hardcoded to know to which phase maps to which lead, which you could then in turn use to pull the right username from the right field and assign the issue that way during the post function.

0 votes
Ubisoft
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 4, 2014

You'D really have trouble doing this based off two different fields with any built in plugins, but a groovy script run with script runner should be able to do this relatively simply with a bunch of else ifs, and it's a free option if you can't use one of the older versions of Misc Workflow enhancer.

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2014

Hi,

JIRA Enhancer Plugin has a post function "Assign issue to a role based on a field in issue"

You can do such assignment using this plugin

Tuncay Senturk

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events