Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Give Assign Permission in Workflow Transition But Not Workflow Step

neil1967 October 29, 2012

Running Jira 4.4.4. On a per workflow step basis, hoping to restrict users who can assign in an outgoing workflow transition without having the Assign button appear in the View Issue of the workflow step the transition goes out of.

I can't globally remove the Assign button so changing the "ops bar assign link" is not possible. I also can't have this set through roles, groups or individuals in the permission scheme either, since I need to control it at the Workflow step level with assignees that may change. It must be on a workflow transition basis.

When I try to use the properties of the transition to set jira.permission.assign.assignee to "granted" this is fine, but unless I specify a larger group from which to restrict this in the Workflow Step, that Assignee won't have permission in the transition either. And if I do make a larger group from which to restrict it, the user I'm trying to force into using the Assign field in the Transition instead of in the View Issue screen It's one of my pet peeves about jira that you can't add assignees from originally granting no permission in the permission scheme, as this would solve the problem. Instead, you have to go from largest group in Permission Scheme to a subset of that group in the Workflow Step to subset of THAT in the Workflow Transition. Annoying!

Any way to accomplish this? Thanks!

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Adam Barylak
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 7, 2013

This solution has worked for me. Instead of removing permissions, i simply removed the buttons from the view screen. This has worked for me in JIRA 5, so you may have to look at the page code to ensure the object IDs are still the same or adjust as needed. Just place the below code into the announcement banner or in the description of a field in the field configuration for a field which is on the view screen. I used the Component/s field. This script will allow you to control when the buttons are removed by Project, Issue Type, and Status or by any combination thereof.

<script type='text/javascript'>
AJS.$(document).ready(function() {
        var workflowState = AJS.$('#status-val img').attr('alt');
        var issueType = AJS.$('#type-val img').attr('alt');
        var projectName = AJS.$('#heading-avatar img').attr('alt');
        if(workflowState == 'New' && issueType == 'Ticket' && projectName == 'IT Support')
        {
           var btnAssignToMe = AJS.$("#assign-to-me");
           var btnAssign = AJS.$("#assign-issue");
 
           btnAssignToMe.parent().remove();
           btnAssign.parent().remove();
      }
});
</script>

Hope that helps.

0 votes
Vincent Thoulé
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.
November 28, 2012

Have a look in Minyaa on User By Workflow Step.

It is always based on Workflow Step and not Transition, but it does not restrict existing permission, but it gives how to identify users that will be granted in the Permission scheme.

0 votes
MattS
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.
October 30, 2012

Sounds like a plugin with a custom condition to me. The condition can be based on the name of the transition or some such.

TAGS
AUG Leaders

Atlassian Community Events