14 $ct[
'etc'][
'table'] =
'task';
17 $ct[
'page'][
'contents'][
'metros'] = array(
21 'produzione' => array(
22 'label' =>
'sprint planning' 25 'label' =>
'dettaglio task' 35 $cf[
'mysql'][
'connection'],
36 'SELECT id, concat(cliente,\' | \', progetto,\' | \',nome ,\' | \',responsabile,\' | \',ore_previste,\' h\' ) AS __label__ FROM task_view '.
37 'WHERE ((anno_previsto <> ? AND settimana_prevista <> ?) OR (anno_previsto = ? AND settimana_prevista > ?) OR ( anno_previsto IS NULL OR settimana_prevista IS NULL ) ) AND timestamp_completamento IS NULL '.
38 'ORDER BY __label__, id_priorita DESC ',
40 array(
's' => date(
'Y', strtotime(
'monday this week' ) ) ),
41 array(
's' => date(
'W', strtotime(
'monday this week' ) ) ),
42 array(
's' => date(
'Y', strtotime(
'monday this week' ) ) ),
43 array(
's' => date(
'W', strtotime(
'monday this week' ) ) )
50 $cf[
'mysql'][
'connection'],
51 'UPDATE task SET anno_previsto = ?, settimana_prevista = ? '.
54 array(
's' => date(
'Y', strtotime(
'monday this week' ) ) ),
55 array(
's' => date(
'W', strtotime(
'monday this week' ) ) ),
90 $ct[
'page'][
'contents'][
'metro'][
'produzione'][] = array(
91 'include' =>
'inc/progetti.pianificazione.ore.html');
138 $cf[
'mysql'][
'connection'],
139 'SELECT task_view.* FROM task_view WHERE ( (anno_previsto = ? AND settimana_prevista <= ?) OR anno_previsto < ?) '.
140 'AND (timestamp_completamento IS NULL OR (timestamp_completamento >= ? AND timestamp_completamento <= ? ) )'.
141 'ORDER BY timestamp_completamento ASC, timestamp_revisione ASC, id_priorita DESC ',
143 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
144 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
145 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
146 array(
's' => strtotime(
'monday '.$wPrefix.
' week' ) ),
147 array(
's' => strtotime(
'sunday '.$wPrefix.
' week' ) )
152 $ct[
'etc'][
'task'][
'pianificati'] =
sizeof(
$ct[
'etc'][
'focus']);
154 $cf[
'mysql'][
'connection'],
155 'SELECT COUNT(*) AS totale FROM task_view WHERE ( (anno_previsto = ? AND settimana_prevista <= ?) OR anno_previsto < ?) '.
156 'AND (timestamp_completamento IS NOT NULL AND (timestamp_completamento >= ? AND timestamp_completamento <= ? ) )'.
157 'ORDER BY timestamp_completamento ASC, timestamp_revisione ASC, id_priorita DESC ',
159 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
160 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
161 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
162 array(
's' => strtotime(
'monday '.$wPrefix.
' week' ) ),
163 array(
's' => strtotime(
'sunday '.$wPrefix.
' week' ) )
167 $ct[
'etc'][
'domenica'] = strtotime(
'sunday '.$wPrefix.
' week' );
170 $cf[
'mysql'][
'connection'],
171 'SELECT COUNT(*) AS totale FROM task_view WHERE ((anno_previsto = ? AND settimana_prevista <= ?) OR anno_previsto <? ) '.
172 'AND timestamp_completamento IS NULL AND timestamp_revisione IS NOT NULL '.
173 'AND (timestamp_revisione >= ? AND timestamp_revisione <= ? ) '.
174 'ORDER BY anno_previsto ASC, settimana_prevista ASC ',
176 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
177 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
178 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
179 array(
's' => strtotime(
'monday '.$wPrefix.
' week' ) ),
180 array(
's' => strtotime(
'sunday '.$wPrefix.
' week' ) )
184 $ct[
'etc'][
'task'][
'mancanti'] =
$ct[
'etc'][
'task'][
'pianificati'] -
$ct[
'etc'][
'task'][
'revisione'] -
$ct[
'etc'][
'task'][
'chiusi'];
189 $cf[
'mysql'][
'connection'],
190 'SELECT coalesce( sum( attivita_view.ore ) ) AS t FROM attivita_view INNER JOIN task_view ON task_view.id = attivita_view.id_task '.
191 'WHERE attivita_view.data >= ? AND attivita_view.data <= ? AND ((task_view.anno_previsto = ? AND task_view.settimana_prevista <= ?) OR task_view.anno_previsto < ? )',
193 array(
's' => date(
'Y-m-d', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
194 array(
's' => date(
'Y-m-d', strtotime(
'sunday '.$wPrefix.
' week' ) ) ),
196 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
197 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
198 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) )
205 $cf[
'mysql'][
'connection'],
206 'SELECT coalesce( sum( attivita_view.ore ) ) AS t FROM attivita_view INNER JOIN task_view ON task_view.id = attivita_view.id_task '.
207 'WHERE attivita_view.data < ? AND ((task_view.anno_previsto = ? AND task_view.settimana_prevista <= ?) OR task_view.anno_previsto < ? ) '.
208 'AND (timestamp_completamento IS NULL OR ( timestamp_completamento >= ? AND timestamp_completamento <= ? ) )' ,
210 array(
's' => date(
'Y-m-d', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
212 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
213 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
214 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
215 array(
's' => strtotime(
'monday '.$wPrefix.
' week' ) ),
216 array(
's' => strtotime(
'sunday '.$wPrefix.
' week' ) )
221 $ct[
'etc'][
'ore'][
'pianificate'] = 0;
222 foreach($ct[
'etc'][
'focus'] as $task ){
223 $ct[
'etc'][
'ore'][
'pianificate'] += $task[
'ore_previste'];
228 $cf[
'mysql'][
'connection'],
229 'SELECT coalesce( sum( attivita_view.ore ) ) AS t FROM attivita_view '.
230 'LEFT JOIN task_view ON task_view.id = attivita_view.id_task '.
231 'WHERE attivita_view.data >= ? AND ( '.
232 '( attivita_view.id_task IS NULL ) OR ( '.
233 '( task_view.anno_previsto > ? OR ( task_view.anno_previsto = ? AND task_view.settimana_prevista <> ? ) )'.
236 array(
's' => date(
'Y-m-d', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
239 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
240 array(
's' => date(
'Y', strtotime(
'monday '.$wPrefix.
' week' ) ) ),
241 array(
's' => date(
'W', strtotime(
'monday '.$wPrefix.
' week' ) ) )
245 if( $ct[
'etc'][
'ore'][
'pianificate']>0 ){
246 $ct[
'etc'][
'ore'][
'variazione_h'] = $ct[
'etc'][
'ore'][
'pianificate'] - $ct[
'etc'][
'ore'][
'fatte'] - $ct[
'etc'][
'ore'][
'passate'];
247 $ct[
'etc'][
'ore'][
'variazione_perc'] = 100 - (($ct[
'etc'][
'ore'][
'fatte'] + $ct[
'etc'][
'ore'][
'passate'] )* 100 / $ct[
'etc'][
'ore'][
'pianificate']);}
266 $ct[
'contents'][
'chartjs'][
'doughnut'][
'avanzamento'] = array(
268 'task chiusi' => array(
270 'value' => $ct[
'etc'][
'task'][
'chiusi'],
271 'bgColor' =>
'rgba( 16, 16, 16, 0.5 )',
272 'bdColor' =>
'rgba( 96, 96, 96, 0.5 )' 275 'task in revisione' => array(
277 'value' => $ct[
'etc'][
'task'][
'revisione'],
278 'bgColor' =>
'rgba( 126, 126, 126, 0.5 )',
279 'bdColor' =>
'rgba( 96, 96, 96, 0.5 )' 282 'task aperti' => array(
284 'value' => $ct[
'etc'][
'task'][
'mancanti'],
285 'bgColor' =>
'rgba( 200, 200, 200, 0.5 )',
286 'bdColor' =>
'rgba( 96, 96, 96, 0.5 )' 292 'gridLines' => array(
'display' =>
false )
302 foreach( $ct[
'contents'][
'chartjs'][
'doughnut'][
'avanzamento'][
'data'] as $label => $dataset ) {
303 foreach( $dataset as $dsName => $dsData ) {
304 $ct[
'contents'][
'chartjs'][
'doughnut'][
'avanzamento'][
'dataset'][ $dsName ][
'data'][ $label ] = $dsData;
308 $ct[
'contents'][
'chartjs'][
'doughnut'][
'avanzamento'][
'options'] = json_encode( $ct[
'contents'][
'chartjs'][
'doughnut'][
'avanzamento'][
'options'],
true );
319 $ct[
'page'][
'contents'][
'metro'][
'focus'][] = array(
320 'include' =>
'inc/progetti.analisi.html' 324 $ct[
'page'][
'contents'][
'metro'][
'focus'][] = array(
325 #
'include' =>
'inc/progetti.analisi.aggiunta.task.html' 326 'modal' => array(
'id' =>
'aggiungi',
'include' =>
'inc/progetti.analisi.aggiunta.task.html' )
333 require
DIRECTORY_BASE .
'_src/_inc/_macro/_default.gestione.php';
$cf['ricerca']['template']
$_REQUEST['__view__'][ $ct['view']['id']]['__restrict__']['id_progetto']['EQ']