You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The condition Condition on linked issues is not yet available in JWT Cloud, but you can implement it easily using the Jira expression condition.

Create a Jira expression condition

You then have to create a Jira expression by transforming the parameters of Condition on linked issues.

The resulting Jira expression has the form 

issue.links.every(link=> CONDITION )

CONDITION denotes the condition which is built based on the parameters and options from JWT DC. They are migrated as described in the following table.

JWT DC
  

JWT DC option

JWT Cloud

Notes
Filter by link type

If the current CONDITION is empty, add 

link.direction == "outward" ? [listOfIssueLinkTypeNames].includes(link?.type?.outward):[listOfIssueLinkTypeNames].includes(link?.type?.inward

Examples

issue.links.every(link=>link.direction == "outward" ? 
["clones","is blocked by"].includes(link.type.outward):
["clones","is blocked by"].includes(link.type.inward))
issue.links.every(link=>
["Done"].includes(link?.linkedIssue?.resolution?.name)
&& link.direction == "outward" ? 
["clones","is blocked by"].includes(link.type.outward):
["clones","is blocked by"].includes(link.type.inward))
Filter by issuetype

If the current CONDITION is empty, add 


[listOfIssueTypeNames].includes(link?.linkedIssue?.issueType?.name)
to it (where listOfIssueTypeNames is the text list of the issue types which have to be filtered, e.g. "Submission","Mail")

If the current CONDITION is not empty, precede this expression by &&.

Examples

issue.links.every(link=>["Submission","Mail"].includes(link?.linkedIssue?.issueType?.name))
issue.links.every(link=>
["Done"].includes(link?.linkedIssue?.resolution?.name)
&& ["Submission","Mail"].includes(link?.linkedIssue?.issueType?.name))
Filter by status

If the current CONDITION is empty, add 

[listOfStatusNames].includes(link?.linkedIssue?.status?.name)

to it (where listOfStatusNames is the text list of the status names which have to be filtered, e.g. "In Progress","To Do")

If the current CONDITION is not empty, precede this expression by &&.

Examples

issue.links.every(link=>
["In Progress","To Do"].includes(link?.linkedIssue?.status?.name))
issue.links.every(link=>
["Won't do","Duplicates"].includes(link?.linkedIssue?.resolution?.name)
&& ["In Progress","To Do"].includes(link?.linkedIssue?.status?.name))
Filter by resolution

If the current CONDITION is empty, add 

[listOfResolutionNames].includes(link?.linkedIssue?.resolution?.name)

to it (where listOfResolutionNames is the text list of the resolution names which have to be filtered, e.g. "Won't do","Duplicate")

If the current CONDITION is not empty, precede this expression by &&.

Examples

issue.links.every(link=>
["Won't do","Duplicates"].includes(link?.linkedIssue?.resolution?.name))
issue.links.every(link=>
["Mail"].includes(link?.linkedIssue?.issueType?.name)
&& ["Won't do","Duplicates"].includes(link?.linkedIssue?.resolution?.name))
Filter by projectAny projectNothing to do!

Current project

If the current CONDITION is empty, add 

link?.linkedIssue?.project?.name == issue.project.name

If the current CONDITION is not empty, precede this expression by &&.



Any but current project

If the current CONDITION is empty, add 

link?.linkedIssue?.project?.name != issue.project.name

If the current CONDITION is not empty, precede this expression by &&.



Set projects manually (parser expression)

If the current CONDITION is empty, add 

[listOfProjectKeys].includes(link?.linkedIssue?.project?.name)

to it (where listOfProjectKeys is the text list of the project keys which have to be filtered, e.g. "PRJ","CRM")

If the current CONDITION is not empty, precede this expression by &&.


Filter by field value

If the current CONDITION is empty, add a Jira expression to it which returns a logical value according the JWT expression from JWT DC.

If the current CONDITION is not empty, precede this expression by &&.

Example

issue.links.every(link=>
["Mail"].includes(link?.linkedIssue?.issueType?.name)
&& link?.linkedIssue?.attachments?.length >0 )
Minimum number of linked issues

If the current CONDITION is empty, add 

issue?.links?.length>= minimumNumber

to the Jira expression (where minimumNumber is the respective minimum number of linked issues).

If the current CONDITION is not empty, precede this expression by &&.


Maximum number of linked issues

Add

issue?.subtasks?.length<= maximumNumber

to the Jira expression (where maximumNumber is the respective maximum number of linked issues).

If the current CONDITION is not empty, precede this expression by &&.


Additional optionsAllow unselected link typesSkip the part of the condition which is described for the parameter Filter by link type.
Allow unselected issue typesSkip the part of the condition which is described for the parameter Filter by issuetype.
Allow unselected statusesSkip the part of the condition which is described for the parameter Filter by Status.
Allow unselected resolutionsSkip the part of the condition which is described for the parameter Filter by resolution.
Allow unsatisfied filed value filterSkip the part of the condition which is described for the parameter Filter by field value.

Examples

JWT DC parameter valuesJira expression

Use case There must be at least one related Service Management request

ParameterValue
Filter by issue link typeempty
Filter by issue typeempty
Filter by statusempty
Filter by resolutionempty
Filter by projectAny project
Filter by field valueempty
Minimum number of linked issues1
Maximum number of linked issuesleave the default value 1000 unchanged
Addiotinal options

Check

Allow unselected issue types

Allow unselected statuses

issue.links.every(link=> link.linkedIssue?.project?.projectCategory?.name == "Service Management")

Use case Close parent issue only when all sub-tasks are closed

ParameterValue
Filter by issue link type
Filter by issue typeempty
Filter by statusClosed, Done
Filter by resolutionempty
Filter by project
Filter by field valueempty
Minimum number of sub-tasksleave the default value 0 unchanged
Maximum number of sub-tasksleave the default value 1000 unchanged
Addiotinal options

Check

Allow unselected issue types

Allow unselected resolutions

issue.subtasks.filter(issue=> ["Closed,Done"].includes(issue?.status?.name) )

Use case An issue must have at least 3 resolved Test Cases

ParameterValue
Filter by issue typeTest case
Filter by statusempty
Filter by resolutionDone
Filter by field valueempty
Minimum number of sub-tasks3
Maximum number of sub-tasksleave the default value 1000 unchanged
Addiotinal options

Check

Allow unselected statuses

issue.subtasks.filter(issue=> ["Test case"].includes(issue?.issueType?.name) 
&& ["Done"].includes(issue?.resolution?.name) ).length>=3