5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * http://fusionforge.org
8 * This file is part of FusionForge. FusionForge is free software;
9 * you can redistribute it and/or modify it under the terms of the
10 * GNU General Public License as published by the Free Software
11 * Foundation; either version 2 of the Licence, or (at your option)
14 * FusionForge is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 /* do not recreate $clientSOAP object if already created by other pages */
34 if (!isset($clientSOAP))
35 $clientSOAP = new SoapClient($mantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
37 $stats = $clientSOAP->__soapCall('mc_project_get_statistiques', array("username" => $username, "password" => $password, "project_id" => $mantisbtConf['id_mantisbt'], "level" => 0));
38 } catch (SoapFault $soapFault) {
39 echo '<div class="warning" >'. _('Technical error occurs during data retrieving:'). ' ' .$soapFault->faultstring.'</div>';
43 if (!isset($errorPage)){
44 $total = array('open' => 0, 'resolved' => 0, 'resolved' => 0, 'closed' => 0, 'total' => 0);
45 echo $HTML->boxTop(_('Tickets oer Status'));
47 echo '<th>'._('Project').'</th>';
48 echo '<th>'._('Open').'</th>';
49 echo '<th>'._('Fixed').'</th>';
50 echo '<th>'._('Closed').'</th>';
51 echo '<th>'._('Total').'</th>';
54 foreach ($stats as $stat) {
56 for($i = 1; $i < $stat->project_level; $i++){
57 $indentation = $indentation .' ';
59 echo '<tr '.$HTML->boxGetAltRowStyle($nbligne).'">';
61 if ($stat->project_level > 1){
62 echo sprintf('<td>%s >> <a class="DataLink" href="?type=group&group_id=%s&pluginname=%s">%s</a></td>',$indentation,group_get_objectid_by_publicname($stat->project_name), $mantisbt->name, $stat->project_name);
64 echo sprintf('<td><a class="DataLink" href="?type=group&group_id=%s&pluginname=%s">%s</a></td>',group_get_objectid_by_publicname($stat->project_name), $mantisbt->name, $stat->project_name);
66 echo '<td>'.$stat->open.'</td>';
67 echo '<td>'.$stat->resolved.'</td>';
68 echo '<td>'.$stat->closed.'</td>';
69 echo '<td>'.$stat->total.'</td>';
73 $total['open'] += $stat->open;
74 $total['resolved'] += $stat->resolved;
75 $total['closed'] += $stat->closed;
76 $total['total'] += $stat->total;
81 echo '<td>'.$total['open'].'</td>';
82 echo '<td>'.$total['resolved'].'</td>';
83 echo '<td>'.$total['closed'].'</td>';
84 echo '<td>'.$total['total'].'</td>';
86 echo $HTML->boxBottom();