Error with Jira smart values, {{issue.epic.key}} is bugged?

Gérald Fauvelle May 4, 2023

Hi,

I try to list all stories of an epic using lookup issues, and I use the following query

Capture.PNG

But it fails... and {{parent}} doesn't work :/

Any idea how I can do that?

Thanks

3 answers

1 accepted

0 votes
Answer accepted
Gérald Fauvelle May 4, 2023

Oh wow... after so many hours, I found another solution that works.

I use, for the Looup issues, this JQL :

issue in portfolioChildIssuesOf("{{parent}}") AND (type=Story OR type=Defect)

And that's it :) I have my count of stories in {{lookupIssues.size}}

0 votes
Patrick Hicks May 4, 2023

Try replacing the {{issue.epic.key}} with {{issue.parent.key}}

so that it looks like

{{issue.parent.key}}={{issue.key}}

which should be similar to 

"Parent"={{issue.key}}

I have used the following, 

"Parent"={{triggerIssue.key}}, 

to find all sub-task within a task. 

JIra answer.PNG

with the transformation of the hierarchy replacing epic name and epic link to the standard parent, this should work for all issue types in the hierarchy.

Gérald Fauvelle May 4, 2023

"Parent"={{triggerIssue.key}} works, I see the subtasks of the story. But when I try "Parent={{issue.key}} or even "Parent"="DCMB-1482"to be sure I search for an existing epic, it founds 0 results.

Like Patrick Hicks likes this
Patrick Hicks May 4, 2023

For automation rules, triggerIssue is to be used.   If you can share information regarding what you are using for the trigger on your rule, this may help define what set issues the lookup component/action is collecting.

Gérald Fauvelle May 4, 2023

Capture.PNG

This is what I use. Everything that has Epic in it is refused. But the problem is that for my stories, the parent/epic information is stored in parentEpic, not in parent. No idea why.

Gérald Fauvelle May 4, 2023

If I dump {{issue.parent.key}} for my triggered story, it gives me the right value, as well as {{parent}}

issue={{issue}}, parent={{parent}}, pkey={{issue.parent.key}}

issue=DCMB-2491, parent=DCMB-1482, pkey=DCMB-1482

 

But if I try this in the Issue Navigator, for parent I have no results, and for parent.key :
Field 'parent.key' does not exist or you do not have permission to view it.

 

How can it even be the same error message? Not existing or not having permission...

I'm wondering what is the relation between the keys used in the query and the Smart values ?

Gérald Fauvelle May 4, 2023

I found some info here : https://community.atlassian.com/t5/Jira-questions/Jira-Cloud-issuefunction-how-do-i-get-the-Parent-Key/qaq-p/2153077

Capture.PNG

So that would mean I'm on a Company managed project. Why would there be a difference between the 2 ?

And then Jira is bugged here, as we cannot use "epic" in automation, and it is even not following its documentation. I probably have to open a ticket on their side.

Gérald Fauvelle May 4, 2023

.

0 votes
Gérald Fauvelle May 4, 2023

well, it would be

parent={{issue.key}}

but that return 0 results, when I know that this parent has stories.

Gérald Fauvelle May 4, 2023

I did a lookup just on type='Story', it returns me 100 values, and I dump the parent for each one in logs, they are all empty.

When I use the issue navitagor with a JQL query, I use parentEpic as a key to filter by parent. If I use parent, it is empty.

But I cannot use parentEpic in automation.

Suggest an answer

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

Atlassian Community Events