summaryrefslogtreecommitdiffstats
path: root/app/model
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-10-20 01:15:28 -0400
committerMalfurious <m@lfurio.us>2021-10-20 01:15:28 -0400
commite88b153336610e18732fbcc1d8ff3ac4e653d080 (patch)
tree1cddf528725f8698a73f39b282a96f954f7649c8 /app/model
parent89e2b5a5eb46e3fe2c413ac856c2b46713ce5562 (diff)
downloadscrott-e88b153336610e18732fbcc1d8ff3ac4e653d080.tar.gz
scrott-e88b153336610e18732fbcc1d8ff3ac4e653d080.zip
Add UI for explicit issue signoff
Active issue assignees will now have a button on issues to explicitly 'signoff' their assignment - that is, to affirmatively declare it done. The use of this new action will allow assignees to signoff without needing to close the issue as well. This is useful for multiple assigned users collaborating on an issue. Note that if an assignee chooses to close a ticket directly, they are still automatically signed-off, as before. To aid this feature, the low-level definition of an 'assigned user' is updated to exclude users occupying an assignment slot, but which have already signed-off. Since the icon representing this action is the same as for closing a ticket, the buttons enabling these two actions are now color-coded wherever they appear. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'app/model')
-rw-r--r--app/model/issue.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/model/issue.php b/app/model/issue.php
index 41392e8..c3423f7 100644
--- a/app/model/issue.php
+++ b/app/model/issue.php
@@ -106,6 +106,18 @@ if (isAction("iss-mesg-add"))
$log = mesg::initNewLog("%s closed issue", $user, $issue);
}
+ else if (isset(input()['signoff']))
+ {
+ if (!$user->isAssignedTo($issue))
+ {
+ logError(ERROR, "You are not an active assignee of this issue");
+ return;
+ }
+
+ $issue->signoffAssignee($user);
+ $log = mesg::initNewLog("%s signed off", $user, $issue);
+ }
+
/* automatically redisplay issue modal */
if ($form->nopop != "1")
setAutoModal("#issueModal-" . $issue->guid);