The condition Condition on linked issues is not yet available in JWT Cloud, but you can implement it using the Jira expression condition.
Create a Jira expression condition
Create a Jira expression by migrating the parameters of the 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) 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 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 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 project | Any project | Nothing 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 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 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 If the current CONDITION is not empty, precede this expression by | ||
Additional options | Allow unselected link types | Skip the part of the condition which is described for the parameter Filter by link type. | |
Allow unselected issue types | Skip the part of the condition which is described for the parameter Filter by issuetype. | ||
Allow unselected statuses | Skip the part of the condition which is described for the parameter Filter by Status. | ||
Allow unselected resolutions | Skip the part of the condition which is described for the parameter Filter by resolution. | ||
Allow unsatisfied filed value filter | Skip the part of the condition which is described for the parameter Filter by field value. |
Examples
JWT DC parameter values | Jira expression | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Use case There must be at least one related Service Management request
| issue.links.every(link=> link.linkedIssue?.project?.projectCategory?.name == "Service Management") | ||||||||||||||||||||
Use case Close parent issue only when all sub-tasks are closed
| issue.subtasks.filter(issue=> ["Closed,Done"].includes(issue?.status?.name) ) | ||||||||||||||||||||
Use case An issue must have at least 3 resolved Test Cases
| issue.subtasks.filter(issue=> ["Test case"].includes(issue?.issueType?.name) && ["Done"].includes(issue?.resolution?.name) ).length>=3 |
Due to the different architecture, it may happen that the condition gets too complex. The condition cannot be saved and a corresponding error message will be displayed. Split the condition into two or more.