Skip to content

Commit

Permalink
redo reopen conditions for followups; see #247
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagh committed Nov 24, 2015
1 parent 6f82b28 commit a4632c5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions inc/ticketfollowup.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,18 @@ function showForm($ID, $options=array()) {
&& $ticket->haveAGroup(CommonITILActor::REQUESTER, $_SESSION['glpigroups'])));

$reopen_case = false;
if ($this->isNewID($ID)
&& in_array($ticket->fields['status'], Ticket::getReopenableStatusArray())
&& ($requester || $ticket->isAllowedStatus($ticket->fields['status'], Ticket::INCOMING))) {
$reopen_case = true;
if (in_array($ticket->fields["status"], $ticket->getClosedStatusArray())) {
if ($this->isNewID($ID)) {
if (in_array($ticket->fields["status"], $ticket->getClosedStatusArray())
&& $ticket->isAllowedStatus($ticket->fields['status'], Ticket::INCOMING)) {
$reopen_case = true;
echo "<div class='center b'>".__('If you want to reopen the ticket, you must specify a reason')."</div>";
}

// the reqester triggers the reopening on close/solve/waiting status
if ($requester
&& in_array($ticket->fields['status'], Ticket::getReopenableStatusArray())) {
$reopen_case = true;
}
}

if ($tech) {
Expand Down

0 comments on commit a4632c5

Please sign in to comment.