Skip to content

Commit

Permalink
Update 0.3.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Ray Clark authored and Ray Clark committed Mar 27, 2015
1 parent b0b036d commit 8b57c40
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,6 @@ v0.3.14
-------

v0.3.15
-------
-------
Added notifications for accepting, assigning and reassigning issues.
Fixed a bug which didn't allow people with Full Access to accept issues.
2 changes: 2 additions & 0 deletions issues_acceptProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
break ;
}

setNotification($connection2, $guid, getOwnerOfIssue($connection2, $issueID), "A technician has started working on your isuse.", "Help Desk", "/index.php?q=/modules/Help Desk/issues_discussView.php&issueID=" . $issueID);

//Success 1 aka Accepted
$URL=$URL . "issues_discussView.php&issueID=" . $issueID . "&addReturn=success1" ;
header("Location: {$URL}");
Expand Down
10 changes: 10 additions & 0 deletions issues_assignProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
header("Location: {$URL}");
exit();
}

$isReassign = false;
if(hasTechnicianAssigned($issueID, $connection2)) {
$isReassign = true;
}

try {
$data=array("issueID"=> $issueID, "technicianID"=> $technicianID, "status"=> "Pending");
Expand All @@ -88,6 +93,11 @@
header("Location: {$URL}");
exit();
}

$assign = "assigned";
if($isReassign) { $assign = "reassigned"; }
setNotification($connection2, $guid, getOwnerOfIssue($connection2, $issueID), "Your issue has been " . $assign . " to a technician.", "Help Desk", "/index.php?q=/modules/Help Desk/issues_discussView.php&issueID=" . $issueID);
setNotification($connection2, $guid, getTechWorkingOnIssue($connection2, $issueID), "An issue has been " . $assign . " to you.", "Help Desk", "/index.php?q=/modules/Help Desk/issues_discussView.php&issueID=" . $issueID);

$URL = $URL."&addReturn=success0" ;
header("Location: {$URL}");
Expand Down
4 changes: 2 additions & 2 deletions issues_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@
print "<td style='width:16%'>";
$openCreated = false;
$resolveCreated = false;
if(isTechnician($_SESSION[$guid]["gibbonPersonID"], $connection2) && !relatedToIssue($connection2, intval($row['issueID']), $_SESSION[$guid]["gibbonPersonID"]))
if(isTechnician($_SESSION[$guid]["gibbonPersonID"], $connection2) && (!relatedToIssue($connection2, intval($row['issueID']), $_SESSION[$guid]["gibbonPersonID"]) || getPermissionValue($connection2, $_SESSION[$guid]["gibbonPersonID"], "fullAccess")))
{
if($row['technicianID']==null && !($row['status']=="Resolved"))
if($row['technicianID']==null && $row['status']!="Resolved")
{
?><input type="hidden" name="address" value="<?php print $_SESSION[$guid]["address"] ?>"><?php
if(getPermissionValue($connection2, $_SESSION[$guid]["gibbonPersonID"], "acceptIssue")) { print "<a href='" . $_SESSION[$guid]["absoluteURL"] . "/modules/" . $_SESSION[$guid]["module"] . "/issues_acceptProcess.php?issueID=". $row["issueID"] . "'><img style='margin-left: 5px' title=" . _('Accept ') . "' src='" . $_SESSION[$guid]["absoluteURL"] . "/themes/" . $_SESSION[$guid]["gibbonThemeName"] . "/img/page_new.png'/></a>"; }
Expand Down
6 changes: 3 additions & 3 deletions moduleFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ function hasTechnicianAssigned($issueID, $connection2)
catch(PDOException $e) {
print $e;
}
$array = $result->fetchAll();
$id = $array[0]["technicianID"];
$array = $result->fetch();
$id = $array["technicianID"];
return ($id != null);
}

Expand Down Expand Up @@ -128,7 +128,7 @@ function relatedToIssue($connection2, $issueID, $gibbonPersonID) {
if($row['technicianID']!=null) {
try {
$data=array("issueID"=> $issueID);
$sql="SELECT helpDeskIssue.*, helpDeskTechnicians.technicianID, helpDeskTechnicians.gibbonPersonID AS personID FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=helpDeskTechnicians.technicianID) WHERE issueID=:issueID";
$sql="SELECT helpDeskIssue.gibbonPersonID, helpDeskTechnicians.technicianID, helpDeskTechnicians.gibbonPersonID AS personID FROM helpDeskIssue JOIN helpDeskTechnicians ON (helpDeskIssue.technicianID=helpDeskTechnicians.technicianID) WHERE issueID=:issueID";
$result=$connection2->prepare($sql);
$result->execute($data);
}
Expand Down

0 comments on commit 8b57c40

Please sign in to comment.