Lines Matching defs:task

18                                         FROM task');
39 foreach ($tasks as $task) {
40 if ($task->thread_comment_id == null) {
41 $by_thread_comment['corrections'][$task->id] = $task;
44 if (!isset($by_thread_comment[$task->thread_comment_id])) {
45 $by_thread_comment[$task->thread_comment_id] = array();
47 $by_thread_comment[$task->thread_comment_id][$task->id] = $task;
53 $sql = "SELECT task.id, task.type, task.content_html, task.state, task.cost, task.plan_date, task.close_date,
54 task_closing_comment.content_html AS task_comment_content_html, task.assignee
55 FROM task LEFT JOIN
57 AS task_closing_comment ON task.id = task_closing_comment.task_id
58 WHERE task.thread_id = ?
59 ORDER BY task.plan_date";
70 foreach ($stmt as $task) {
71 $by_type[$task->type][$task->id] = $task;
86 FROM task_participant JOIN task ON task_participant.task_id = task.id
87 WHERE task.create_date BETWEEN ? AND ?
147 public function initial_save(Entity $task, $data) {
150 parent::initial_save($task, $data);
152 $task->set_participant_flags($task->original_poster, array('subscribent', 'original_poster'));
153 $task->set_participant_flags($task->assignee, array('subscribent', 'assignee'));
155 if ($task->thread_id != '') {
156 $task->thread->set_participant_flags($task->assignee, array('subscribent', 'task_assignee'));
157 $task->thread->update_last_activity();
163 if ($this->model->user_nick != $task->assignee) {
164 $task->mail_notify_assignee();
166 if ($task->thread_id != '') {
167 $task->thread->mail_notify_task_added($task);
174 public function update_save(Entity $task, $data) {
177 $prev_assignee = $task->assignee;
178 parent::update_save($task, $data);
180 if($task->assignee != $prev_assignee) {
181 $task->remove_participant_flags($prev_assignee, array('assignee'));
182 $task->set_participant_flags($task->assignee, array('subscribent', 'assignee'));
185 if ($task->thread_id != '' && $task->assignee != $prev_assignee) {
187 'thread_id' => $task->thread_id,
189 $task->thread->remove_participant_flags($prev_assignee, array('task_assignee'));
191 $task->thread->set_participant_flags($task->assignee, array('subscribent', 'task_assignee'));
196 if ($prev_assignee != $task->assignee && $this->model->user_nick != $task->assignee) {
197 $task->mail_notify_assignee();