(JIRA Misc Workflow Extensions) Use selected assignee only if member of required role, assigning not correctly

Product: JIRA Misc Workflow Extensions , Version: 3.5.1

Functional description:
Use the assignee selected on the transition screen if s/he is a member of the required role, otherwise assign to default role member.

I need a more detailed description of this functionality.

I have 2 groups defined. Business and IT. If the creator of the issue is in the group of business, the issue should be automatically assigned to the default user group business.

If the creator of the issue not in the group business should the issue be automatically assigned to the default user Project (lead).

Have i understood the functionality correctly or what am I doing wrong?

12 answers

1 accepted

This widget could not be displayed.

I'm happy it works, thanks for support.

You're welcome.

Please don't forget to "accept" the right answer.

This widget could not be displayed.

Could you please describe what is not working the way you want?

This widget could not be displayed.

This widget could not be displayed.

If I use the functionality in the workflow all issues assigned to the default role member (Yan Müller),
whether I'm in the group Business or not.

I expect the issue to the default role member (Yan Müller) is connected, since the creator is in the group business, and if not in these Business Role, assigned automatically to the project lead use.

This widget could not be displayed.

This is not how this post-function works. It will always assign to the default member of the selected role (which, by the way, has nothing to do with JIRA's default role members - see the post-function documentation for details). If you use the "Use selected assignee only if..." option, it will use the assignee you select in the transition screen (only if that assignee belongs to the selected role).

Apparently, what you're looking for is different: you want the issue to be assigned to the default member of the "business" role only if the issue was created by a member of that role. Correct?

If so, you need to do three things:

- use the "Force assignment" option

- define the default role member for the post-function (see the documentation)

- add a Groovy condition to verify that the current user belongs to the appropriate role

The Groovy condition is not trivial. Try something like:

import com.atlassian.jira.ComponentManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.project.Project
import com.atlassian.jira.security.roles.ProjectRole
import com.atlassian.jira.security.roles.ProjectRoleManager

ProjectRoleManager projectRoleManager = (ProjectRoleManager) ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class);
Project project = issueObject.getProjectObject();
ProjectRole projectRole = projectRoleManager.getProjectRole("Business");
return projectRoleManager.isUserInProjectRole(ComponentAccessor.getJiraAuthenticationContext().getUser(), projectRole, project);

Of course, you'll need to replace "Business" with the appropriate role name.

This widget could not be displayed.

You need to go to the User you want to set as the default user for your Business role, and then edit their User Properties. You can use the following URL to get there quickly, replacing <username> with the real username (login) of that user, and of course your JIRA base URL:

https://<JIRA-URL>/secure/admin/user/EditUserProperties.jspa?name=<username>

Once there, you create a new User Property with key= defaultAssignee and value= RFC -> Business

(assuming RFC is the project key of the JIRA project, and Business the role name)

This will make that user the default member of the "Business" role in the "RFC" project (as far as the Assign to Role Member post-function is concerned).

This widget could not be displayed.

Correct, this is what i want. I change to "Force assignment" option of Business role an add the Groovy condition. See attachment. But I understand, according to the documentation functionality - define the default role member for the post-function, see attachment. ???

•Property key: defaultAssignee
•Property value: contains a comma-separated list of entries in the form ProjectKey ->


User Name in Property value ?

This widget could not be displayed.

I despair...

Key defaultAssignee

Value CRM, Business

comma separated ?

I gave you an example value:

RFC -&gt; Business

You need to use that exact value (assuming your project key is RFC and the role Business).

You use commas if a user needs to be the default member of several roles, or in more than one project. For example:

RFC -&gt; Business , DEMO -&gt; Developer

will make the user the default member of role Business in the RFC project and of role Developer in the DEMO project.

This widget could not be displayed.

This widget could not be displayed.

The system ignore all entries. The Issue fetch up to the last User in the Role (Business User 2)

This widget could not be displayed.

This widget could not be displayed.

sorry, is this a button?

Yes, I believe it's to the left of the answer (post).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

513 views 3 18
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