Indefero

Indefero Commit Details


Date:2012-04-26 11:01:10 (13 years 9 days ago)
Author:Simon Holywell
Branch:develop
Commit:53f6133899fe58285dd8a779aa9cfd417696e498
Parents: c3bbddb1ff394858d6e3870d2a73f69f24e5aa7d
Message:Refactor getIssueCountByDueDate slightly

Changes:

File differences

src/IDF/Project.php
207207
208208
209209
210
210
211211
212
213
214
215
216
217
218
219
220
221
222
223212
224
213
225214
226215
227216
     *
     * @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();
src/IDF/Views/Issue.php
613613
614614
615615
616
616
617617
618618
619619
......
931931
932932
933933
934
934
935935
936936
937937
        }
        // 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);
        // 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';

Archive Download the corresponding diff file

Page rendered in 0.32259s using 13 queries.