Hi All
Recently, I used Script Runner to set the value of a custom field, and no error was displayed when I set it. When I tested and verified it, the following error was displayed
"Error occurred while creating issue. This could be due to a plugin being incompatible with this version of JIRA. For more details please consult the logs"
My code is as follows:
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.customFieldManager
def custom_field = customFieldManager.getCustomFieldObject('customfield_14015')
issue.setCustomFieldValue(custom_field,"test")
This is a single field, I used a similar method before, set the text field, is normal, the corresponding code is as follows
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.customFieldManager
def link = customFieldManager.getCustomFieldObject('customfield_14007')
def key = issue.key
def k =key.toString()
def web = url + k
issue.setCustomFieldValue(link,web)
Is it because the custom fields are inconsistent, so you can't use this method to set field values
My Jira version: 8.13.3
Plug-in version: 6.51.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.