How do I prevent a field from being edited after an issue has reached a particular workflow status?

Example: When an issue is moved to the 'backlog' status, I want to prevent the description field from being edited ever again, regardless of its new status, by a particular role (such as a client).

2 answers

1 accepted

Accepted Answer
2 votes

Hi Mercedes

You can use the jira.issue.editable flag to enable/disable editing of issues.

You can refer to this link: https://confluence.atlassian.com/display/JIRA/Allow+editing+of+Closed+Issues as a guideline

Thanks

This appears to freeze the entire issue. I only want to lock one field (description). Is there a way to achieve this?

If you use Hashimis solution you could add to this Backlog status a transition called "Edit" which goes back to Backlog. Add a screen to this transition with all but description field. So for a user it looks like the Edit button has moved and the user won't be able to edit the description when he clicks the "Edit" transition.

That's a creative approach. Would they still be able to edit the description in the full issue view?

No, in that Backlog status editing is blocked, you would only be able to use that "Edit" transition (whithout description). In all other status (where jira.issue.editable is enabled) you would be able to edit all fields.

While we use similiar approach in some projects you should be aware that it has some "side-effects". There is no more inline edit capability for issues in Backlog status and also bulk edit is not available for issues in Backlog status.

Thanks for your insights Hashimi, Udo and Clemens. While not an ideal solution, it would appear this is the answer to my question (at least for now!).

Glad we could help. One more point. In order to have your notifications behave as normal you would need to fire the issue update event in that "Edit" transition.

Hi Mercedes,

 

The Live Fields feature from JJupin plugin can disable a field(i.e. make it read-only). Check it out: http://confluence.kepler-rominfo.com/display/JJUP30/lfDisable , we have a couple of tutorials and recipes here too: http://confluence.kepler-rominfo.com/display/TR/Tutorials . All of them are powered by our Simple Issue Language (SIL).

 

Best regards,

Silviu

JJupin is not available for JIRA Cloud!

Oh, I haven't noticed that. I'm sorry! However, I will keep the answer, maybe someone with a server instance may need it.

Thanks for taking time to comment :)

Doesn't work on JIRA Server. Couldn't disable a field. Here's what i put in the post function:

lfDisable("assignee");

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

25,580 views 2 7
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you