Post function - Update Issue Custom Field not setting value

Hi,

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

Thanks,

Dan

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.

Thanks,

Dan

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

365 views 4 10
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