Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

group by due and similar should put Invalid date heading before the headings for valid dates. #2591

Closed
2 of 7 tasks
claremacrae opened this issue Jan 17, 2024 · 0 comments · Fixed by #2595
Closed
2 of 7 tasks
Labels
scope: grouping Changes to the grouping capabilities type: bug Something isn't working

Comments

@claremacrae
Copy link
Collaborator

claremacrae commented Jan 17, 2024

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

  • I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

Note: This issue refers to due dates, but the same applies to all the date fields.

group by due and similar should put tasks with invalid dates should be the first heading, Invalid date, as action is required.

Note: this follows on from #2589.

Current behaviour

Current the Invalid date heading is after all valid dates.

Steps to reproduce

  1. Create a note, and call it Invalid dates with Sorting and Grouping
  2. View it in an editing mode
  3. Use Paste and Match Style in the following content:
# Invalid dates with Sorting and Grouping

## Tasks

Numbers indicate the sort order I feel is useful, as invalid dates require action to fix them, so they should be prioritised.

- [ ] #task 1 invalid due date 📅 1999-02-32
- [ ] #task 2 valid over-due date 📅 2023-01-01
- [ ] #task 3 valid future-due date 📅 2050-01-01
- [ ] #task 4 undated

## Group by due - built-in

`Invalid date` should be the first heading, as action is required.

```tasks
group by due

path includes {{query.file.path}}
hide backlinks
hide postpone button
hide task count
```
  1. View the file in Live Preview or Reading mode.

Actual output

image

Expected output

Invalid date should be the first heading.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.5.3

Tasks Plugin Version

5.6.0

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

No response

@claremacrae claremacrae added type: bug Something isn't working scope: grouping Changes to the grouping capabilities labels Jan 17, 2024
claremacrae added a commit that referenced this issue Jan 17, 2024
claremacrae added a commit that referenced this issue Jan 17, 2024
…heading

That is, with the build in date-grouping facility:
1. Invalid dates are in the first group
2. The field name is now included in the group name, which helps with identifying errors.

This fixes #2591, for built-in date-grouping code.
claremacrae added a commit that referenced this issue Jan 17, 2024
 #2591 is fixed.
 And I realised that my 'Default sort order' was wrong, as whether tasks are overdue
 affects the sort order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: grouping Changes to the grouping capabilities type: bug Something isn't working
Projects
None yet
1 participant