Skip to content

Ability to sort groups by some user-defined property calculated from all the tasks in the group, such as most recent due dateΒ #1939

@rhhub

Description

@rhhub

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.

πŸ”– Feature description

This feature request encompasses using "group by" then sorting the groups by the content of each group.

Possible Usecases

  1. sort groups by the highest priority task in each group
  2. sort groups by the soonest due/scheduled/created task in each group
  3. sort groups by some special aggregate calculation of each group (less useful and more complicated)

For Comparison Image

#t/group2 should come first because item 1 has the soonest date ⏳ 2023-05-10
image

Desired Image

notice group2 is above group1
image

βœ”οΈ Solution

I'm not sure what the solution would be. I think it would be called on the group by line.

Tasks' Steps

  1. Query tasks
  2. Display groups using group by
  3. Sort the groups by content in each group.

Users Steps

  1. Provide query language to modify group by order

Where user implements sort logic:

```tasks
not done
group by tags SOME CALL HERE
sort by priority
```

❓ Alternatives

I noticed #1421 had some functions added to the group by call. I'm not sure the extent of that addition.

πŸ“ Additional Context

markdown of first screenshot:

- [ ] item 1 #t/group2  ⏳ 2023-05-10
- [ ] item 2 #t/group2  ⏳ 2023-05-14 
- [ ] item 3 #t/group1  ⏳ 2023-05-13
- [ ] item 4 #t/group1  ⏳ 2023-05-14 

```tasks
not done
group by tags
sort by priority
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions