You are here

function _casetracker_actions_act in Case Tracker 6

Same name and namespace in other branches
  1. 7 casetracker_actions/casetracker_actions.module \_casetracker_actions_act()

generalized casetracker update function All casetracker actions have the same fundamental behavior.

6 calls to _casetracker_actions_act()
casetracker_actions_set_assign_to_action in casetracker_actions/casetracker_actions.module
Set Assign to action behavior.
casetracker_actions_set_priority_action in casetracker_actions/casetracker_actions.module
Set Priority action behavior.
casetracker_actions_set_project_action in casetracker_actions/casetracker_actions.module
Set Project action behavior.
casetracker_actions_set_status_action in casetracker_actions/casetracker_actions.module
Set Status action behavior.
casetracker_actions_set_type_action in casetracker_actions/casetracker_actions.module
Set Type action behavior.

... See full list

File

casetracker_actions/casetracker_actions.module, line 247
casetracker_actions.module

Code

function _casetracker_actions_act($nid, $field, $value) {
  if (!$nid) {
    return;
  }

  // make sure we have a valid case node
  $node = node_load(array(
    'nid' => $nid,
    'type' => 'casetracker_basic_case',
  ));
  $success = _casetracker_actions_update_by_comment($field, $value, $node);
  if ($success) {
    _casetracker_actions_log($field, $value, $nid);
  }
}