diff options
Diffstat (limited to '')
| -rw-r--r-- | app/class/stage.class.php | 19 | 
1 files changed, 19 insertions, 0 deletions
| diff --git a/app/class/stage.class.php b/app/class/stage.class.php index 1d21dcb..08a3708 100644 --- a/app/class/stage.class.php +++ b/app/class/stage.class.php @@ -96,6 +96,25 @@ class stage extends object      }      /* +     * Get all issues in this stage, sorted by due date, then by +     * issue number. +     */ +    public function getIssues_ordByDueByNumb() : array +    { +        $query = "SELECT o.guid FROM objects o JOIN issues i ON o.guid = i.guid " . +            "WHERE o.objtype = 'issue' AND o.parent = '" . database::esc($this->guid) . +            "' ORDER BY i.due, i.numb"; +        $res = database::query($query); + +        $issues = array(); + +        foreach ($res as $i) +            $issues[] = new issue($i['guid']); + +        return $issues; +    } + +    /*       * Reorder the stages of a pipeline by moving this one forward.       * This swaps the places of the current stage and the one following       * it.  If this stage is the last in its pipeline, nothing is done | 
