Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

\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 setThe Set Issue Field(s) post-function does not correctly set its configured field(s) when using the following:

...

\uD83C\uDF31 Solution

  1. Replicate the configuration considering the custom field being utilized used and its settings .

...

  1. as follows:

CUSTOM_user_profile_jira field (provided by User Profiles for Jira app)

Text Field (read-only)

Second custom fieldCUSTOM_select_list_single

Select List (single choice)

Info

When assessing the functionality of the "User Profiles for Jira" custom field, it is observed that the fields functionality, we noticed that this third-party app takes some time to populate the necessary field's value.

  1. Build the Configure the JMWE Set issue field(s) post-function., as shown below:

The intended post-function assigns the value "First OptionExample" to the custom field (second custom fielde.g. CUSTOM_select_list_single) depending on the value of from the "User Profiles for Jira" custom field. Here is the configuration

...

The Conditional execution field of the post - function uses the following code:

...

Code Block
{{ ["valuePablo 1Vergara", "value 2", "Value 3", "Value 4Other User"].includes(issue.fields["CUSTOM_user_profile_jira"]) }}
Info

Remember what’s shown below is an example, and you would need to use and replace your own custom field name (or id) in the following format:
{{ ["Value"].includes(issue.fields

.customfield_<number>)

["<CUSTOM_field_name>"]) }}

  1. As the third-party app does take a while to populate the custom field, it is necessary to include a delay in as part of the post-function configuration (in the example delay in this case is 15 sec., we have set a 15-sec delay for testing purposes):

    Image Modified
Info

IMPORTANT:

Use the minimum working delay duration possible and test thoroughly. If the result is unexpected, increase it by one second and test again until the post-function properly sets the field value.

  1. The results observed are that the desired custom field value correctly changes its value from “Third Option” to “First Option”to “Example:

...

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@bc3e0baf
sortmodified
showSpacefalse
reversetrue
typepage
labelskb-troubleshooting-article
cqllabel = "kb-troubleshooting-article" and type = "page" and space = "SUPPORT"