-
Bug
-
Resolution: Fixed
-
Medium
-
10
-
Severity 3 - Minor
-
1
-
Summary
Smart value for an object's user or object type attributes any list type function such as size does not work with a single value
Steps to Reproduce
- Create an Insight object with a user attribute "Assigned". Set cardinality to multiple users.
- Create an automation rule to be triggered when an object is created and print the value of below smart value
{{object.Assigned.size}}
- Create two objects, one with a single user and the other with 2 users
Expected Results
The automation rule prints 1 and 2 respectively.
Actual Results
The automation rule for an object with a single user returns empty. While it works fine when you have more than 1 user added.
Notes
For user picker fields in Jira, for example, Approver, it works with one user:
{{issue.Approvers.size}}
Workaround
Steps:
- Add action "Create variable" to capture object User attribute, i.e: issue.assetfield.user_attribute or object.user_attribute
- Then use the below smart value to capture the size:
{{if(variable_name.isEmpty(), 0, variable_name.split(",").size)}}
Reference documentation:
Loom/Recording:
Workaround test: JSDCLOUD-10236 Workaround.mp4