diff options
Diffstat (limited to 'app/class/issue.class.php')
-rw-r--r-- | app/class/issue.class.php | 24 |
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. */ |