GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.46k stars 306 forks source link

[TW-978] Sorting by countdown doesn't work correctly for tasks with due dates less than 24h away #1013

Closed taskwarrior closed 6 years ago

taskwarrior commented 6 years ago

Cory Donnelly on 2010-07-17T19:06:32Z says:

(Originally reported by Michelle Crane (http://taskwarrior.org/boards/1/topics/show/554#message-555)

Here's the report definition:

# task long
report.long.description=Lists all task, all data, matching the specified criteria
report.long.columns=id,project,priority,entry,start,due,recur,countdown,age,tags,description
report.long.labels=ID,Project,Pri,Added,Started,Due,Recur,Countdown,Age,Tags,Description

  1. report.long.sort=countdown-,due+,priority-,project+ report.long.sort=countdown-
    report.long.filter=status:pending
  2. report.long.dateformat=m/d/Y
  3. report.long.annotations=full
Here's the report output -- note that tasks with IDs 1 and 10 seem swapped:
$ task rc:minimal.rc long
Using alternate .taskrc file minimal.rc

ID Project Pri Added Started Due Recur Countdown Age Tags Description
7 2010-07-17 8/15/2010 -4 wks 2 hrs Four Weeks Away plus a day 8 2010-07-17 8/8/2010 -3 wks 2 hrs Three Weeks Away plus a day 5 2010-07-17 8/14/2010 -3 wks 2 hrs Four Weeks Away 4 2010-07-17 8/7/2010 -2 wks 2 hrs Three Weeks Away 9 2010-07-17 8/1/2010 -2 wks 2 hrs Two Weeks Away plus a day 6 2010-07-17 7/25/2010 -7 days 2 hrs Next Week plus a day 3 2010-07-17 7/31/2010 -1 wk 2 hrs Two Weeks Away 2 2010-07-17 7/24/2010 -6 days 2 hrs Next Week 10 2010-07-17 7/17/2010 2 hrs 8 mins Today (later)
1 2010-07-17 7/17/2010 19 hrs 2 hrs Today

taskwarrior commented 6 years ago

Migrated metadata:

Created: 2010-07-17T19:06:32Z
Modified: 2014-02-09T02:13:25Z
taskwarrior commented 6 years ago

Cory Donnelly on 2010-07-20T16:49:22Z says:

This is not a bug -- sorting is working correctly, but the following two points contributed to the confusion:

Here's a more illustrative example:

ID Countdown Description                        


  • 7 -3 days Due seventy-two hours in the future 6 -1 day Due thirty-six hours in the future 5 -12 hrs Due twelve hours in the future 4 -7 hrs Due seven hours in the future 3 -1 hr Due one hour in the future 2 - Due now 1 1 hr Due one hour ago

I'm creating a unit test to ensure this continues to work.

taskwarrior commented 6 years ago

Federico Hernandez on 2010-07-20T16:59:59Z says:

With regards to

The T-minus method of indicating past and future dates takes some getting used to

I have written about this in #392:

Countdowns have always been counted negative, for example http://www.nasa.gov/mission_pages/shuttle/launch/countdown101.html

It makes perfect sence to have them negative

Countdown is at -3

* 3   -2   -1    0    1    2    3
* ---+----+----+----+----+----+----+----
  Now            Due

Countdown (overdue) is at 2 (and correlates nicely with the age value which is alos positve for an event in the past)

* 3   -2   -1    0    1    2    3
* ---+----+----+----+----+----+----+----
                 Due       Now

The point of reference is the due date and becomes "0" on the time axis. To the left of zero we have negative numbers, to the right positive ones. The point of reference, the due date, is fixed. Only now, the current date, moves along the axis.

taskwarrior commented 6 years ago

Cory Donnelly on 2010-07-20T18:06:38Z says:

Countdowns have always been counted negative, for example http://www.nasa.gov/mission_pages/shuttle/launch/countdown101.html

It makes perfect sence to have them negative

Agreed, I just haven't yet internalized the notation.

For me, the primary reason for confusion was that, when times are unspecified, Countdown uses 00:00 (midnight) -- I didn't expect countdown to report a positive number (indicating the due date had passed) before the day was over, and didn't notice the lack of a negative sign.

taskwarrior commented 6 years ago

Federico Hernandez on 2010-07-20T18:29:52Z says:

You are right about the point of time when a task becomes "overdue". It would make sense to include the day of the date that is given for due. At the moment it is exclusive. IIRC I have written something about it in the forum. Eventually one should be able to specify the "time" on a day when a task is due and becomes overdue. Either in general as Michelle pointed at 1600 or for every task individually.

pbeckingham commented 6 years ago

TW-978_minimal.rc.txt TW-978_pending.data.txt