As an admin, I'd like to make all but three fields read only after a certain transition.
Further, I'd like to make all fields read only once the ticket is closed.
Hi,
To make all fields read-only once the ticket is closed, you will have to set the property that status:
Property Key = jira.issue.editable
Property Value = false
For making some of the fields read only after a certain transition, you can try using the workflow post functions for this transition.
Hope this helps.
Thanks,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your response.
The solution for making all of the fields read-only works. However, I have not found any post function that can set a field at this level.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have ScriptRunner installed, you can use Behaviors to implement this.
def custom_field_1 = getFieldById("customfield_12345")
def custom_field_2 = getFieldById("customfield_67890")
if (underlyingIssue.getStatus().name == "Status Name") {
custom_field_1.setReadOnly(true);
custom_field_2.setReadOnly(true);
}
else {
custom_field_1.setReadOnly(false);
custom_field_2.setReadOnly(false);
}
Hope this helps.
Thanks,
Vamsi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Will this work in Behaviors Cloud? How can we restrict the field for group or role?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try something like this
const triggerField = getFieldById('customfield_11609');
const showField0 = getFieldById('customfield_11610');
const showField1 = getFieldById('customfield_11611');
const triggerFieldValue = triggerField.getValue().value
switch (triggerFieldValue) {
case 'Yes':
showField0.setVisible(true);
showField0.setRequired(true);
showField1.setVisible(true);
showField1.setRequired(true);
break;
case 'No':
showField0.setVisible(false);
showField0.setRequired(true);
showField1.setVisible(false);
break;
}
OR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira doesn't have a function for this.
There is an ugly "fix" for it, which involves moving all of your "edit" functionality into the workflow, but I doubt you really want to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You remove the fields you don't want people to edit from the "edit" screen for the issue type, then edit the workflow, adding looped transitions that use a screen that does have the fields. You add them to any status that you want to allow fields to be edited. Looped transitions go back to where they started, they don't appear to change the status, but they can take you through a different "edit" screen.
It's ugly, but it does the job.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.