Prevent users to edit field in a specific status

guillermo.casco@grey.com November 20, 2021

Hello all, I have read a couple of post and wasn´t able to find a way to achieve what I want.

I want that if the status of a ticket is in "working",  there is no way to  edit one of the custom fields .  

2 answers

1 accepted

5 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2021

Hi guillermo.casco@grey.com 

Out of the box, you can't achieve that, since Jira do not provide field level security and editability per se. There are solutions and workaround which I describe below:

  • Use a listener (scriptrunner or JMWE or similar app) to prevent the field from changing value to that specific status
  • Completely prevent the issue of being edited on the specific status, by using workflow properties inside your workflow (jira.issue.editable).
  • Remove that field from the issue's edit view completely and add a self transition to edit that specific field (use a transition screen with this field in it) to all statuses except the Working status.

Let me know if any of the above solution would be suitable for you.

guillermo.casco@grey.com November 22, 2021

Hello @Alex Koxaras _Relational_ quite interested in option 1 or 3.  not sure how to do it , do you have an example or something? thank you

guillermo.casco@grey.com November 22, 2021

Option 2 I think I know how..thing is that ALL fields will be "non editable".

Regarding option 3 not quite sure the aproach there. 

Like Setic likes this
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 22, 2021

Let's examine the 3rd case which is doable without any additional app:

First of all you have to get rid of that specific field from the edit screen. With that said the user will be able to enter in upon issue creation and only view it within the new issue view (clicking it, will not go into edit mode).

STEP 1: To do that I would go to project settings > screens and click the individual screens to edit them and to make sure that this field will be only visible on the create and view issue operation:

step01.png

 

step01a.png

In that point you would want to try open an issue of that specific issue type and try to see if that field is editable (it shouldn't be).

STEP 2: Go to cog > issues > screens > add screen. Give it a name and edit it so as to add your field to that screen:

step02a.png

step02b.png

STEP 3: Next step is to edit our workflow. Head on to project settings > workflows, and click that pencil icon of the specific issue type:

step02.png

 

  • Click diagram > add transition
  • From status: Any status
  • To status: itself
  • Name: Edit "YOUFIELDNAME"
  • Screen: Choose the screen you created in the previous step
  • Click Add

step03b.png

 

  • Click that transition and then click Conditions
    step03c.png
  • Click Add condition > Previous Status Condition > Add
  • Configure the condition like the image below, but choose your own status to which you don't want the users to edit this field
    step04d.png
  • Click update
  • Click Publish Draftstep043e.png

 

The results are shown below:

 

Initial status with the Edit Client transition visible.

Result01.png

 

Clicking it will popup the screen to edit it

result02.png

 

On the In Progress status the field is locked, since the Edit Client transition is not visible:

result03.png

 

 

BUt on the next status (or any other status) the transition will be available

result04.png

 

Hope it helps. Took about 25 minutes for this reply :D lol

Like # people like this
guillermo.casco@grey.com November 23, 2021

thank you very much  @Alex Koxaras _Relational_! was able to do it now that way. 

Like # people like this
lintek214 October 21, 2022

What would this look like if I wanted to lock down multiple fields in multiple states of the workflow. Would be a bit complicated to setup, yes?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 21, 2022

@lintek214 the more "locked" fields on different statuses, the more work needs to be done and more maintenance. But it's a rather easy thing to do. 

lintek214 October 21, 2022

I think it would better to have a properties setting within the base and custom field configuration area to allow the admin to select which screen in a state to disable the ability to edit a field. The default would always be "true" to allow edits. Feature?

lintek214 October 22, 2022

I tested out this scenario which works pretty well.

1. I created transition screens to map to my individual "in progress" states

2. I used the security property "jira.issue.editable=false" for each of those states

What I have now is allowing users to edit specific fields configured in the transition screens only. Once the transition is completed and the screen defined as my VIEW screen is displayed. All the filed accept for Assignee is secured. I don't know why Assignee can't be secured, but of well.

I use to work with a application called Synergy Change and I remembered that's how it was setup to bring security over fields within the states. And I think there was a number of required field settings in that configuration. Man, these workflow tools are a beast to manage.

Dan McLean August 31, 2023

@Alex Koxaras _Relational_ does this only work for custom fields? I.e I followed all of the steps you had here to limit the editing of the story points field once an issue moves to in progress and it would not work for me. I can continue to edit that field regardless of the status it is in. 

Joanna Pietruszka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 11, 2023

@Alex Koxaras _Relational_ how can I achieve option 1 with JMWE? Could you share the example or how to do it? Thanks a lot!

  • Use a listener (scriptrunner or JMWE or similar app) to prevent the field from changing value to that specific status
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2023

Hi @Joanna Pietruszka and welcome to the community,

Not the best practice, but you can use the listener to switch the value back to what it was. However this would confuse the user a lot and so I wouldn't recommend it. Best approach would be the one I describe above. In any case as Esraa mentioned, vote and watch this issue for updates https://jira.atlassian.com/browse/JRACLOUD-78768

2 votes
Esraa Mahmoud
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 29, 2022

Feature request for the same please vote & watch for updates 😊

https://jira.atlassian.com/browse/JRACLOUD-78768

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events