Skip to content
Snippets Groups Projects
Commit 44a7f8f6 authored by Peter Rotich's avatar Peter Rotich
Browse files

Tasks: Task visibility

Allow ticket assignee to see tasks associated with the ticket.
parent 84943083
No related branches found
No related tags found
No related merge requests found
...@@ -130,6 +130,11 @@ if ($filters) ...@@ -130,6 +130,11 @@ if ($filters)
$visibility = Q::any( $visibility = Q::any(
new Q(array('flags__hasbit' => TaskModel::ISOPEN, 'staff_id' => $thisstaff->getId())) new Q(array('flags__hasbit' => TaskModel::ISOPEN, 'staff_id' => $thisstaff->getId()))
); );
// -- Task for tickets assigned to me
$visibility->add(new Q( array(
'ticket__staff_id' => $thisstaff->getId(),
'ticket__status__state' => 'open'))
);
// -- Routed to a department of mine // -- Routed to a department of mine
if (!$thisstaff->showAssignedOnly() && ($depts=$thisstaff->getDepts())) if (!$thisstaff->showAssignedOnly() && ($depts=$thisstaff->getDepts()))
$visibility->add(new Q(array('dept_id__in' => $depts))); $visibility->add(new Q(array('dept_id__in' => $depts)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment