-
Suggestion
-
Resolution: Unresolved
-
0
-
Suggested improvements
- add a new function, sort() to manage smart value list items
- accepts an attribute of the list to sort the list
- Example: {{{{{}issue.fixVersions.sort(name)}}}}
- accepts an optional parameter to control ascending or descending sorts, with a default value of ASC
- Example: {{{{{}issue.fixVersions.sort(name, "DESC")}}}}
- Bonus feature: multiple criteria can be specified for the sort order
- Example: {{{{{}issue.fixVersions.sort(releaseDate, "DESC", name, "ASC")}}}}
- Bonus feature: another smart value can be provided to describe the sort criteria
- Example:
- created variable of varSort = "name, 'DESC'"
- {{ {{issue.fixVersions.sort(varSort)}}}}
- Example:
Today is not possible to filter specific values through smart values. For example, it's not possible to get the last added attachment of an issue.
https://codebarrel.atlassian.net/browse/AUT-1241
Expected Results
If you use smart values as, for example, {{issue.attachments.last.filename}}, this consider an A-Z order instead of the order in which the attachments were added to the issue.
Actual Results
It would be nice to be possible to filter values through smart values to get, for example, last added values of a field.
Workaround
There is no workaround at this moment.
***
Using Automation for Jira, I'd like to nest smart values as follows:
{{project.properties.issue.component}}
Assuming a project property like this:
{ key: "Component A", value: "5caccd8a1608c412138787e3" }
And also support complex JSON objects stored in entity properties, like so:
{{project.properties.issue.component.approver2}}
The project property would look like this:
{ key: "Component B", value: { "approver1": "5cc8aeebcbbec211ec62a0ec", "approver2": "5e7bf681dde7030c4f20dec6" } }
But even better would be if we could have a single Project property with these mappings, like so:
{ key: "MappingList", value: { "Component A" : { "approver1": "zyx", "approver2": "wvu", }, "Component B" : { "approver1": "abc", "approver2": "xyz", }, "Component B" : { "approver1": "def", "approver2": "ghi", }, } }
And we could reference it like this:
{{project.properties."MappingList".{{issue.component}}.approver2}}
Introducing nested smart values would be a great addition to be used in conjunction with the create lookup table feature. For example:
{{Lookuptable.get("{{smartvalue}}")}}
- duplicates
-
AUTO-702 {{issue.Attachment.last.filename}} gives the value of the first attachment added to the issue
-
- Closed
-
- is duplicated by
-
AUTO-688 add ability to sort a smart value list
- Closed
-
JSDCLOUD-14161 Nest smart values in Automation
- Closed
-
JSDCLOUD-14444 Approvals smartvalue data should be treated as list
- Closed
- mentioned in
-
Page Loading...