Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JMWE Jira Expression Workflow Condition - Check if issues exist with following parameters

Ahmad Sidawi
Contributor
January 20, 2021

Hi there, 

 

I'm a newbie with JMWE Jira Expressions and i'm trying to build a Workflow Condition which is as follows:

If issues exist which have the current issue key in a customfield, and summary contains 'TT', then allow the transition.

I've trounced the documentation and can't see to find what I'm looking for in terms of a JQL query. Any ideas?

image.png

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
January 20, 2021

Hi @Ahmad Sidawi ,

you can't use JQL queries in Cloud conditions and validators. That's a limitation of Jira Cloud.

However, if I understand correctly, you want to allow the transition only if:

  • customfield_10500 is not empty
  • customfield_10500 contains an issue key (is customfield_10500 a Single-line Text custom field?)
  • the issue whose key is contained in customfield_10500 must contain TT in its Summary

Is that correct? If so, this is the Jira expression you're looking for:

issue.customfield_10500 != null && new Issue(issue.customfield_10500).summary.match(".*TT.*")
Ahmad Sidawi
Contributor
January 20, 2021

Pretty close. Customfield_10500 is a Parent Link field with a key.

Several issues might have the same Parent Link.

I'm currently looking at the Parent, and I want to check if any issues with that Parent Key contain TT.

So if the Parent has a key of GT-1010, i want to check any other issues which have GT-1010 in customfield_10500, and if any of those issues contain 'TT'.

David Fischer
Community Champion
January 20, 2021

Unfortunately, this is simply impossible on Jira Cloud. You want to look at "child" issues according to the "Advanced Roadmap" hierarchy, and that hierarchy is not available from Jira expressions.

Ahmad Sidawi
Contributor
January 21, 2021

Ahhh OK. Thank you David. We are instead now looking at using a Boolean or Yes/No dropdown field to demonstrate this within the parent issue rather than looking at the child issues. 

I'll give that a go (should be much easier :) ).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events