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

Mercedes January 19, 2015

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

4 votes
Answer accepted
Hashimi January 19, 2015

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

Mercedes January 21, 2015

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

Udo Brand
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.
January 21, 2015

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.

Mercedes January 21, 2015

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

Udo Brand
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.
January 21, 2015

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.

Clemens Luebbers January 21, 2015

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.

Mercedes January 22, 2015

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!).

Udo Brand
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.
January 22, 2015

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.

Evan Mahgerefteh May 16, 2019

Hi, 

I tried to apply this however it isn't actually locking the issue in the status where I applied the property. Anyone have any advice? 

Kevin Maes February 25, 2020

Another side-effect is that eg Tempo Timesheets app counts on the issue-editable = true

So no time registration is possible, this is an issue for us

Kevin Maes February 26, 2020

Scriptrunner Behaviours can limit editability of fields combined with conditions: status, transition, user roles ...

0 votes
Silviu Burcea
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.
January 19, 2015

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

Udo Brand
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.
January 19, 2015

JJupin is not available for JIRA Cloud!

Silviu Burcea
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.
January 19, 2015

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

Mercedes January 21, 2015

Thanks for taking time to comment :)

Shubham Aggarwal March 12, 2018

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