changed the issue creation page to set the owner to the current signed-in user if he/she is a member. if not, the issue goes to the first user
This commit is contained in:
parent
0b9d44ea4a
commit
e37a418985
@ -335,7 +335,7 @@ class Issue extends Controller
|
|||||||
{
|
{
|
||||||
$data['message'] = 'DATABASE ERROR';
|
$data['message'] = 'DATABASE ERROR';
|
||||||
$data['issue'] = $issue;
|
$data['issue'] = $issue;
|
||||||
$this->load->view ($this->VIEW_EDIT, $data);
|
$this->load->view ($this->VIEW_EDIT, $data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -347,7 +347,7 @@ class Issue extends Controller
|
|||||||
{
|
{
|
||||||
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
|
||||||
$data['issue'] = $issue;
|
$data['issue'] = $issue;
|
||||||
$this->load->view ($this->VIEW_EDIT, $data);
|
$this->load->view ($this->VIEW_EDIT, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -369,7 +369,7 @@ class Issue extends Controller
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$data['issue'] = $issue;
|
$data['issue'] = $issue;
|
||||||
$this->load->view ($this->VIEW_EDIT, $data);
|
$this->load->view ($this->VIEW_EDIT, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -381,10 +381,20 @@ class Issue extends Controller
|
|||||||
$issue->type = $this->issuehelper->TYPE_DEFECT;
|
$issue->type = $this->issuehelper->TYPE_DEFECT;
|
||||||
$issue->status = $this->issuehelper->STATUS_NEW;
|
$issue->status = $this->issuehelper->STATUS_NEW;
|
||||||
$issue->priority = $this->issuehelper->PRIORITY_OTHER;
|
$issue->priority = $this->issuehelper->PRIORITY_OTHER;
|
||||||
$issue->owner = (count($project->members) > 0)? $project->members[0]: '';
|
if ($this->projects->projectHasMember($project->id, $login['id']))
|
||||||
|
{
|
||||||
|
// let the current user be the issue owner if he/she is a
|
||||||
|
// project memeber.
|
||||||
|
$issue->owner = $login['id'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if not, assign the issue to the first member.
|
||||||
|
$issue->owner = (count($project->members) > 0)? $project->members[0]: '';
|
||||||
|
}
|
||||||
|
|
||||||
$data['issue'] = $issue;
|
$data['issue'] = $issue;
|
||||||
$this->load->view ($this->VIEW_EDIT, $data);
|
$this->load->view ($this->VIEW_EDIT, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user