summaryrefslogtreecommitdiffstats
path: root/app/class/pad.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/pad.class.php')
-rw-r--r--app/class/pad.class.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/class/pad.class.php b/app/class/pad.class.php
index dcf2b32..0c69385 100644
--- a/app/class/pad.class.php
+++ b/app/class/pad.class.php
@@ -108,6 +108,24 @@ class pad extends obj
$stage->saveObj();
$this->saveObj();
}
+
+ /*
+ * Get an array of all closed issues under this pad. Ordered by
+ * datetime closed.
+ */
+ public function getClosedIssues_ordByClosed() : array
+ {
+ $query = "SELECT o.guid FROM objects o JOIN issues i ON o.guid = i.guid " .
+ "WHERE o.parent = '" . database::esc($this->guid) . "' ORDER BY i.closed DESC";
+ $res = database::query($query);
+
+ $issues = array();
+
+ foreach ($res as $i)
+ $issues[] = new issue($i['guid']);
+
+ return $issues;
+ }
}
?>