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:
Raw Value
as Value type option.Raw Value,
as Value type option.Set field value to constant
as the Value type
while setting fields of new issueThe value can be the result of a Groovy expression provided in the Value
field of:
Groovy expression
as Value typeGroovy expression
as Value typeSet field value from Groovy
as the Value type
while setting fields of new issueThe value can be the result of a Groovy template provided in the Value
field of:
Groovy template
as Value typeGroovy template
as Value typeSet field value from Groovy template
as the Value type
while setting fields of new issueThe value can be:
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 to 3.0
Date, which will be converted into a Date/Timestamp Object. For example, you can provide 23/Mar/17
which will be converted to 2017-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 to 2017-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 object
a 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
The value can be a Groovy expression that returns,
["2.0","3.0"]
to set the Affects Version/s to 2.0,3.0
issue.get("reporter")
returns a user object to set the Assignee field.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
The value can be a Groovy template that returns a String, which will be handled the same way as a Raw value (see above)