I need to create a report with Jira automation, that will combine tasks by epics, like that:
Epic 1:
Task 1
Task 2
Epic 2:
Task 3
Task 4
I have gon through A LOT of articles and made A LOT of testing, but the best possible result I see the usage of filtering through lookupIssues. I have used this article as basis for that: https://community.atlassian.com/t5/Automation-articles/Filtering-smart-value-lists/ba-p/1827588
In my head, it should work in some way like this:
{{#lookupIssues}}
{{ #if({{equals(issue.epic.key,"EPIC-1"))}}}}
Epic 1 sumary
<{{url}}|{{key}} {{summary}}>
{{ /}}
{{/}}
{{#lookupIssues}}
{{ #if({{equals(issue.epic.key,"EPIC-2"))}}}}
Epic 2 summary
<{{url}}|{{key}} {{summary}}>
{{ /}}
{{/}}
So kinda filtering through epic key should allow to show only those tasks who are part of EPIC-1 or EPIC2. Unfortunately, that doesn't work at all.
Does anyone know what is the good way of doing this?
Hi @Vitali Fedarau ,
How does your rule look like? What does your filter/query in the lookupIssues actions look like?
Could you please provide a screenshot of your automation rule/how far you´ve come so far?
Best
Stefan
Hey, @Stefan Salzl Sure, but I think as we are going through simple lookup, it will be just a simple lookup...
Soooooo that basically it... As you can see I just have 1 lookup, that takes all done tickets in a closing sprint and mark it as lookup and then I iterate over lookup and grab all the tickets done.
So, going back to my question, my understanding of this article should allow me to somehow filter this big lookup of tasks, so I can do some filter breakup in the report like
Stories:
Story 1 Story 2
Tasks
Task 1 Task 2
etc...
I basically can achieve the same with multiple lookups, but for multiple lookups I have issues with "if" as well (Does it seem like IF functionality in Jira Automation not working at all?) (my issue with "if": https://community.atlassian.com/t5/Adaptavist-questions/How-to-use-custom-Variables-in-conditional-logic/qaq-p/2135302#U2138139)
BTW, as you can see, I have 2 issue open at the same time for atlassian community, the reason for that - I am trying to achieve that with 2 different ways, either with multiple lookups or with sorting the 1 lookup. None of 2 approaches work so far, so I am trying to make work at least one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vitali Fedarau ,
let´s take one step back. Could you please explain the problem you are trying to solve from a functional/use case perspective?
So I kinda understand what you are technically doing. I´m not quite sure if I can follow what exactly it should solve.
With knowing this it would be easier to follow the steps and try to reproduce and find a solution.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried to test as far as I understood your requirement correctly.
so here is my action in the automation rule:
which delivered following result in the email:
Of course this needs to be configured according to your JQL.
Hope this was helpful.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, @Stefan Salzl
First of all thanks a lot for your help!
It works indeed!
Unfortunately, I finally found an issue that I am experiencing and why,
My initial goal was to sort tickets per Epic Link, so I have started to do that step by step,
Now I can see why yours with type working and mine with
{{#lookupIssues}}
{{#if(equals(issue.epic.key, "TESA-4"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
Doesnt work, all because lookupIssues doesn't have epics as part of lookupIssues object
So that means I can finally make a report based on Issue types, but can't make a report based on Epic Links...
Which means that I should come back to multiple lookups solution,
Anyway thank you very much, you helped a lot to finally understand the issue!
BTW if you have any idea how to sort ticket per Epic Links I would appreciate that :D
Best Regards,
Vitali Fedarau
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just gave it a shot:
epic from lookup: {{lookupIssues.epic Link}}
delivered the epic keys:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmmmmmm, interesting, @Stefan Salzl , so you kinda referring to lookupIssues object, right?
So in my case for filtering it should look like something this?
{{#lookupIssues}}
{{#if(equals(lookupIssues.epic Key, "TESA-4"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
If yes, this case this didnt work for me :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please try the following:
{{#lookupIssues}}
{{#if(equals(lookupIssues.epic Link.key, "TESA-4"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, @Stefan Salzl
Thanks a lot as usual,
But unfortunately it didnt work :(
{{#lookupIssues}}
{{#if(equals(lookupIssues.epic Link.summary, "Test Epic 1"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
Didn work either :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please add my previous suggestion to a "Log action" and send me a screenshot of the audit log of the activation?
{{#lookupIssues}}
{{#if(equals(lookupIssues.epic Link.key, "TESA-4"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure! @Stefan Salzl
Thats what i have when I add
{{#lookupIssues}}
{{#if(equals(lookupIssues.epic Link.key, "TESA-4"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
Fully to Log Audit
And that is what interesting here, that this actually shows proper Log result
But now I have 0 idea how to properly specify the if condition to make it actually work, looks like {{lookupIssues.epic Link.key}} giving all epic keys that issues in 1 object, and not sorting it issue by issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ooouh sorry.....my bad :/
I did a copy-paste-error. As we are already iterating over lookupIssues we do not neet this information in the if-condition. Here is the correct one:
{{#lookupIssues}}
{{#if(equals(epic Link.key, "TESA-4"))}}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
iterating over a list is (as far as I know) not meant to react that dynamically or sorting a list. It is going through the list that resulting from the lookup and handle some conditions within.
One thing that might help would be to sort your jql in the lookup action (order by "Epic Link" DESC).
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would the epic keys for the if condition need to be generated "dynamically" or do you have a fix list of epics and can the be hardcoded?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HELL YEAH IT WORKED!
Thanks a lot, @Stefan Salzl you made it work finally!
For the dynamic - if we could do that "dynamically" that would be great, but right now I am looking into the hardcoded solution, as it seems like more simple, I didnt invent in my head the solution with dynamic epics,
The only thing I have so far that doesn't seem cool is that it repeats the Epic Name each time as it iterates over and over
The Code I have used:
{{#lookupIssues}}
{{#if(equals(epic Link.key, "TESA-4"))}}
<strong>Setup Store</strong>
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
Looks like at this moment of time I have to hardcode the name of the epic above like this:
<strong>Setup Store</strong>
{{#lookupIssues}}
{{#if(equals(epic Link.key, "TESA-4"))}
<{{url}}|{{key}} {{summary}}>
{{/}}
{{/}}
@Stefan Salzl If you have any idea how to make it under 1 cut, I will really appreciate it,
But even still, I own you a lot of beers for your help! :D
Best Regards,
Vitali
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you are welcome my friend. hahaha.....and would enjoy to raise our glasses on this effort with you ;) Really great to know you got that working 💪
AND: It was my pleasure. You owe me nothing haha.....that´s what the community is meant for. We love to seek for solutions and even learn new things :)
I really tried hard but I couldn´t find any easier way to do it in 1 cut. I also considered:
- advanced branching (for each) --> then an email would have been sent for each epic =S
- JQL branching (couldn´t find a solution)
- branch for all issues of sprint (no idea either)
But maybe those ideas could be inspiration for you =)
If my answer did help please consider to hit the Accept button ;)
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@vitali @Stefan Salzl Thanks a lot for this thread. It was very helpful to understand the templating. I'm trying to do the same thing (group issues by Epic) and would like to get the Epics dynamically.
I got the dynamic Epics working, but have two issues:
# epics = {{lookupIssues.epic.summary.distinct}}
{{#epics.split(",")}}
<strong>{{.}}</strong> # Prints fine
{{#lookupIssues}}
<a href="{{url}}">{{key}}</a> - {{summary}}</li> # Doesn't print at all
{{/}}
{{/}}
Assuming lookupIssues block prints the output, I still need to reference "{{.}}" from the Epics block to the lookupIssues. Any insights will be helpful.
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.
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.