Indefero

Indefero Commit Details


Date:2012-03-23 12:03:17 (12 years 8 months ago)
Author:Simon Holywell
Branch:develop
Commit:3a71d71ef891c5e9fa249b6c23b112616832fb3b
Parents: 1d15d53eaa9922d1d0dc2ef370131b11350c8480
Message:Setup the overdue summary graph and issue list view

Changes:

File differences

src/IDF/Project.php
218218
219219
220220
221
221
222222
223223
224224
) AS overdue,
( SELECT COUNT(*) FROM $sqlIssueTable
WHERE due_dtime >= NOW() AND status IN ($tags)
) AS in_date";
) AS undue";
$db = Pluf::db();
$dbData = $db->select($query);
return current($dbData);
src/IDF/Views/Issue.php
124124
125125
126126
127
128
129
127
128
129
130
131
132
130133
131134
132135
......
806809
807810
808811
809
812
810813
811814
812815
......
816819
817820
818821
819
820
822
823
821824
822
823
824
825
825
826
827
828
829
830
831
832
833
826834
827835
828836
// Issue due date statistics
$overdue = $prj->getIssueCountByOverdue('open');
$combined_opened = $overdue['overdue'] + $overdue['in_date'];
$duedateStatistics['Overdue'] = array($overdue['overdue'], (int)(100 * $overdue['overdue'] / $combined_opened), 'Overdue');
$duedateStatistics['In date'] = array($overdue['in_date'], (int)(100 * $overdue['in_date'] / $combined_opened), 'In date');
$combined_opened = $overdue['overdue'] + $overdue['undue'];
$duedateStatistics = array();
if($combined_opened > 0) {
$duedateStatistics['Overdue'] = array($overdue['overdue'], (int)(100 * $overdue['overdue'] / $combined_opened), 'Overdue');
$duedateStatistics['Undue'] = array($overdue['undue'], (int)(100 * $overdue['undue'] / $combined_opened), 'Undue');
}
// Issue class tag statistics
$grouped_tags = $prj->getTagCloud();
$prj = $request->project;
$status = $match[2];
$title = sprintf(__('%s Closed Issues'), (string) $prj);
$title = sprintf(__('%s %s Issues'), (string) $prj, (string) $status);
// Get stats about the issues
$open = $prj->getIssueCountByStatus('open');
$closed = $prj->getIssueCountByStatus('closed');
$pag->item_extra_props = array('project_m' => $prj,
'shortname' => $prj->shortname,
'current_user' => $request->user);
$pag->summary = __('This table shows the closed issues.');
$otags = $prj->getTagIdsByStatus('closed');
$pag->summary = __('This table shows the overdue issues.');
$otags = $prj->getTagIdsByStatus('open');
if (count($otags) == 0) $otags[] = 0;
$pag->forced_where = new Pluf_SQL('project=%s AND status IN ('.implode(', ', $otags).')', array($prj->id));
$pag->action = array('IDF_Views_Issue::listStatus', array($prj->shortname, $status));
$pag->sort_order = array('modif_dtime', 'ASC'); // will be reverted
$pag->sort_reverse_order = array('modif_dtime');
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->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');
$pag->sort_link_title = true;
$pag->extra_classes = array('a-c', '', 'a-c', '');
$list_display = array(
src/IDF/conf/urls.php
163163
164164
165165
166
167
168
169
170
166171
167172
168173
'model' => 'IDF_Views_Issue',
'method' => 'listStatus');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/due/(\w+)/$#',
'base' => $base,
'model' => 'IDF_Views_Issue',
'method' => 'listOverdue');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/label/(\d+)/(\w+)/$#',
'base' => $base,
'model' => 'IDF_Views_Issue',

Archive Download the corresponding diff file

Page rendered in 0.09373s using 13 queries.