How to Allow Users to Assign Issues Only in a Specific Transition

Still need help?

The Atlassian Community is here for you.

Ask the community

Description

In JIRA, you cannot restrict a user to assign an issue only in an specific transition (natively). What you can do is to use a third party plugin called JIRA Suite Utilities and do some project and workflow changes.

As this solution requires using a third party plugin, it is not supported by Atlassian.

The goal is to allow this: when creating an issue, only the users which are in the "assign role" will see available the action of assigning an user through a screen; they will not be able to assign users to issues at other steps of the workflow (only a manager will have ability to do that).

Solution

To address the proposed scenario, you should do the following:

1. Install the JIRA Suite Utilities plugin. If you downloaded the 0.7.13 or a newer version, place the jar file in the $JIRA-HOME/plugins/installed-plugins directory. If you have an older version, place the jar file in the $JIRA-INSTALLATION/atlassian-jira/WEB-INF/lib directory. After this, restart JIRA.

2. Install the User Picker From Project Role plugin. To do it, follow the instructions here.

3. For the proper project(s), create a project role (called "Assign Role", for example).

4. In the proper permission scheme, grant the "Assign Issues" permission to a single user: the manager. This way, only him will have the ability to assign users to issues at any step of the workflow.

5. In the proper permission scheme, grant the "Assignable User" permission to the project role you created in step 3.

6. Edit the project role you created in step 3 to add the users that must have the permission to assign other users when creating an issue (as defined by the manager).

7. Create a screen (called "Assign Screen", for example). In this screen you will only have a custom field which you will create in the next step.

8. Create a custom field of "User picker from project role" type (called "Assigned User", for example). Associate this field with the screen you created in step 7. Configure an option to this field by informing the name of the role you created in step 3 in the "Add Value" field (the option added here is the role which will be searched by the plugin, so only members of this role will be listed in the plugin's user picker field).

9. Edit the proper workflow to add a new transition in the "Open" state (called "Assign", for example). When creating the transition, select the screen you created in step 7 as the "Transition View" and set "Open" as the "Destination Step".

10. Edit the transition you created in step 9 to add the "Copy Value From Other Field" post function. Configure the post function to have the field you created in step 8 as the "Source Field" and the "Assignee" field as the "Destination Field".

11. Edit the transition you created in step 9 to add the "User Is In Project Role" condition. Select the role you created in step 3 as the "Project Role".

12. Edit the proper project(s) to have "Unassigned" as the "Default Assignee". To be able to do this, you must have the "Allow unassigned issues" option set to "ON".

This was tested in JIRA 4.0.2 and JIRA 4.1.2.

Although the User Picker From Project Role plugin has versions compatible up to JIRA 4.0.2, the 1.5.1 version of the plugin was tested in JIRA 4.1.2 and it worked.

See also

This article presents a complementary solution:

Last modified on Jan 10, 2011

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.