\uD83E\uDD14 Problem
When using a “Set Issue Field” on a Create transition with information from “User Profiles for Jira” on a custom field used on a condition, fields are not correctly set.
\uD83C\uDF31 Solution
Replicate the configuration considering the field being utilized and its settings.
Custom field created by User Profiles for Jira | Text Field (read only) |
Second custom field | Select List (single choice) |
When assessing the functionality of the "User Profiles for Jira" custom field, it is observed that the third-party app takes some time to populate the necessary field.
Build the post-function.
The intended post-function assigns the value "First Option" to the custom field (second custom field) depending on the value of the "User Profiles for Jira" custom field. Here is the configuration of the post-function:
{{ ["value 1", "value 2", "Value 3", "Value 4"].includes(issue.fields.customfield_<number>) }}
As the third-party app does take a while to populate the custom field, it is necessary to include a delay in the post-function configuration (the example delay in this case is 15 sec.):
The results observed are that the desired custom field changes its value from “Third Option” to “First Option”: