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 issue list in argument issues, leaving only those ones in projects with the category in project_categories.
Output Statussubtletruetitleissue list UI Text Box
sizemedium
typeinfo
This function filters a given issue list by the provided project categories
Filters issue list in argument issues, leaving only those ones in projects with the category in project_categories.
Argument project_categories is a comma-separated list of project category names.


Code Block
languagebash
titleSyntax
linenumberstrue
filterByProjectCategory(issue list issuesissueList, text project_categoriesprojectCategories) #Output: Issue list 


UI Expand
titleExamples


of linked issues belonging to projects in categories keys Development or Production.


Parser expressionDescription


Code Block
languagebash
linenumberstrue
filterByProjectCategory(linkedIssues(), "Development, Production") 
The function returns the
Status
subtletrue
titleissue list

This example returns the issue list of linked issues belonging to projects in categories Development or Production.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
filterByProjectCategory(linkedIssues("blocks"), "Customer support") 


This example returns an issue list of blocked issues belonging to projects in category Customer support.

To achieve this, the following functions are used:


Code Block
languagebash
linenumberstrue
filterByProjectCategory(linkedIssues(), projectCategory(%{issue.project.key})) 


This example returns an issue list of linked issue that are in the same project category 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
<parameter>issueList

Status
subtletrue
titledata type

Parameter description.

issue list

Any given issue list. Usually this value is retrieved from a function (e.g. linkedIssues() or subtasks()).
projectCategories<parameter>

Status
subtletrue
title

data type
text

A text with a project category. Several categories can be provided as comma separated listParameter description.



UI Expand
titleOutput

The 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_filterbyprojectcategory" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloud
Map(question)
Notes

Workaround

Code Block
let list = issue.links.map(l=>l.linkedIssue);
list.filter(i=>i.project.projectTypeKey=="software")

To filter by a list of Project Categories the includes() function should be used, just like in the filterByProject() example.




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 project category.
Output

Status
subtletrue
titleissue list

Available since

Status
subtletrue
colourBlue
title2.1.33

Label