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 to constant or Groovy expression 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 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 to constant or Groovy expression, that requires
Groovy expression
as Value type - Set field value of linked issues, that requires
Groovy expression
as Value type - Create/Clone issue 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 to constant or Groovy expression, that requires
Groovy template
as Value type - Set field value of linked issues, that requires
Groovy template
as Value type - Create/Clone issue 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]
...
The value can be a Groovy template that returns a String, which will be handled the same way as in the a Raw value (see above)