<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Hermes to ignore completed nag tasks.</title> 
  <pubDate>Thu, 09 Apr 2026 16:55:01 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8973</link> 
  <atom:link rel="self" type="application/rss+xml" title="Hermes to ignore completed nag tasks." href="https://bugs.horde.org/ticket/8973/rss" /> 
  <description>Hermes to ignore completed nag tasks.</description> 
 
   
   
  <item> 
   <title>I&#039;m trying to get hermes to ignore completed tasks in nag.  </title> 
   <description>I&#039;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(&#039;user&#039;   =&gt; Auth::getAuth(),  &#039;active&#039; =&gt; 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-&gt;each()) {
     if ($criteria[&#039;active&#039;] == $task-&gt;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__) . &#039;/base.php&#039;;

  $tasks = Nag::listTasks(null, null, null, null, 1);
  $result = array();
  $tasks-&gt;reset();
  while ($task = $tasks-&gt;each()) {

      $result[$task-&gt;id] = array(&#039;id&#039; =&gt; $task-&gt;id,
                                 &#039;active&#039; =&gt; !$task-&gt;completed,
                                 &#039;name&#039; =&gt; $task-&gt;name);
      if (!empty($task-&gt;estimate)) {
          $result[$task-&gt;id][&#039;estimate&#039;] = $task-&gt;estimate;
      }
  }
    if (count($result) == 0) {
      return array();
  } else {
      return array(array(&#039;category&#039; =&gt; _(&quot;Tasks&quot;),
                         &#039;objects&#039;  =&gt; array_values($result)));
  }
}
</description> 
   <pubDate>Sat, 17 Apr 2010 23:06:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8973#t58552</link> 
  </item> 
   
  <item> 
   <title>It&#039;s the expected behavior, Hermes should show all tasks, no</title> 
   <description>It&#039;s the expected behavior, Hermes should show all tasks, not only completed.</description> 
   <pubDate>Sun, 18 Apr 2010 12:15:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8973#t58553</link> 
  </item> 
   
  <item> 
   <title>In the code comment, it said implementing $criteria  was a &quot;</title> 
   <description>In the code comment, it said implementing $criteria  was a &quot;todo item&quot;.  It doesn&#039;t seem like current behavior is what is ultimately wanted.  Otherwise calling functions would be passing null criteria - or just strip out the arg altogether.  50-60 tasks in a drop down box is extremely annoying.

I think I will stick with my fix.

&gt; It&#039;s the expected behavior, Hermes should show all tasks, not only completed.
</description> 
   <pubDate>Sun, 18 Apr 2010 14:31:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8973#t58559</link> 
  </item> 
   
  <item> 
   <title>&gt; It&#039;s the expected behavior, Hermes should show all tasks, </title> 
   <description>&gt; It&#039;s the expected behavior, Hermes should show all tasks, not only completed.

This is different, however, from Whups&#039; behavior.  In Hermes, only tickets in one of the &quot;open&quot; states are shown.  This has its own practical problems because 1) you can&#039;t track time to closed tickets and 2) When reviewing time on closed tickets the UI shows strange things.

However I agree with the reporter that having such a large drop-down is unmanageable.  I think we need to find a third solution.</description> 
   <pubDate>Thu, 27 May 2010 20:26:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8973#t58981</link> 
  </item> 
   
  <item> 
   <title>Agreed, both that we need to handle this consistently, and t</title> 
   <description>Agreed, both that we need to handle this consistently, and that we need a better way to deal with cost objects. That should be separate request though.</description> 
   <pubDate>Thu, 27 May 2010 20:41:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8973#t58982</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
