Uploaded image for project: 'Jira Service Management Cloud'
  1. Jira Service Management Cloud
  2. JSDCLOUD-14696

Directly using urlEncode(), length(), capitalize() functions with Asset objects' attributes does not return any values

      Issue Summary

      Directly using urlEncode(), length(), capitalize() functions with Asset objects' attributes does not return any values. These functions can be found on this page.

      Steps to Reproduce

      1. Create a schema and add an object type to that schema.
      2. Add a Text type attribute say 'Attribute' of the object type and create an object.
      3. Create an Automation rule with Object updated trigger.
      4. Print the value of Name and Attribute using Log action: {{object.Name}} and {{object.Attribute}}. Run the rule by updating attribute value. This will show correct result.
      5. Now, print the value of attribute with functions like {{object.Attribute.length}}, {{object.Attribute.capitalize}} or {{object.Attribute.urlEncode}}

      Expected Results

      The values should not be empty

      Actual Results

      The values are empty

      Workaround

      Create a variable and then use {{<variable_name>.urlEncode))

            [JSDCLOUD-14696] Directly using urlEncode(), length(), capitalize() functions with Asset objects' attributes does not return any values

            Matt Corcoran added a comment - - edited

            I can confirm that the following functions are also failing to return a value when using global automations on a specific object type that has this attribute:

            log {{object.mycustomtextattributte.abbreviate(3)}} returns nothing.

            log {{object.mycustomtextattributte.replace("-","_")}} returns nothing.

            log {{object.mycustomtextattributte.remove("-")}} returns nothing.

             

            Matt Corcoran added a comment - - edited I can confirm that the following functions are also failing to return a value when using global automations on a specific object type that has this attribute: log {{ object.mycustomtextattributte.abbreviate(3) }} returns nothing. log {{ object.mycustomtextattributte.replace("-","_") }} returns nothing. log {{ object.mycustomtextattributte.remove("-") }} returns nothing.  

            It's possible that other text and math functions does not work aswell. Needs further testing on more assets attribute types and more functions from here:

            Thanks for the workaround!

            František Špaček [MoroSystems] added a comment - It's possible that other text and math functions does not work aswell. Needs further testing on more assets attribute types and more functions from here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/ https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/ - those that are called directly on the value returned from Assets (like abs(), round() etc.) Maybe also test lists on multi select attributes in Assets, user functions over user attributes and so on. Thanks for the workaround!

              Unassigned Unassigned
              3033da771e98 Ashutosh Sharma
              Affected customers:
              11 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated: