summaryrefslogtreecommitdiffstats
path: root/app/model/issue.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/model/issue.php')
-rw-r--r--app/model/issue.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/app/model/issue.php b/app/model/issue.php
index c3423f7..76ae9a9 100644
--- a/app/model/issue.php
+++ b/app/model/issue.php
@@ -85,12 +85,17 @@ if (isAction("iss-mesg-add"))
}
$assignee = new user($form->assignee);
- $stat = $issue->addAssignee($assignee, $user);
- if (!$stat)
- logError(ERROR, "Failed to assign issue");
- else
- $log = mesg::initNewLog("%s assigned " . $assignee->getDisplayName(), $user, $issue);
+ if (!$assignee->isAssignedTo($issue))
+ {
+ $stat = $issue->addAssignee($assignee, $user);
+ $mesg = ($assignee->guid == $user->guid ? "%s claimed" : "%s assigned " . $assignee->getDisplayName());
+
+ if (!$stat)
+ logError(ERROR, "Failed to assign issue");
+ else
+ $log = mesg::initNewLog($mesg, $user, $issue);
+ }
}
else if (isset(input()['closeIssue']))