• Blog
  • Workflows
  • See an easy solution to protect issue fields with a single workflow transition
Author: Bogdan Gorka
Published: December 13, 2020
CategoryWorkflows

In this article I will show you a simple but powerful use case of how you can utilize Jira workflow transition to protect Jira issue fields content. This is another type of Jira issue security which you can introduce to your project configuration, where you will not need to introduce any customizations with a plugin.

Protect screen fields in selected status

In this use case, I want to make sure that during the entire lifecycle of a selected task type, only members of a certain role will be able to make changes. I cannot use the Jira workflow property on each status in the same way as I described in this article, because this would disable issue editing completely. My goal is to disable it only for certain project roles.

To illustrate this use case, I will use an issue ‘Requirement’

protect-screen-fields-workflow-transition-01

As the owner of this requirement, as soon as it is transitioned to status ‘In Progress’, I want to make sure that it will not be changed by unauthorized users i.e. users in role ‘Project Members’.

protect-screen-fields-workflow-transition-02

When I transition the issue to the next status ‘In Progress’, Project Members will only be able to add comments. Editing has been selectively switched off only for them. However, editing is still possible for users in role Project Manager. This scenario can be useful when, for example, a Project Manager wants to change and Epic Link and associated this Requirement issue to another Epic.

When you look at the same issue ‘Requirement’ but as Project Manager, you will see a special transition button ‘Modify Issue’ which will allow you to modify certain, selected fields. 

protect-screen-fields-workflow-transition-03

No fields will be editable to users in the ‘Project Manager’ role unless the transition button ‘Modify issue’ is clicked. 

protect-screen-fields-workflow-transition-04

Deciding which fields you want to put on this screen gives you an additional possibility to select which fields you want to allow to be modified. This can be an Epic Link field, Fix Version, Assignee or any other field which is present on the main issue screen.

Modify workflow and add the role-based condition

To prepare this configuration, go to Jira Administration / Workflows and find the workflow you want to modify. In the Edit mode 

protect-screen-fields-workflow-transition-05

Create a new transition, where the source and target of this transition will be the same status. Sometimes this time of transition is called ‘loop’ or ‘looping’ transition.

Select this transition and you will need to do two modifications:

1) Create a condition that only users in a role ‘Project Manager’ can do the change. Use the condition 

protect-screen-fields-workflow-transition-06

Save it and you will see this condition added.

protect-screen-fields-workflow-transition-07

2) The second modification is about adding a transition screen. Prepare a screen with only the fields you want to allow to be modified. Remember about the naming convention when you create a new screen. Then add the screen to the transition.

protect-screen-fields-workflow-transition-08

Now publish the workflow and test your new configuration.

Before you go…

If, for any reason, you also want to disable adding any comments when an issue is in status ‘In Progress’, you can supplement the status properties with a workflow property jira.permission.comment.denied. You can learn more here on this property can be used to disable issue editing using workflow properties.


Spread the knowledge, share with others

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
Teach Yourself Jira Ebook Cover

Get free e-book

Teach Yourself Jira Administration

Join our ever growing group of Jira Administration enthusiasts and get this e-book for free.

Teach Yourself Jira Administration is my selection of best Jira Administration courses for Jira - over 30 hours of recordings.

In this e-book I selected only the few recommended courses with good and effective content for which you do not have to pay (if you follow my instructions).