Versions Compared

Key

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

Abstract

This code snippet checks the value of a standard or custom multi-valued type field (typically a multi-select field). The multi-valued fields can either be a collection of objects or a set of values.

...

The output of the code is a boolean value (true or false) which you could use to conditionally execute a Post-function/Condition/Validator or Unlink issues:

  • Check the issue has been flagged

    Code Block
    languagegroovy
    linenumberstrue
    issue.get("Flagged").any {
      it.getValue() == "Impediment"}


  • Check the issue has a label Server

    Code Block
    languagegroovy
    linenumberstrue
    issue.get("Labels").any {
      it.getLabel() == "Server"}


  • Check the issue has 5.0.0 as an Affects Version/s

    Code Block
    languagegroovy
    linenumberstrue
    issue.get("versions").any {
      it.getName() == "5.0.0"}


...