summaryrefslogtreecommitdiffstats
path: root/app/class/issue.class.php
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-06-20 00:17:17 -0400
committerMalf Furious <m@lfurio.us>2017-06-20 00:17:17 -0400
commita4d96f0c1e9dd89df3dd189664f400680eb4e8fa (patch)
treeba0e0b0c02a7c3384306a38106ac6eebdb80b4f4 /app/class/issue.class.php
parent2376aabe74528b018189982224d61a643325b114 (diff)
parent2564b9953bb7bd8e90a9865962cb9e88d4cfd218 (diff)
downloadscrott-a4d96f0c1e9dd89df3dd189664f400680eb4e8fa.tar.gz
scrott-a4d96f0c1e9dd89df3dd189664f400680eb4e8fa.zip
Merge branch 'feature/email' into dev
Diffstat (limited to '')
-rw-r--r--app/class/issue.class.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/class/issue.class.php b/app/class/issue.class.php
index 6056457..b61a6e3 100644
--- a/app/class/issue.class.php
+++ b/app/class/issue.class.php
@@ -63,6 +63,17 @@ class issue extends object
}
/*
+ * Get the assignee for this issue
+ */
+ public function getAssignee() : ?user
+ {
+ if (!isset($this->assignee) || $this->assignee == "")
+ return NULL;
+
+ return new user($this->assignee);
+ }
+
+ /*
* Reset the seen flag and reassign this issue.
*/
public function assignTo(user $assignee) : void
@@ -73,6 +84,19 @@ class issue extends object
}
/*
+ * Get the pad this issue exists under
+ */
+ public function getPad() : pad
+ {
+ $parent = $this->getParent();
+
+ if ($parent->objtype == "pad")
+ return $parent;
+
+ return $parent->getParent();
+ }
+
+ /*
* Advance this issue in the pipeline, closing it if already in the
* last stage.
*/