todoist
todoist copied to clipboard
Tasks without section sometimes still display a section on the `list` command
Hi!
There are tasks without a section that still display a section when I use the list
command.
This bug doesn't happen with all tasks. Steps to reproduce:
- Create a new project called "Example".
- Add a task called "Some task" without a section.
- Run
todoist sync && todoist list -f '#example'
: the project shows as#Example
. ✅ - Create a new section called "My Section".
- Move "Some task" to "My Section".
- Run
todoist sync && todoist list -f '#example'
: the project shows as#Example/My Section
. ✅ - Move "Some task" out of "My Section", back to the "(No Section)" area.
- Run
todoist sync && todoist list -f '#example'
: the project still shows as#Example/My Section
. ❌ - The correct output is displayed with the
show
command.
In the details below: a (clean) transcript of my terminal output and some screenshots.
$ todoist sync && todoist list -f '#example'
$ todoist sync && todoist list -f '#example'
4693482710 p4 #Example Some task
$ todoist sync && todoist list -f '#example'
4693482710 p4 #Example/My Section Some task
$ todoist sync && todoist list -f '#example'
4693482710 p4 #Example/My Section Some task
$ todoist sync && todoist show 4693482710
ID 4693482710
Content Some task
Project #Example
Labels
Priority p4
DueDate
URL
I found out that removing the local cache is a temporary solution for this problem:
$ rm -rvf ~/.cache/todoist
/Users/aa/.cache/todoist/cache.json
/Users/aa/.cache/todoist
So maybe it's something related to loading or saving empty/null sections in the cache. 🤔
Yes, you are right about that, It's a bug that will happen when there are null sections. Pull request #162 is to solve this issue.