Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Abstract

This code snippet sets a Checklist/Multi-select type field with certain options based on the name of the option.

Logic

Access the available options of the Checklist/Multi-select type field and find for options with the specific text.

Snippet 

issue.getAvailableOptions("<Name of the field>").findAll{
  it.getValue().contains("<Text in the option>")
}

Placeholders

PlaceholderDescriptionExample
<Name of the field>Name of the field of type Checkboxes/Select list(multiple choices)Tasks list
<Text in the option>Text the options must contain to be selectedInstallation

Examples

issue.getAvailableOptions("Tasks list").findAll{
  it.getValue().contains("Installation")
}

Context

The output of the code is a Collection<Option> which you could use:

  • To set a Checkboxes/Multi-select field in :
    • one of the Set Field Value post-functions
    • one of the Transition issue post-functions on the transition screens, if any
    • the Create issue post-function under Set fields of new issue section
  • To include the Checkboxes/Multi-select field values in the
    • Comment in one of the Comment issue post-functions
    • Subject/HTML body/Text body of Email issue post-function
    • JQL search expression of Link issues current to issue
  • In a conditional execution script to
    • Run a post-function
    • Run a condition
    • Run a validator
    • Unlink issues

Use cases

A typical use case would be to - Select the Installation tasks in the Checkboxes/Multi-select type field when all the Installations are done

Reference

Filter by label

There are no items with the selected labels at this time.

  • No labels