Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-16319

IF block in Assets Automation allows adding more than one condition, but the rule can't be saved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 5.12.12, 5.12.25, 10.3.6, 10.3.8, 10.7.2
    • Assets - Automation

      Issue Summary

      When creating an Assets Automation rule, at the IF block, the "Add condition" link continues to be displayed after adding the first condition, leading the user to think that more conditions are allowed under that same block. However, after adding two or more conditions, if you try to save the rule, you will get a pop-up error stating that a single condition is allowed.

      Steps to Reproduce

      1. Spin up a JSM
      2. Create an Assets project using the sample data
      3. Go to the newly created object schema > Configure > Automation
      4. Create a new rule as follows:
        • Trigger - can be any
        • For the "IF" block:
          • Click on "Add condition". Add a condition like "Key = MyObject1"
          • Note that the "Add condition" link is still displayed after adding the first condition.
          • Click on it, and add a second condition like "Key = MyObject2"
        • THEN - can be any
      5. Give the rule a name and try to save it
        • Note the pop-up at the top says that the IF can only contain one condition.

      Expected Results

      Either the "Add condition" link in the IF block should "disappear" after adding the first condition, OR it should accept two or more conditions when saving the rule.

      Actual Results

      A pop-up error is displayed only when trying to save the automation rule, stating that a single condition is supported at the IF block:

      Workaround

      Instead of having more than one condition under the IF block, work on the AQL to be used on a single condition. For example, considering the scenario from the screenshot, have the AQL set as one of the examples below:

      (Key = AITITSM-60) OR (Key = AITITSM-61)
      (Key = AITITSM-60) AND (Key = AITITSM-61)
      Key IN (AITITSM-60,AITITSM-61)

      Versions Tested

      Testing Requirements Version Affected Version
      Customers Reported Version 5.12.12 Yes
      Most Recent Bug-Fix Release 10.7.2 Yes
      Most Recent LTS 10.3.8 Yes
      Previous Supported LTS 5.12.25 Yes

              Unassigned Unassigned
              489dcb58d5d9 Edson Araujo
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: