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
@ -381,7 +381,17 @@ 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;
|
||||||
|
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]: '';
|
$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