5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright 2010, Antoine Mercadal - Capgemini
7 * Copyright 2012,2014 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.
36 if (!isset($defect)) {
38 /* do not recreate $clientSOAP object if already created by other pages */
39 if (!isset($clientSOAP)) {
40 $clientSOAP = new SoapClient($mantisbtConf['url'].'/api/soap/mantisconnect.php?wsdl', array('trace' => true, 'exceptions' => true));
42 $defect = $clientSOAP->__soapCall('mc_issue_get', array('username' => $username, 'password' => $password, 'issue_id' => $idBug));
43 } catch (SoapFault $soapFault) {
44 echo $HTML->warning_msg(_('Technical error occurs during data retrieving')._(': ').$soapFault->faultstring);
49 if (isset($defect) && $defect->project->id != $mantisbtConf['id_mantisbt']) {
50 echo $HTML->warning_msg(_('Woops: wrong issue id'));
54 if (!isset($errorPage)) {
55 include ($gfplugins.$mantisbt->name.'/view/jumpToIssue.php');
56 echo html_e('h2', array(), _('Ticket').' #'.$idBug);
58 echo '<tr style="background-color: gray;">';
59 echo '<td width="14%" >'._('Category').'</td>';
60 echo '<td width="14%" >'._('Severity').'</td>';
61 echo '<td width="14%" >'._('Reproducibility').'</td>';
62 echo '<td width="14%" >'._('Submit Date').'</td>';
63 echo '<td width="14%" >'._('Update Date').'</td>';
64 echo '<td width="14%" >'._('Found in').'</td>';
65 echo '<td width="14%" >'._('Target').'</td>';
69 (isset($defect->category)) ? $category_value = $defect->category : $category_value = '';
70 echo '<td>'. $category_value.'</td>';
71 (isset($defect->severity->name)) ? $severity_value = $defect->severity->name : $severity_value = '';
72 echo '<td>'. $severity_value .'</td>';
73 (isset($defect->reproducibility->name)) ? $reproducibility_value = $defect->reproducibility->name : $reproducibility_value = '';
74 echo '<td>'. $reproducibility_value .'</td>';
75 // TODO a revoir le problème des dates
76 date_default_timezone_set("UTC");
77 echo '<td>'.date("Y-m-d G:i",strtotime($defect->date_submitted)).'</td>';
78 echo '<td>'.date("Y-m-d G:i",strtotime($defect->last_updated)).'</td>';
79 (isset($defect->version)) ? $version_value = $defect->version : $version_value = '';
80 echo '<td>'. $version_value .'</td>';
81 (isset($defect->target_version)) ? $target_value = $defect->target_version : $target_value = '';
82 echo '<td>'. $target_value .'</td>';
84 echo '<tr style="background-color: gray;">';
85 echo '<td>'._('Reporter').'</td>';
86 echo '<td>'._('Assigned to').'</td>';
87 echo '<td>'._('Priority').'</td>';
88 echo '<td>'._('Resolution').'</td>';
89 echo '<td>'._('Status').'</td>';
90 echo '<td>'._('Fixed in').'</td>';
93 (isset($defect->reporter->name)) ? $reporter_value = $defect->reporter->name : $reporter_value = '';
94 echo '<td>'. $reporter_value .'</td>';
95 (isset($defect->handler->name)) ? $handler_value = $defect->handler->name : $handler_value = '';
96 echo '<td>'. $handler_value .'</td>';
97 (isset($defect->priority->name)) ? $priority_value = $defect->priority->name : $priority_value = '';
98 echo '<td>'. $priority_value .'</td>';
99 (isset($defect->resolution->name)) ? $resolution_value = $defect->resolution->name : $resolution_value = '';
100 echo '<td>'. $resolution_value .'</td>';
101 (isset($defect->status->name)) ? $status_value = $defect->status->name : $status_value = '';
102 echo '<td>'. $status_value .'</td>';
103 (isset($defect->fixed_in_version)) ? $fixed_value = $defect->fixed_in_version : $fixed_value = '';
104 echo '<td>'. $fixed_value .'</td>';
108 echo '<table class="innertabs">';
110 echo '<td width="25%">'._('Summary').'</td>';
111 echo '<td width="75%">'.htmlspecialchars($defect->summary,ENT_QUOTES).'</td>';
114 echo '<td width="25%">'._('Description').'</td>';
115 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>';
118 echo '<td width="25%">'. _('Additional Informations').'</td>';
119 (isset($defect->additional_information))? $additional_value = htmlspecialchars($defect->additional_information, ENT_QUOTES) : $additional_value = '';
120 echo '<td width="75%"><textarea disabled name="description" style="width:99%; background-color:white; color:black; border: none;" rows="6">'. $additional_value .'</textarea></td>';
125 <script type="text/javascript">
126 jQuery(document).ready(function() {
127 jQuery("#expandable_edition").hide();
133 <p class="notice_title" onclick='jQuery("#expandable_edition").slideToggle(300)'><?php echo _('Edit ticket') ?></p>
134 <div id='expandable_edition' class="notice_content">
136 if (!isset($errorPage)) {
137 include($gfplugins.$mantisbt->name.'/view/editIssue.php');
144 if (!isset($errorPage)) {
145 include($gfplugins.$mantisbt->name.'/view/viewNote.php');
146 include($gfplugins.$mantisbt->name.'/view/viewAttachment.php');