Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Page properties
hiddentrue
Short description
Filters the issue list in argument issues, leaving only those ones with resolutions appearing in argument resolutions.
Output Statussubtletruetitleissue listAvailable since

Status
subtletrue
colourRed
titleneeds lookup

UI Text Box
sizemedium
typeinfo
This function filters the given issue list in argument issues, leaving only those ones with resolutions appearing in argument resolutions. Argument resolutions is a comma-separated list of resolution names. If this argument receives an empty string (""), the function will return issues with unset field Resolution by the provided resolutions.


Code Block
languagebash
titleSyntax
linenumberstrue
filterByResolution(issue list issues, stringissueList, resolutions) #Output: Issue list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
filterByResolution(subtasks(), "Won't Fix, Cancelled") 


This example returns the issue list of sub-tasks with resolutions Won't Fix or Cancelled.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
filterByResolution(linkedIssues(), "") 


This example returns an issue list with all unresolved linked issues.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
filterByResolution(linkedIssues(), resolution(10000))


This example returns an issue list with all linked issue that have the resolution with id 10000 set.

The function resolution() resolves the provided ID and parses the resolution name.

ui-text-box
typetip

This way the function will still work even if the resolution name might change at some point.



Code Block
languagebash
linenumberstrue
filterByResolution(siblingSubtasks(), %{issue.resolution})


This example returns an issue list with all sibling sub-tasks that have the same resolution like the current issue.

To achieve this, the following functions are used:



ui-expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxissueList

Status
subtletrue
titledata typeissue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).
resolutionsParameter description.xxx

Status
subtletrue
titledata typetext

Any given resolution name. Several resolutions can be provided as comma separated listParameter description.



UI Expand
titleOutput

This function returns an

Status
subtletrue
titleissue list



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_filterbyresolution" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

Code Block
languagebash
let list = issue.links.map(l=>l.linkedIssue);
list.filter(i=>i.resolution!=null && ["Done", "Resolved"].includes(i.resolution.name))





Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged



Page properties
hiddentrue


Short description
Filters a given issue list by resolution.
Output

Status
subtletrue
titleissue list

Available since

Status
subtletrue
colourRed
titleneeds lookup

Label