5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright 2010, Antoine Mercadal - Capgemini
7 * Copyright 2012, Franck Villaume - TrivialDev
8 * http://fusionforge.org
10 * This file is part of FusionForge. FusionForge is free software;
11 * you can redistribute it and/or modify it under the terms of the
12 * GNU General Public License as published by the Free Software
13 * Foundation; either version 2 of the Licence, or (at your option)
16 * FusionForge is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
34 if (!isset($defect)) {
36 /* do not recreate $clientSOAP object if already created by other pages */
37 if (!isset($clientSOAP))
38 $clientSOAP = new SoapClient($mantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
40 $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
41 } catch (SoapFault $soapFault) {
42 echo '<div class="warning" >'. _('Technical error occurs during data retrieving:'). ' ' .$soapFault->faultstring.'</div>';
47 if ($defect->project->id != $mantisbtConf['id_mantisbt']) {
48 echo '<div class="warning" >'. _('Woops: wrong issue id').'</div>';
52 if (!isset($errorPage)) {
53 include 'jumpToIssue.php';
54 echo '<h2>'._('Ticket').' #'.$idBug.'</h2>';
56 echo '<tr style="background-color: gray;">';
57 echo '<td width="14%" >'._('Category').'</td>';
58 echo '<td width="14%" >'._('Severity').'</td>';
59 echo '<td width="14%" >'._('Reproducibility').'</td>';
60 echo '<td width="14%" >'._('Submit Date').'</td>';
61 echo '<td width="14%" >'._('Update Date').'</td>';
62 echo '<td width="14%" >'._('Found in').'</td>';
63 echo '<td width="14%" >'._('Target').'</td>';
67 (isset($defect->category)) ? $category_value = $defect->category : $category_value = '';
68 echo '<td>'. $category_value.'</td>';
69 (isset($defect->severity->name)) ? $severity_value = $defect->severity->name : $severity_value = '';
70 echo '<td>'. $severity_value .'</td>';
71 (isset($defect->reproducibility->name)) ? $reproducibility_value = $defect->reproducibility->name : $reproducibility_value = '';
72 echo '<td>'. $reproducibility_value .'</td>';
73 // TODO a revoir le problème des dates
74 date_default_timezone_set("UTC");
75 echo '<td>'.date("Y-m-d G:i",strtotime($defect->date_submitted)).'</td>';
76 echo '<td>'.date("Y-m-d G:i",strtotime($defect->last_updated)).'</td>';
77 (isset($defect->version)) ? $version_value = $defect->version : $version_value = '';
78 echo '<td>'. $version_value .'</td>';
79 (isset($defect->target_version)) ? $target_value = $defect->target_version : $target_value = '';
80 echo '<td>'. $target_value .'</td>';
82 echo '<tr style="background-color: gray;">';
83 echo '<td>'._('Reporter').'</td>';
84 echo '<td>'._('Assigned to').'</td>';
85 echo '<td>'._('Priority').'</td>';
86 echo '<td>'._('Resolution').'</td>';
87 echo '<td>'._('Status').'</td>';
88 echo '<td>'._('Fixed in').'</td>';
91 (isset($defect->reporter->name)) ? $reporter_value = $defect->reporter->name : $reporter_value = '';
92 echo '<td>'. $reporter_value .'</td>';
93 (isset($defect->handler->name)) ? $handler_value = $defect->handler->name : $handler_value = '';
94 echo '<td>'. $handler_value .'</td>';
95 (isset($defect->priority->name)) ? $priority_value = $defect->priority->name : $priority_value = '';
96 echo '<td>'. $priority_value .'</td>';
97 (isset($defect->resolution->name)) ? $resolution_value = $defect->resolution->name : $resolution_value = '';
98 echo '<td>'. $resolution_value .'</td>';
99 (isset($defect->status->name)) ? $status_value = $defect->status->name : $status_value = '';
100 echo '<td>'. $status_value .'</td>';
101 (isset($defect->fixed_in_version)) ? $fixed_value = $defect->fixed_in_version : $fixed_value = '';
102 echo '<td>'. $fixed_value .'</td>';
106 echo '<table class="innertabs">';
108 echo '<td width="25%">'._('Summary').'</td>';
109 echo '<td width="75%">'.htmlspecialchars($defect->summary,ENT_QUOTES).'</td>';
112 echo '<td width="25%">'._('Description').'</td>';
113 echo '<td width="75%"><textarea disabled name="description" style="width:99%; background-color:white; color:black; border: none;" rows="6">'.htmlspecialchars($defect->description, ENT_QUOTES).'</textarea></td>';
116 echo '<td width="25%">'. _('Additional Informations').'</td>';
117 (isset($defect->additional_information))? $additional_value = htmlspecialchars($defect->additional_information, ENT_QUOTES) : $additional_value = '';
118 echo '<td width="75%"><textarea disabled name="description" style="width:99%; background-color:white; color:black; border: none;" rows="6">'. $additional_value .'</textarea></td>';
122 <script type="text/javascript">
123 jQuery(document).ready(function() {
124 jQuery("#expandable_edition").hide();
130 <p class="notice_title" onclick='jQuery("#expandable_edition").slideToggle(300)'><?php echo _('Edit ticket') ?></p>
131 <div id='expandable_edition' class="notice_content">
133 if (!isset($errorPage)) {
134 include($gfplugins.$mantisbt->name."/view/editIssue.php");
141 if (!isset($errorPage)) {
142 include($gfplugins.$mantisbt->name."/view/viewNote.php");
143 include($gfplugins.$mantisbt->name."/view/viewAttachment.php");