View Single Post
Quote:
Originally Posted by kingsinger View Post
Between filters that exclude certain tasks, etc., I now have the same flat list of tasks visible via ofexport that I have in my of perspective current focus.

But I'm not getting the same sort order when I sort by due date.

Should I be using -t "sort due" if I want to sort the visible tasks by due date? If not, what should I use to make this work? If -t "sort due" is the way to go, where should I place that filter? At the beginning of things? or towards the end of the expression?
You would want to put the -t "sort due" after any use of -a flatten since you might have had task groups with due dates on the group and different due dates on the child tasks. After flattening the hierarchy the sort order wouldn't make sense.

Also the code simply sorts by the tasks by their due date, substituting the current date for tasks that have none - just as means for preventing a crash. If after your other filters have run you still have tasks with no due date or you have many tasks with the same date - then the final sort order is down to the vagaries of the python sort.

If this still doesn't explain what you're seeing, can you post the command line you're using and I'll see if you've unearthed a bug.