From fa929cbd64d662126b8734e476bdbbf3562333d4 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 13 Jun 2017 21:56:58 -0400 Subject: Add issue function getAssignee() --- app/class/issue.class.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app') diff --git a/app/class/issue.class.php b/app/class/issue.class.php index 6056457..c3381a7 100644 --- a/app/class/issue.class.php +++ b/app/class/issue.class.php @@ -62,6 +62,17 @@ class issue extends object return $issue; } + /* + * 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. */ -- cgit v1.2.3