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

When using OR syntax in FixVersion field, it doesn't return correct results

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Low Low
    • None
    • 7.4.2
    • Smart-values
    • None
    • Severity 3 - Minor

      Issue Summary

      When using the OR smart values on the Fix Version field, it doesn't return the right results.

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Create a new issue and add the Version 1.0 value to the Fix Version field.
      2. Create a new Automation rule with "Manually triggered" and add the "Edit Issue" on the action.
        • Choose to update the Description field with the syntax below.
      3. Paste the smart syntax in the rule actions:
        * issue.fixVersions.name.equals("Version 1.0"): {{issue.fixVersions.name.equals("Version 1.0")}}
        * or(issue.fixVersions.name.equals("Version 1.0"), false):  {{or(issue.fixVersions.name.equals("Version 1.0"), false)}}
        * or(issue.fixVersions.first.name.equals("Version 1.0"), false):  {{or(issue.fixVersions.first.name.equals("Version 1.0"), false)}}
        
      1. Publish the changes.
      2. The results we get is this:

      Expected Results

      Based on the OR logic:

      or(issue.fixVersions.name.equals("Version 1.0"), false)
      

      When comparing true or false, we should get true instead of false.

      Actual Results

      The results returned false instead comparing true OR false logic.

      Workaround

      Add a .first syntax:

      or(issue.fixVersions.first.name.equals("Version 1.0"), false)
      

              dramotowski Daniel Ramotowski
              ckimloong John Chin
              Affected customers:
              2 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: