Versions Compared

Key

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

This article provides the code snippet to unselect an option in a multi-select field using Set issue fields post-function.

\uD83D\uDCD8 Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

  3. Select the Post functions tab and click Add post function.

  4. Add the Set issue fields post-function.

  5. Select the issues, for which the field should be set, under “Target Issue(s)”.

  6. Select the desired field and add the below Nunjucks template:

    Code Block
    languagejava
    {{ issue.fields.customfield_10067 | filter(["value","Item 3"],true) | join(',',"value") }}

Replace 10067 with the id of the desired field and Item 3 with the option to be removed.

With this, the option “Item 3” will be removed from the selected options (if it exists).

Image RemovedImage Added
Info

If this post-function is added on the create transition, select the checkbox “Delay the execution of this post-function” under “Delayed execution” and select a delay of 3 seconds.

References