Forums

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

Structure AddOn: How to sort by Min() of due date of subtasks

Dieter Guthmann
Contributor
August 10, 2021

Hello,

I want to build a structure with automation (built out of an JQL-Query) that lists tasks and the referencing Sub-Tasks.

  • Task 1
    • Subtask 1 DueDate 2021-09-01
    • Subtask 2 DueTate 2021-09-15
  • Task 2
    • Subtask 3 DueDate 2021-09-30
    • Subtask 4 DueDate 2021-08-30

But the Tasks should be sorted by the minimum of the dueDate oft the subtasks below. So Task 1 should be the first entry because Subtask 4 is due next.

Is this possible? If I try to add a "Sort"-Automation to the "InsertIssues"-Automation I get an error message ("You are about to create a generator. It will be impossible to add it to the structure because of the automation installed....").

We have also Script Runner installed, so 'issueFunction'-Keyword within JQL-Queries is available. But I cant' finde something like

GROUP BY parentIssue having min(dueDate)

Thanks in Advance

 

Dieter

1 answer

2 votes
Dionathan Lopes {ALM Works}
Atlassian Partner
August 10, 2021

Hello @Dieter Guthmann ,

Thank you for sharing your Structure question here on the Atlassian Community

You could try to add a Sort by attribute generator to your structure, using the MIN aggregator as a formula. Please, try the following:

 

  1. On the Summary Column, click on the structure name in the top row
  2. Click Automation | "+" | Sort | Attribute
  3. On the "Order By" field, select Formula
  4. Please enter MIN{DUE_DATE} on the Formula Field
  5. On the Sort Level, please select to which level you want to apply it
  6. Click Apply

 
Let me know if it helps and don't hesitate to contact us if you need any further assistance.

Best Regards,
Dionathan Lopes
[ALM Works]

Suggest an answer

Log in or Sign up to answer