"This validator checks that there are no linked issues in set statuses".
This is requirment of links validator. How Should I implement in jira cloud?
In my history, I've typically made use of a combination of a field and automation. For example, let's say that I don't want the ability to close an issue if any blocked by links remain in an open status:
Use a field, component, or label to serve as your anchor. I typically use a custom field:
AUTOMATION 1 - Setting the custom field
AUTOMATION 2 - Clearing the custom field
WORKFLOW Validator
It never occurred to me to use Automation like this. Thank you, that's a really fascinating approach :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @vishal kanoujiya ,
While I like @Mark Segall's approach of using Automations and a built-in Validator, I would like to offer a Jira Expressions based alternative.
Jira Expressions are a JavaScript-like language you can use in Jira Cloud that allows you to build almost every kind of validator you want. However, you'll need one of the many great workflow apps that support them.
Now, let's quickly build a validator that ensures that no linked issues are in the status 'Backlog':
issue
.links
.filter( i => i.inwardIssue.status.name == "Backlog")
.length == 0
If at least one of the linked issues is in the status "Backlog", this validator returns false. And you can just as easily expand this a bit to filter only for specific link types:
issue
.links
.filter(t => t.type.name == "Blocks")
.filter( i => i.inwardIssue.status.name == "Backlog")
.length == 0
A final – and in my mind the biggest – benefit of using an expressions based validator in this situation, is that it keeps all configuration information within the workflow. With the Automation-based approach, there's always to places to look, when you want to understand what's going on.
Anyway, I hope that helps,
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.