Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JIRA misc workflow utilities groovy expression

Julie Shean July 29, 2015

The workflow won't load – errors on a create issue post function to append value from one custom field to another when the source custom field is NULL. How can I use a Groovy expression  in Copy Value From Field to Field Function (new in 2.3) to prevent this error? 

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Julie Shean July 29, 2015

excellent-- thank you!

0 votes
Julie Shean July 29, 2015
So...
this:
issue.get("customfield_13632") != null
??
Or something more like:
if(issue.get("customfield_13632") != null) {
return true;
} else {
return false;
}
David _old account_
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.
July 29, 2015

In Groovy (or Java), the two are equivalent.

0 votes
David _old account_
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.
July 29, 2015

You can add a condition such as:

issue.get("customfield_12345") != null

where 12345 is the numerical ID of the source field. See https://innovalog.atlassian.net/wiki/display/KB/Using+issue.get%28%3Cfield_name%3E%29+in+scripts for details.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events