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

add ability to sort a smart value list

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Smart-values
    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      As an automation rule writer
      I want the ability to sort a smart value list
      So that I can access specific values from the list in my desired ordering

      Acceptance criteria:

      • 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)}}}}

       

      Business case:

      Using the min() and max() functions, it is possible to capture a specific value from a list (such as by dates), and then use that in a created variable with list filtering to extract a desired list value(s).  However I do not believe there is a way to return the entire list in a desired order.  A sort() function could simplify rules which need to identify all attributes of a smart value list item, given the first, last, etc. conditions for a particular sort ordering.

              Unassigned Unassigned
              c48be19ba6fe William Sheboy
              Votes:
              39 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated: