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

"Create variable" doesn't recognise list fields and custom field values rather stores it as a complete string/text

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 9.2.0
    • Actions
    • None
    • Severity 3 - Minor

      Issue Summary

      "Create variable" doesn't recognize list fields and custom field values rather stores it them as a complete string/text

      This is reproducible on the Data Center: Yes

      Steps to Reproduce

      1. Create an automation rule with a "Manual trigger"
      2. Create a variable named "testlist" that stores the list values i.e try to configure the automation action that stores a list of values(example: Labels, components, or versions) 
      3. Now, try to print the values stored in the list using "log action" and values like 
        {{testlist.join(" - ")}}
        

      NOTE: If you just try to print testlist, that gets printed in the audit log, however, it's not being considered as list values. Rather, it's being considered as a single string.

      meaning that if we log a list value it prints it as

      tes, test1, test2, tesy
      

      instead, it should treat it like

      ["tes", "test1", "test2", "tesy"]
      

      Expected Results

      If the "create variable" action recognizes the values as list values, it should print the output however it prints nothing

      Actual Results

      an empty string is printed in the audit log.

      Workaround

      As the values are being treated as a single string/text we need to use the split function for the
      Examples of using smart values with text strings to get the values printed.

      Example:

      • use "log action" and use
         {{testlist.split(",")}} 

              dgedda@atlassian.com Devisree Gedda
              dgedda@atlassian.com Devisree Gedda
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: