You are here

function casetracker_views_project_name in Case Tracker 5

Views field handler; display the name of the Case Tracker project.

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

File

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

Code

function casetracker_views_project_name($fieldinfo, $fielddata, $value, $data) {
  $node = db_fetch_object(db_query(db_rewrite_sql("SELECT n.nid, n.title FROM {node} n WHERE n.nid = %d"), $data->casetracker_case_pid));
  if ($node->nid) {
    return l($node->title, "node/{$node->nid}");
  }

  // returns a linked case tracker project title.
}