summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMalfurious <m@lfurio.us>2021-10-23 05:26:44 -0400
committerMalfurious <m@lfurio.us>2021-10-23 05:26:44 -0400
commit4b464ddfac4b246bd5fdc0cf9a1c6072385b7aff (patch)
tree5d9538a435764079f28655f4688105aa0b6ca6c7 /app
parent5ca9a06004fa94a1882e117da712bcbb6902291d (diff)
downloadscrott-4b464ddfac4b246bd5fdc0cf9a1c6072385b7aff.tar.gz
scrott-4b464ddfac4b246bd5fdc0cf9a1c6072385b7aff.zip
Fix issue re-assignment
The backend will now properly handle an action to assign someone who has already signed-off on a ticket. In effect, their signoff is removed, and the original assignment metadata (assigner, timestamp) is updated. Signed-off-by: Malfurious <m@lfurio.us>
Diffstat (limited to 'app')
-rw-r--r--app/class/issue.class.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/class/issue.class.php b/app/class/issue.class.php
index 47adfa1..ee4693f 100644
--- a/app/class/issue.class.php
+++ b/app/class/issue.class.php
@@ -115,6 +115,12 @@ class issue extends obj
|| !isset($assigner->guid))
return false;
+ /* 'reset' any existing assignee slot. Remove any signoff or dismissal, and
+ * update the assigner info. AKA, just recreate the DB entry. */
+ $query = "DELETE FROM assignees WHERE guid = '" . database::esc($this->guid) .
+ "' AND assignee = '" . database::esc($assignee->guid) . "'";
+ database::query($query);
+
$query = "INSERT INTO assignees (guid, assignee, assigner, assigned)" .
" VALUES ('" . database::esc($this->guid) . "', '" .
database::esc($assignee->guid) . "', '" . database::esc($assigner->guid) .