[nag] selecting from a large number of to-dos

Sebastian Birnbach birnbacs at gmail.com
Mon Jul 27 18:34:17 UTC 2015


I want to display a user's open tasks over the next month and also the
completed tasks over a few weeks back. I imagine a scenario where the user
has a couple of thousand completed tasks (over the past few years) and a
few tens uncompleted (in the near future).

As far I can see there is no support for restricting the returned tasks
inside Nag_API: listTasks() does not support start and stop times and
listTimeObjects() is just a wrapper around listTasks(). It would be
terribly uneconomic to retrieve all tasks from the backend every time and
sieve them through, wouldn't it?

Of course I could purge older to-dos from the backend - but that would mean
a permanent loss of information.

Or I could skip display of completed tasks and hope that the "completed"
parameter in listTasks() is part of the query to the backend.

To actually use 'start' and 'stop' parameters on the backend query I would
have to access the backend directly, without Nag_Api. Seems doable for
mySQL -- but only as far as there are no recurring to-dos to figure out.

A nice thing would be an 'archive' flag or something.

Any better ideas? How do you guys handle a large number of to-dos?

Regards

  Sebastian


More information about the nag mailing list