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

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

@TASpinner

Description

@TASpinner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions