Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug 933 don't notify that a related incident has been closed wh…

…en the first incident is awaiting closure
  • Loading branch information...
commit b908ec803b838820af23e89ad3c14e02ebb3de6a 1 parent bf0fe73
Ivan Lucas ericthefish authored paulheaney committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 incident_close.php
6 incident_close.php
View
@@ -433,7 +433,7 @@ function editbox(object, boxname)
//notify related inicdents this has been closed
$sql = "SELECT distinct (relatedid) AS relateid FROM `{$dbRelatedIncidents}` AS r, `{$dbIncidents}` AS i WHERE incidentid = '$id' ";
- $sql .= "AND i.id = r.relatedid AND i.status != 2";
+ $sql .= "AND i.id = r.relatedid AND i.status != ".STATUS_CLOSED." AND i.status != ".STATUS_CLOSING;
$result = mysql_query($sql);
if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_WARNING);
@@ -445,7 +445,7 @@ function editbox(object, boxname)
}
$sql = "SELECT distinct (incidentid) AS relateid FROM `{$dbRelatedIncidents}` AS r, `{$dbIncidents}` AS i WHERE relatedid = '$id' ";
- $sql .= "AND i.id = r.incidentid AND i.status != 2";
+ $sql .= "AND i.id = r.incidentid AND i.status != ".STATUS_CLOSED." AND i.status != ".STATUS_CLOSING;
$result = mysql_query($sql);
if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_WARNING);
@@ -468,7 +468,7 @@ function editbox(object, boxname)
$result = mysql_query($sql);
if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_ERROR);
- $sql = "UPDATE `{$dbIncidents}` SET status = 1, lastupdated = '{$now}', timeofnextaction = '0' ";
+ $sql = "UPDATE `{$dbIncidents}` SET status = ".STATUS_ACTIVE.", lastupdated = '{$now}', timeofnextaction = '0' ";
$sql .= "WHERE id = '{$relatedid}' ";
$result = mysql_query($sql);
if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_ERROR);
Please sign in to comment.
Something went wrong with that request. Please try again.