From d840a3d9b464ac424d210aeffc01cea0a774377b Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 13 Jun 2017 22:03:24 -0400 Subject: Add issue function getPad() --- app/class/issue.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app') diff --git a/app/class/issue.class.php b/app/class/issue.class.php index c3381a7..b61a6e3 100644 --- a/app/class/issue.class.php +++ b/app/class/issue.class.php @@ -83,6 +83,19 @@ class issue extends object $this->saveObj(); } + /* + * 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. -- cgit v1.2.3