You are here

function casetracker_views_case_number_full in Case Tracker 5

Views field handler; display the project-case number of the Case Tracker case.

1 string reference to 'casetracker_views_case_number_full'
casetracker_views_tables in ./casetracker_views.module
Implementation of hook_views_table().

File

./casetracker_views.module, line 245
Enables Views integration for Case Tracker.

Code

function casetracker_views_case_number_full($fieldinfo, $fielddata, $value, $data) {
  if (!empty($data->casetracker_project_project_number)) {
    return $data->casetracker_project_project_number . '-' . $data->casetracker_case_case_number;
  }
  $project = db_fetch_object(db_query(db_rewrite_sql("SELECT cp.project_number FROM {casetracker_project} cp WHERE cp.nid = %d"), $data->casetracker_case_pid));
  if ($project->project_number) {
    return $project->project_number . '-' . $data->casetracker_case_case_number;
  }
}