6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8973] Hermes to ignore completed nag tasks.
*
Your Email Address
*
Spam protection
Enter the letters below:
.___. .._..__ .___. [__ |\/| | | \ | | | |_|_|__/ |
Comment
> I'm trying to get hermes to ignore completed tasks in nag. Hermes, > does in fact make a request for incomplete tasks via > hermes/lib/Forms/Time.php: > > $criteria = array('user' => Auth::getAuth(), 'active' => true) > > However in the nag/lib/api.php, the list tasks, ignores the criteria > (per the code comment) > > Making the following changes appear to work: > > while ($task = $tasks->each()) { > if ($criteria['active'] == $task->completed) > continue; > > However, I have no idea what side effects I just introduced. :( > > > Monty > > > ====== nag/api.php====== > /** > * Lists active tasks as cost objects. > * * @todo Implement $criteria parameter. > * > * @param array $criteria Filter attributes > */ > function _nag_listCostObjects($criteria) > { > require_once dirname(__FILE__) . '/base.php'; > > $tasks = Nag::listTasks(null, null, null, null, 1); > $result = array(); > $tasks->reset(); > while ($task = $tasks->each()) { > > $result[$task->id] = array('id' => $task->id, > 'active' => !$task->completed, > 'name' => $task->name); > if (!empty($task->estimate)) { > $result[$task->id]['estimate'] = $task->estimate; > } > } > if (count($result) == 0) { > return array(); > } else { > return array(array('category' => _("Tasks"), > 'objects' => array_values($result))); > } > } >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers