Forums

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

How to create automation with Lookup issues for tasks with subtasks for Webhook notification?

Lex A
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 8, 2023

Hello.

I want to create new report for webhook automation using jira action "Lookup issues".  I need grouping data template by reporter. My issues have subtasks and I need also group them.

So, in the end I want to see the structure like this:

{{#lookupIssues}}

Reporter Name 1

  • Task 1
    • Subtask 11
    • Subtask 21
  • Task 2
    • Subtask 111
    • Subtask 211
    • Subtask 311

Reporter Name 2

  • Task 3
    • Subtask 1111
    • Subtask 21111
  • Task 3
    • Subtask 11111
    • Subtask 21111
    • Subtask 31111

{{/}}

How can I do this?

I really hope someone can help with that! 🙏

1 answer

0 votes
habib rahman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2023

Hi @Lex A My name is Habib I will help you with this request if this answer helps please so accept this answer so others can benefit from this as well.

 

To create a report for webhook automation using Jira action "Lookup issues" and group the data template by reporter, you can follow these steps:
  1. Create a new report in Jira and select the "Lookup issues" action.
  2. Configure the lookup issues action to retrieve the desired set of issues, including sub-tasks, and any necessary fields.
  3. In the report template, use the "group by" function to group the issues by reporter.
  4. Within each reporter group, use nested loops to iterate over the tasks and sub-tasks for each reporter.
Here is an example of what the report template might look like:
```
{{#groupBy assignee}}
Reporter: {{assignee.name}}
{{#groupBy parent}}
  • Task: {{parent.key}} - {{parent.summary}}
   {{#each issues}}
  • Subtask: {{key}} - {{summary}}
   {{/each}}
{{/groupBy}}
{{/groupBy}}
```
In this example, we first group the issues by assignee, and then within each assignee group, we group the issues by parent (i.e., the parent issue for sub-tasks) to group the sub-tasks under their respective parent tasks.
Within each parent group, we use a loop to iterate over the issues and display the sub-tasks.You can customize this template to include additional fields or formatting as needed.

I hope this helps.

Thank you 

Habib 

Suggest an answer

Log in or Sign up to answer