Post function - Update Issue Custom Field not setting value

Daniel Perdisatt August 5, 2015

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

0 votes
Daniel Perdisatt August 5, 2015

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

Alejo Villarrubia [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

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

Daniel Perdisatt August 5, 2015

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

Alejo Villarrubia [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

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')

0 votes
Alejo Villarrubia [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

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

Suggest an answer

Log in or Sign up to answer