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

Add support for else as a conditional logic smart value

XMLWordPrintable

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

    • Jira Software, Jira Service Management, Jira Work Management, Jira Product Discovery

      According to this page, it is currently possible to check a condition using the if smart value, however, it is not possible to set an else to this if.

      UPDATE: Making some tests, this is actually possible, however, it's not documented.

      Suggestion

      The if function could have a possibility to set a value if the condition is not matched - something like worksheets-functions allow such as:

      {{if(smartValue, "value if true", "value if false")}} 

      Example

      We need to filter some issues with a lookup, depending on the summary. If the summary is numeric I will check for a project and if it's not, I'll check a different project. Currently what can be done is something like the following:

      statusCategory = Done {{if(issue.Summary.isNumeric(), "and project = GT")}} 

      With the suggestion, we would be able to do something like:

      statusCategory = Done {{if(issue.Summary.isNumeric(), "and project = GT", "and project = TEST")}} 

      Workaround

      As a workaround, we need to use the if/else blocks.

      The default values may also be helpful if you are checking for empty issue fields, but please note these don't work for variables that were created but are empty.

              f28aa39b8ecf Olivia Clarke-Bruce
              119d25e0f528 Gabi Paludo
              Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: