diff options
Diffstat (limited to '')
-rw-r--r-- | app/model/issue.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/app/model/issue.php b/app/model/issue.php index 403e82e..910cb14 100644 --- a/app/model/issue.php +++ b/app/model/issue.php @@ -50,7 +50,28 @@ if (isAction("iss-mesg-add")) logError(NOTICE, "Saved attachment " . $mesg->attachment); } - if (isset(input()['closeIssue'])) + if (isset(input()['advIssue'])) + { + if (!$user->canModify($issue)) + { + logError(ERROR, "You do not have permission to move this issue"); + return; + } + + $issue->advance($user); + + if ($issue->isOpen()) + { + $sgename = $issue->getParent()->name; + $log = mesg::initNewLog("%s advanced issue to '" . $sgename . "'", $user, $issue); + } + else + { + $log = mesg::initNewLog("%s closed issue", $user, $issue); + } + } + + else if (isset(input()['closeIssue'])) { if (!$user->canModify($issue)) { |