You are here

function casetracker_rules_event_info in Case Tracker 7

Implementation of hook_rules_event_info

File

./casetracker.module, line 1421
Enables the handling of projects and their cases.

Code

function casetracker_rules_event_info() {

  // Casetracker case assigned.
  $info['casetracker_assign_case'] = array(
    'label' => 'Case assigned',
    'group' => 'Case Tracker',
    'help' => 'Event is triggered any time the assigned user changes',
    'variables' => array(
      'case' => array(
        'label' => 'Case',
        'type' => 'node',
        'description' => 'Case being assigned',
        'skip save' => TRUE,
      ),
      'user' => array(
        'label' => 'User',
        'type' => 'user',
        'description' => 'User assigned to the case',
        'skip save' => TRUE,
      ),
    ),
  );

  // Case tracker state change event.
  $info['casetracker_state_change'] = array(
    'label' => 'Case State Change',
    'group' => 'Case Tracker',
    'help' => 'Event is triggered when the status of a case changes.',
    'variables' => array(
      'case' => array(
        'label' => 'Case',
        'type' => 'node',
        'description' => 'Case being assigned',
        'skip save' => TRUE,
      ),
      'casetracker' => array(
        'label' => 'casetracker info',
        'type' => 'struct',
        'property info' => array(
          'status_id' => array(
            'label' => 'Status ID',
            'type' => 'integer',
            'description' => 'Case status id',
          ),
          'status' => array(
            'label' => 'Status Label',
            'type' => 'text',
            'description' => 'Case status id',
          ),
          'priority_id' => array(
            'label' => 'Priority id',
            'type' => 'integer',
            'description' => 'Case status id',
          ),
          'priority' => array(
            'label' => 'Priority Label',
            'type' => 'text',
          ),
          'type_id' => array(
            'label' => 'type id',
            'type' => 'integer',
          ),
          'type' => array(
            'label' => 'type label',
            'type' => 'text',
            'skip save' => TRUE,
          ),
          'pid' => array(
            'label' => 'Project Node id',
            'type' => 'integer',
          ),
          'changes' => array(
            'label' => 'states changed',
            'type' => 'list<text>',
          ),
        ),
        'skip save' => TRUE,
      ),
    ),
  );
  return $info;
}