Product: JIRA Misc Workflow Extensions , Version: 3.5.1
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?
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 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.
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:
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).
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 ?
I gave you an example value:
RFC -> 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 -> Business , DEMO -> Developer
will make the user the default member of role Business in the RFC project and of role Developer in the DEMO project.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...
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!
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