/** * @return \yii\db\ActiveQuery */ public function getClosedTasks() { return $this->hasMany(Issue::className(), ['project_id' => 'id'])->where('tracker_id=:task AND status_id=:closed', [':task' => TrackerEnum::TASK, ':closed' => StatusEnum::CLOSED])->count(); }
/** * @return \yii\db\ActiveQuery */ public function getIssues() { return $this->hasMany(Issue::className(), ['project_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getIssue() { return $this->hasOne(Issue::className(), ['id' => 'issue_id']); }
public function getOpenedIssues() { return $this->hasMany(Issue::className(), ['milestone_id' => 'id'])->andWhere('status_id<:closed', [':closed' => StatusEnum::CLOSED]); }