I am currently administrating a JIRA project. and i have added several cutome fields. and now there is a require for restricting editing on certain fields during the lifecycle of an issue, or in another word, once some of the custom fields have been created, they should be disabled from editing for all users.
I am thinking there would be two way of doing these,
Could you guys suggest a solution or workaround doing this?
Thanks in advance.
Hang on, there's a whole lot of totally unneccesary code being thrown around here.
Peter's original answer is correct, as is Henning's follow up.
Put the field on the CREATE and VIEW screens. Do not put it on the EDIT screen.
The user can then add data to the field when it is created. They will not be able to change it again. Click-to-edit is disabled for fields that are not on the edit screen. If you need to change it later in the process, you can put it on a transition screen.
What do you mean with "during the flow"? If a field is editable on the view screen depends on if the field is on the edit screen.
If you add the field to a transition screen it's editable in this transition (independend from the view/edit editability). A transition could be "protected" by a condition.
If the fields are only viewable on the view screen (the screen associated with the view issue action in your Screen Scheme) and not on any other screen (except the screen associated with the Create issue action in your screen scheme) they can not be edited.
Thanks for answering. I'm sorry - I'm not clear on what you mean by 'move edit into the workflow'. did read over the 'above' a few times! I want everything to be editable at any time the ticket is viewed, right up until the issue is transitioned to 'archive' status - whereupon, I guess ideally I would like the 'Edit' option to simply disappear when viewing the ticket.
You can edit a field in two ways basically.
If you have it on the "edit" screen, then it's editable when editing the issue or by clicking in the view screen, and in places that support edit functions. If you remove it from there, it's effectively read-only (barring place 2)
If you put a field on a transition screen, then the user can change the content during a transition. That's "move edit into the workflow". Transitions are locked to status and can be controlled with conditions and validators.
If you want to remove "edit" for all fields of an issue because it's in a status, then the best option is to use workflow properties - set jira.editable = false on the "archive" status in your workflow. (Have a look at the default uneditable JIRA workflow - it has the flag set on "closed")
Hi Nic - thanks - the last thing you said sounds perfect for what I want to do. Unfortunately I can't view the properties of that JIRA workflow's 'closed' status precisely because it's uneditable.I tried putting jira.editable in the property key and 'false' for property value but I get Key starts with 'jira.' but is not known to JIRA...
I think that should be possible using Behavious plugin, as it allows you to make certain fields to be read-only.
You can download the plugin here:
Similar discussion was in the following Answers:
I hope that helps.
Besides using a plugin the normal way to archive this is to remove the field from the edit screen and add a transition to the corresponding workflow with a transition screen which contains the field. Access to the transition can be controlled through workflow conditions.
you can hide/show field to specific group by using following scritp, chenage custom field id, group name as per your requirement
In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to have–in order to produce a reliable long-term roadmap. We're tur...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG