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