diff --git a/src/IDF/Project.php b/src/IDF/Project.php index c5c12ef..86c8b6e 100644 --- a/src/IDF/Project.php +++ b/src/IDF/Project.php @@ -207,21 +207,10 @@ GROUP BY uid"; * * @return int Count */ - public function getIssueCountByDueDate($due='overdue', $status='open', $label=null, $ids=array()) + public function getIssueCountByDueDate($due='overdue', $label=null, $ids=array()) { - switch ($status) { - case 'open': - $key = 'labels_issue_open'; - $default = IDF_Form_IssueTrackingConf::init_open; - break; - case 'closed': - default: - $key = 'labels_issue_closed'; - $default = IDF_Form_IssueTrackingConf::init_closed; - break; - } $tags = array(); - foreach ($this->getTagsFromConfig($key, $default, 'Status') as $tag) { + foreach ($this->getTagsFromConfig('labels_issue_open', IDF_Form_IssueTrackingConf::init_open, 'Status') as $tag) { $tags[] = (int)$tag->id; } if (count($tags) == 0) return array(); diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php index e68f860..8f1b9f9 100644 --- a/src/IDF/Views/Issue.php +++ b/src/IDF/Views/Issue.php @@ -613,7 +613,7 @@ class IDF_Views_Issue } // get stats about the issues - $overdue = $prj->getIssueCountByDueDate('overdue', 'open', $tag, $issue_ids); + $overdue = $prj->getIssueCountByDueDate('overdue', $tag, $issue_ids); $open = $prj->getIssueCountByStatus('open', $tag, $issue_ids); $closed = $prj->getIssueCountByStatus('closed', $tag, $issue_ids); @@ -931,7 +931,7 @@ class IDF_Views_Issue // Get stats about the open/closed issues having this tag. $open = $prj->getIssueCountByStatus('open', $tag); $closed = $prj->getIssueCountByStatus('closed', $tag); - $overdue = $prj->getIssueCountByDueDate('overdue', 'open', $tag); + $overdue = $prj->getIssueCountByDueDate('overdue', $tag); // Paginator to paginate the issues $pag = new Pluf_Paginator(new IDF_Issue()); $pag->model_view = 'join_tags';