I am using Structure for Jira. I want to define an Expr expression to display the open issues that this issue is dependent on. I have a working expression for displaying all issues that this issue is dependent on:
WITH _format(issue) = """[${issue.key}|${issue.url}]""" :
issuelinks
.FILTER($.type = 'Dependency' AND $.source = this)
.MAP(_format($.destination))
However, if I try to change the filter to display only the open issues using the statusCategory attribute, it doesn't work:
WITH _format(issue) = """[${issue.key}|${issue.url}]""" :
issuelinks
.FILTER($.type = 'Dependency' AND $.source = this AND $.destination.statusCategory != 'Done')
.MAP(_format($.destination))
I would expect the attribute statusCategory to have one of the following values: "To Do", "In Progress", or "Done". However, the expression above doesn't work. Is statusCategory the right name for this attribute in Expr? Is there something else I am doing wrong?
Hello @Bruce Bowers
You can try this formula:
WITH _format(issue) = """[${issue.key}|${issue.url}]""" :
issuelinks
.FILTER($.type = 'Dependency' AND $.source = this)
.MAP(if $.destination.status.category != "Done" :_format($.destination))
I hope this helps. If you need further assistance or have other questions about Structure - please reach out to us directly at our support portal and we'll get back to you shortly.
Best regards,
Stepan
Tempo (the Structure app vendor)
Thanks, Stepan! I actually used a slightly different expression based on your advice, but it worked fine:
WITH _format(issue) = """[${issue.key}|${issue.url}]""" :
issuelinks
.FILTER($.type = 'Dependency' AND $.source = this AND $.destination.status.category != 'Done')
.MAP(_format($.destination))
I will try to register for Tempo Customer Support, if I can get the SEN number from our Jira administrators (we are on Structure for Jira v8.0.1.)
Follow up question: I am familiar with the attribute names used in Jira queries. There are some differences when those attributes are used in Expr. Is there a reference with a mapping from Jira query attribute names (e.g., statusCategory) to the names used in Expr (e.g., status.category)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bruce Bowers
Yes, the Expr language is not the same as JQL if it's what you mean. You can find out more details about it on our Wiki, including available functions/properties and sample formulas.
Best regards,
Stepan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.