Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner Cloud: customfield condition in post function

Peter Friberg January 7, 2019

Considering myself quite good at scripting with Scriptrunner Server, but now I need to do things with the Cloud variant. Going back to beginner phase it seems :/

Struggling with this simple thing:

Have a checkbox customfield with one option "Yes". A check for "Yes" shall me made as condition for additional code to execute. 

I can't find a way to extract the value "Yes".

I've tried various variants of casting and attribution on

def release = issue.fields['customfield_10946']

I just get the full response like

[{self=https://xxx-projects.atlassian.net/rest/api/2/customFieldOption/10212, disabled=false, id=10212, value=YES}]

or errors

Check for null does not work either.
Would be happy for help in this specific case.

The additional code to execute is to release a version, which is the issue fixVersion.
Maybe it is this?

def fixVersions = issue.fields.versions

But I'm not really sure of what I get, and what would be the best/simplest way to release.

 

Thanks

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events