Our new Appfire Documentation Space is now live!
Take a look here! If you have any questions please email support@appfire.com
Expected value for each field type
When setting a field value, the post-function will fail to work as expected, if the input value does not match the expected field type. This document describes the format of values expected by a field when set using a post-function.
The value can be a constant provided in the Value
field of:
- Set field value post-function, that requires
Raw Value
as Value type option. - Set field value of linked issues post-function, that requires
Raw Value,
as Value type option. - Create/Clone issue(s) post-function, that requires
Set field value to constant
as theValue type
while setting fields of new issue - Edit User Properties screen of a user, to copy the value of the specified user property for the current user using Set field value from User Property value post-function
The value can be the result of a Groovy expression provided in the Value
field of:
- Set field value, that requires
Groovy expression
as Value type - Set field value of linked issues, that requires
Groovy expression
as Value type - Create/Clone issue(s) post-function, that requires
Set field value from Groovy
as theValue type
while setting fields of new issue
The value can be the result of a Groovy template provided in the Value
field of:
- Set field value, that requires
Groovy template
as Value type - Set field value of linked issues, that requires
Groovy template
as Value type - Create/Clone issue(s) post-function, that requires
Set field value from Groovy template
as theValue type
while setting fields of new issue
Raw value
The value can be:
- a simple, constant string. For example:
This is a description
a String representing a
Number, which will be converted into a Double object. For example, you can provide
3
which will be converted to3.0
Date, which will be converted into a Date/Timestamp Object. For example, you can provide
23/Mar/17
which will be converted to2017-03-23 00:00:00.0
.Date-time, which will be converted into a Date/Timestamp Object. For example, you can provide
23/Mar/17
2:00 AM
which will be converted to2017-03-23 02:00:00.0
.object's look up value (name or id or value), that will be converted into
an object expected by the field. For example, you can provide the username
carter
which will be converted to a user objecta collection of objects expected by a multi-valued field. For example, you can provide the version name 3.0 which will be converted to a collection of version objects i.e
["3.0"]
Comma separated values for certain multi-valued fields, which will be converted into a collection of objects expected by the field. For example, you can provide the version names 3.0,3.1 which will be converted to a collection of version objects i.e
["3.0","3.1"]
Space separated values for the Labels field which will be converted to an array of values. For example, you can provide
New Ready
to set the Labels, which will be converted to[New,Ready]
For information about the exact format of the expected value for each field, see
- Raw value - Standard JIRA fields
- Raw value - Pre-defined custom fields
- Raw value - User-created custom fields
Groovy Expression
The value can be a Groovy expression that returns,
- a String that will be converted to the type expected by the field being set as detailed above in the Raw value section.
- an array of Strings (String[]) that will be converted to a Collection of objects of the type expected by the field being set. For example,
["2.0","3.0"]
to set the Affects Version/s to2.0,3.0
- an object of the type expected by the field being set. For example,
issue.get("reporter")
returns a user object to set the Assignee field. - a collection of objects expected by the field being set. For example,
issue.get("versions")
returns a collection of version objects to set the Fix Version/s field.
For information about the exact format of the expected value for each field, see
- Return value of a groovy expression - Standard JIRA fields
- Return value of a groovy expression - Pre-defined custom fields
- Return value of a groovy expression - User-created custom fields
Groovy template
The value can be a Groovy template that returns a String, which will be handled the same way as a Raw value (see above)