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:
hyung-hwan 2014-09-16 03:07:21 +00:00
parent 0b9d44ea4a
commit e37a418985

View File

@ -381,7 +381,17 @@ class Issue extends Controller
$issue->type = $this->issuehelper->TYPE_DEFECT;
$issue->status = $this->issuehelper->STATUS_NEW;
$issue->priority = $this->issuehelper->PRIORITY_OTHER;
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;
$this->load->view ($this->VIEW_EDIT, $data);