Closed willhansen closed 1 day ago
It looks like task export
can actually take a report name, and will use the filter and sort from that report. That's not documented - maybe it should be?
It's a little hard to follow the code, but it looks like in the absence of a report it defaults to sorting by id
, and I think that's what you're seeing -- the tasks with unique id
are sorted numerically, but the tasks not in the working set all have id
zero and the sort does not affect them.
If you have the capability to build locally, you could try changing src/commands/CmdExport.cpp
where it defaults to id
(// if no sort order, sort by id
) to id,uuid
.
To report a bug...
What command(s) did you run?
diff -u <(task export) <(sleep 0.5;task export)
What did you expect to happen? Deterministic output suitable for git tracking
What actually happened? The line order of the output is not deterministic, particularly for completed or deleted tasks with
id:0
eg:{"id":0,"description":"sleep","end":"20240628T000041Z","entry":"20240622T075543Z","modified":"20240628T000041Z","status":"completed","uuid":"dd12ffeb-3ccf-4f39-969a-7638d7eefd04","urgency":0.0438356}, {"id":0,"description":"asdf","end":"20240626T032134Z","entry":"20240614T044317Z","modified":"20240626T032137Z","status":"deleted","uuid":"ecc565bb-b102-4e27-b940-ce1018051f4b","urgency":0.0876712}
Paste the output of the
task diag
command.