Hi,
Currently, I've limited the edit options for some user groups. They can create an issue but never edit the ticket. However, I would like some fields to be editable yet others not to be. How can this be done?
I've tried using behavior, but if you set some field for a group to readOnly, it becomes readonly when creating the ticket as well. So now, I'm trying to set up a script to get this working for me in combination with the standard condition options in behaviors:
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.ComponentManager;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.customfields.option.LazyLoadedOption;
//Setting some fields to non-editable
def customField1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_13803");
if (getFieldScreen().name != "Axon Delivery - create") {customField1.setReadOnly(true)}
You use jira workflow transition for updating field values instead of using Edit operations. Using condition you can restrict the transition to certain groups only.
Actually, I'm really trying to avoid any unnecessary transitions as they clog up the flow. So if there is a way with behaviors / scripts that would be very helpful.
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.