6.0.0-alpha10
5/14/25

[#14067] selecting from a large number of to-dos
Summary selecting from a large number of to-dos
Queue Horde Groupware
Queue Version 5.2.7
Type Enhancement
State Accepted
Priority 2. Medium
Owners
Requester birnbacs (at) gmail (dot) com
Created 07/28/2015 (3578 days ago)
Due
Updated 01/27/2016 (3395 days ago)
Assigned
Resolved
Milestone
Patch No

History
01/27/2016 05:18:28 PM Jan Schneider State ⇒ Accepted
 
09/21/2015 05:28:46 PM Michael Rubinsky Comment #4 Reply to this comment
I agree on that point, but think we could also eventually look at 
expanding the API to filter on start/end dates as well and providing 
optimized queries for this in the backends that support it - instead 
of fetching all tasks and filtering in-memory.
09/21/2015 04:42:06 PM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
There already is a login task to delete old, complete tasks. I think 
this should suffice to clean up large task lists.
07/28/2015 07:25:39 AM birnbacs (at) gmail (dot) com Comment #2 Reply to this comment
I suggest using an archive() function that marks a to-do as historic 
if it is marked as completed and there are no more recurrences in 
the future.
[...]
getTasks() should support a corresponding parameter indicating if a 
search is to be made on live or archived to-dos.
A corresponding tag could be used for this but getTasks() would have 
to pass on the parameter to the backend for query.

07/28/2015 07:19:35 AM birnbacs (at) gmail (dot) com Comment #1
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ selecting from a large number of to-dos
Queue ⇒ Horde Groupware
Milestone ⇒
Patch ⇒ No
State ⇒ New
Reply to this comment
This concerns Nag and especially its Nag_Api.

Retrieving tasks via getTasks() involves fetching all to-dos of a 
tasklist from the backend and sieving through the results. The only 
parameter for effectively restricting the search is the completed 
flag. There is no support for $start and $end parameters. Over the 
years a user's to-do list may accumulate a large number (thousands) of 
entries so that fetching to-dos from the backend will be an 
unnecessarily expensive operation. This may be relevant for displaying 
a user's "current status" that includes uncompleted to-dos as well as 
completed to-dos from the past week or so.

As retrieving a to-do may involve calculating recurrences, a simple 
parametrisation of the backend driver for $start and $end dates may 
not suffice. I suggest using an archive() function that marks a to-do 
as historic if it is marked as completed and there are no more 
recurrences in the future. This way all to-dos are kept in the 
tasklist and synchronising is not affected.

The archive() function could be called automatically on any change 
operation to a to-do, with a selectable threshold of age (e.g. all 
to-dos with a due-date in the past and a completed-date more than 4 
weeks ago is marked as historical).

getTasks() should support a corresponding parameter indicating if a 
search is to be made on live or archived to-dos.




Saved Queries