}
- if ($this->issue->project_id) {
+ if ($this->currentProject()) {
$d = DB_DataObject::factory('mtrack_project_component');
- $d->project_id = $this->issue->project_id;
+ $d->project_id = $this->currentProject();
$d->orderBy('name');
$d->whereAdd('deleted != 1');
$this->elements['component[]'] = new HTML_Template_Flexy_Element('select');
$ar = $this->issue->components();
$this->elements['component[]']->setValue(array_keys($ar));
- }
- if ($this->issue->project_id) {
+
$d = DB_DataObject::factory('mtrack_milestone');
- $d->project_id = $this->issue->project_id;
+ $d->project_id = $this->currentProject();
$d->orderBy('(case when duedate is null then 1 else 0 end), duedate, name');
$d->whereAdd('completed != 1');
$d->whereAdd('deleted != 1');