Post function - Update Issue Custom Field not setting value


I have recently upgraded to the latest version of script runner 3.1.3, previously 3.0.4. on JIRA v6.3.1#6329-sha1:7df76f1 (I'm guessing that's a bug in its self).

We use a the post function on the creation of a issue to - Update issue custom field - and set a custom field('Resolver Group') to 'Change Management'. this seem to have stopped working since we upgraded. meaning the ticket cannot be created unless we make the field visible on the screen, which we do not want to-do.

Any idea as to why this may have happened?

Any help would be appreciated



2 answers

Hi Daniel, Could you please post the code of your post function? Thanks, Alejo

Hi Alejo,

Thanks for the quick response, Attached is a screen of the post function.



Update Issue Custom Field Post Function not setting value.JPG

I'm afraid I cannot help here. That "Update Issue Custom Field Function" does not belong to ScriptRunner. I'll remove the SR label. Hope you don't mind

No worries, sorry about that. Do you reckon I would get the same results from using a script post function?

yes, you could do the same using ScriptRunner. something like this could do the job if the custom field type is Text: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.MutableIssue import com.atlassian.jira.issue.fields.CustomField MutableIssue issue = issue def customFieldManager = ComponentAccessor.getCustomFieldManager() CustomField resolverGroup = customFieldManager.getCustomFieldObjectByName("Resolver Group") issue.setCustomFieldValue(resolverGroup, 'Change Management')

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

972 views 3 9
Read article

Atlassian User Groups

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!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you