Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-209

Improve documentation on the IF ELSE condition behavior

    XMLWordPrintable

Details

    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      Automation for Jira's IF / ELSE condition doesn't quite behave as many programmers expect, and the documentation doesn't make a note on it.

      Situation

      We have two issues:

      • KEY-123
      • KEY-456
        And 3 JQL/conditions:
      • Condition A is matched by KEY-123 and KEY-456
      • Condition B is matched by KEY-123

      Rule

      Scheduled execution:

      When condition A is met:
      -- If condition B is met: add label B
      -- Else, add label C
      

      Expected behavior

      To many programmers, the expected behavior would be:

      • KEY-123 gets labeled as B
      • KEY-456 gets labeled as C

      Actual behavior

      Only KEY-123 gets labeled as B and KEY-456 isn't edited at all.
      On a next execution, if no issues are met by condition B, then KEY-456 gets labelled as C.

      Suggestion

      The note that's missing on the IF/ELSE documentation (for both Cloud and Server/DC) is something like:

      Note: The path of IF/ELSE conditions aren't executed for each issue individually, but for any match in the rule's trigger condition.

      If the rule's trigger brings 20 issues and a IF matches 2 and ELSE, 18, the rule won't perform the actions of the IF block for the 2 issues and ELSE's block for 18, but only the IF's for the 2 issues.

      The ELSE block only gets executed if none of the issues matches the IF condition.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rmartinez3@atlassian.com Rodrigo Martinez
              Votes:
              18 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated: