obsidian-tasks-group / obsidian-tasks

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

'group by status' is confusing users who have set up custom statuses, and differs from the docs #3030

Open claremacrae opened 1 month ago

claremacrae commented 1 month ago

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

Expected Behavior

Reporting on behalf of Discord user Mold, from discussion starting at this message.

That group by status behaves like it is documented:

image

Current behaviour

The code says it only says it only uses todo for space, however:

https://github.com/obsidian-tasks-group/obsidian-tasks/blob/b954d241221463a5f2a361891e27ee148ab2869e/src/Query/Filter/StatusField.ts#L63-L70

and

https://github.com/obsidian-tasks-group/obsidian-tasks/blob/b954d241221463a5f2a361891e27ee148ab2869e/src/Query/Filter/StatusField.ts#L51-L57

Steps to reproduce

In a vault with Tasks enabled:

  1. Create a new note - the name does not matter
  2. In the Tasks settings, add this custom status:
image
  1. Optionally install and enable the Minimal theme for nice display of the task line that you are about to add...
  2. Paste in this markdown:

- ["] Make dentist appt #life/health  ⏳  2024-08-13

it should show as TODO but is showing under DONE

```tasks
group by status
group by status.name
group by status.type
path includes {{query.file.path}}
```
  1. View the note in Reading mode

Actual result

The first heading in the results is DONE

image

Expected result

The first heading should be DONE.

Which Operating Systems are you using?

Obsidian Version

v1.7.0

Tasks Plugin Version

7.8.0

Checks

Possible solution

I think it's time to make a breaking change and drop backwards compatibility with the pre-custom-statuses behaviour, and make StatusField respect custom statuses.

To put it another way, if the user has gone to the trouble of setting of custom statuses, we should honour them.

claremacrae commented 1 month ago

The behaviour of filtering and sorting by StatusField should also be reviewed.