You are here

function pmtimetracking_pmtask_change in Drupal PM (Project Management) 7

Implements hook_pmtask_change().

File

pmtimetracking/pmtimetracking.module, line 198
Main module functions for PM Timetracking.

Code

function pmtimetracking_pmtask_change($task_nid, $task_title, $task_stepno) {
  $num_updated = db_update('pmtimetracking')
    ->fields(array(
    'task_title' => $task_title,
    'task_stepno' => $task_stepno,
  ))
    ->condition('task_nid', $project_nid, '=')
    ->condition(db_or()
    ->condition('task_title', $task_title, '<>')
    ->condition('task_stepno', $task_stepno, '<>'))
    ->execute();
  if ($num_update) {
    watchdog('PM Timetracking:', "{$num_updated} number of entries updated silently.");
  }
}