diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php index 92a5d12..cd1ae69 100644 --- a/src/IDF/Views/Issue.php +++ b/src/IDF/Views/Issue.php @@ -837,13 +837,13 @@ class IDF_Views_Issue public function listOverdue($request, $match) { $prj = $request->project; - $status = $match[2]; + $status = __('Overdue'); $title = sprintf(__('%s %s Issues'), (string) $prj, (string) $status); // Get stats about the issues $open = $prj->getIssueCountByStatus('open'); $closed = $prj->getIssueCountByStatus('closed'); - $overdue = $prj->getIssueCountByDueDate('overdue'); + $overdue = $prj->getIssueCountByDueDate(); // Paginator to paginate the issues $pag = new Pluf_Paginator(new IDF_Issue()); $pag->class = 'recent-issues'; @@ -853,12 +853,7 @@ class IDF_Views_Issue $pag->summary = __('This table shows the overdue issues.'); $otags = $prj->getTagIdsByStatus('open'); if (count($otags) == 0) $otags[] = 0; - if ('Undue' == $status) { - $where = 'AND due_dtime >= NOW()'; - } else { - $where = 'AND due_dtime < NOW()'; - } - $pag->forced_where = new Pluf_SQL('project=%s ' . $where . ' AND status IN ('.implode(', ', $otags).')', array($prj->id)); + $pag->forced_where = new Pluf_SQL('project=%s AND due_dtime < NOW() AND status IN ('.implode(', ', $otags).')', array($prj->id)); $pag->action = array('IDF_Views_Issue::listOverdue', array($prj->shortname, $status)); $pag->sort_order = array('due_dtime', 'DESC'); // will be reverted $pag->sort_reverse_order = array('due_dtime'); diff --git a/src/IDF/conf/urls.php b/src/IDF/conf/urls.php index 44aacf0..cfe2689 100644 --- a/src/IDF/conf/urls.php +++ b/src/IDF/conf/urls.php @@ -163,7 +163,7 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/status/(\w+)/$#', 'model' => 'IDF_Views_Issue', 'method' => 'listStatus'); -$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/(\w+)/$#', +$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/overdue/$#', 'base' => $base, 'model' => 'IDF_Views_Issue', 'method' => 'listOverdue'); diff --git a/src/IDF/templates/idf/issues/summary.html b/src/IDF/templates/idf/issues/summary.html index bc5f4a1..f7efa79 100644 --- a/src/IDF/templates/idf/issues/summary.html +++ b/src/IDF/templates/idf/issues/summary.html @@ -111,7 +111,7 @@ - {aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'Overdue', 'due')} + {aurl 'url', 'IDF_Views_Issue::listOverdue', array($project.shortname, 'overdue', 'due')} {blocktrans}Overdue{/blocktrans} {$duedateStatistics[0]}