Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Creation dates on tasks with priority are "None" #15

Open
TASpinner opened this issue Dec 31, 2019 · 0 comments
Open

Creation dates on tasks with priority are "None" #15

TASpinner opened this issue Dec 31, 2019 · 0 comments

Comments

@TASpinner
Copy link

I wrote this up, then noticed @MaurizioBruetsch had a merge request for "Fix creation_date bug #14" Perhaps this is the same issue. Perhaps this has value as a demonstration of the issue.

Using todotxtio 0.2.3

If the todo has a priority assigned and a creation_date, the creation_date is loaded with None.

My code reduced to a simple example:

todo_creation_date_bug.py

#!/usr/bin/python3

todofile = 'todo_creation_date_bug.txt'

import sys
import todotxtio

todos = todotxtio.from_file(todofile)

for todo in todos:
   print(todo, todo.creation_date)

todo_creation_date_bug.txt

(A) 2019-12-31 task with priority, creation date
2019-12-31 task with no priority, creation date
(A) task with priority, no creation date
task with no priority, no creation date

run it

$ ./todo_creation_date_bug.py
(A) task with priority, creation date None
2019-12-31 task with no priority, creation date 2019-12-31
(A) task with priority, no creation date None
task with no priority, no creation date None
$ 

analysis

The first line was: (A) task with priority, creation date None
I expected: (A) task with priority, creation date 2019-12-31

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant