Uploaded image for project: 'Automation for Cloud'
  1. Automation for Cloud
  2. AUTO-67

Support for more complex logic in Automation rulebuilder, e.g. introduce nested if/else blocks (branches within branches)

    XMLWordPrintable

Details

    • 15
    • 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

      Currently Automation for Jira only supports simple if/else blocks. 

      While the nested if/else requirement is being tracked elsewhere, it would also be beneficial to have Automation support switch case statement based logic as well.

      ***

      UI improvements

      • It would be nice to keep the remaining conditions when the user deletes the first "if" steps
      • Else if error should open the component picker - When you add an empty else block and get the error "Block can not be empty. You must either delete the block or add some children." it shows up on the list of conditions, but the error is actually about the "block" below the conditions
      • The Audit log can be confusing and misleading when trying to check IF/ELSE conditions and blocks

      It would be great if we could branch within branches.

      For example, 'transition subtask based on another subtask transitioning'

      This use case would be solved much easier with this feature.


      For performance and UI reasons, we restricted the use of the ELSE/IF block to the main 'trunk' of the rule (i.e not on branches)

      However, it may be holding some customers back. For example if they want to do some logic for linked issues and with various teams etc.


      Nested branches are currently not supported. And the product documentation here:


      https://docs.automationforjira.com/getting-started/conditions.html

      does not fully describe the limitations of branching.

      
Here are some examples discovered where “If else block” and “Branch rule / related issues” cannot be used (they are not offered as components to add to the rule). I express the following use cases as “Steps to reproduce”.

      1. Create Rule. Any Trigger. Add component > New condition > If/else block > add any condition > save component. Now try to add another If/else block to either the Then branch or the Else branch — you can’t, even if you create an Action component first. In other words, you can’t nest the If/else block. Or maybe only one If/else block is allowed per rule? Either way, it’s a frustrating and undocumented limitation.
      1. Create Rule. Any Trigger. Add component > Branch rule > Type=Parent > save component. Now try to add another “If/else block” or “Branch rule” to the “For Parent” branch — you can’t, even if you create an Action component first.

      My guess is that only one “branching” component is allowed per rule (or we could say “one branch per rule”). No other computer language prevents you from expressing “if A then

      { if B then X else Y }

      else Z”.

       

      Attachments

        Issue Links

          Activity

            People

              0a032cf832e4 Simon Chan
              prawat@atlassian.com Prashant R (Inactive)
              Votes:
              296 Vote for this issue
              Watchers:
              130 Start watching this issue

              Dates

                Created:
                Updated: