obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.17k stars 219 forks source link

Inconsistent sort order of groups by date categories (sometimes) #2789

Open claremacrae opened 4 weeks ago

claremacrae commented 4 weeks ago

Please check that this issue hasn't been reported before.

Expected Behavior

That the group by function task.happens.fromNow.groupText puts tasks in the order:

Current behaviour

I cannot reliably reproduce this, but it has been happening to me intermittently today, in two different vaults, that I get them in the order:

image

Steps to reproduce

  1. Create a file called Date Categories
  2. Paste in this content
# Date Categories

- [ ] #task ==1== Due yesterday 📅 2024-04-28
- [ ] #task ==2== Due today 📅 2024-04-29
- [ ] #task ==3== Due tomorrow 📅 2024-04-30

## fromNow.groupText

```tasks
path includes {{query.file.path}}
group by function task.due.fromNow.groupText
```

## fromNow.sortOrder

```tasks
path includes {{query.file.path}}
group by function task.due.fromNow.sortOrder
```

## Expected Order

```tasks
path includes {{query.file.path}}
group by due
```
  1. View in Reading Mode

Expected result: the tasks are in the same order in all 3 searches

Actual result: sometimes the first one shows them in the order 2, 1, 3.

Which Operating Systems are you using?

Obsidian Version

1.5.12

Tasks Plugin Version

7.0.0

Checks

Possible solution

No response