Skip to content

Commit

Permalink
add case type to drop down
Browse files Browse the repository at this point in the history
  • Loading branch information
jaapjansma committed Jun 27, 2016
1 parent baaecfd commit 78c47d3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions CRM/Caselink/Page/CaseLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ public function run() {
$case_status = array();
$params =array('name' => 'case_status');
CRM_Core_BAO_OptionGroup::retrieve($params, $case_status);
$case_type = array();
$params =array('name' => 'case_type');
CRM_Core_BAO_OptionGroup::retrieve($params, $case_type);
$sql = "SELECT civicrm_case.*, civicrm_case_contact.contact_id as client_id, civicrm_contact.display_name, ov.label as case_status_label, ov2.label as case_type_label "
$sql = "SELECT civicrm_case.*, civicrm_case_contact.contact_id as client_id, civicrm_contact.display_name, ov.label as case_status_label"
. "FROM `".$config->getCustomGroup('table_name')."` AS `case_link`
INNER JOIN `civicrm_case` ON `case_link`.`".$config->getCaseIdField('column_name')."` = `civicrm_case`.`id`"
. "INNER JOIN `civicrm_case_contact` ON `civicrm_case`.`id` = `civicrm_case_contact`.`case_id`"
. "INNER JOIN `civicrm_contact` ON `civicrm_case_contact`.`contact_id` = `civicrm_contact`.`id`"
. "LEFT JOIN civicrm_option_value ov ON ( civicrm_case.status_id=ov.value AND ov.option_group_id='".$case_status['id']."')"
. "LEFT JOIN civicrm_option_value ov2 ON ( civicrm_case.case_type_id=ov2.value AND ov2.option_group_id='".$case_type['id']."')"
. "WHERE `case_link`.`entity_id` = '".$this->caseId."' LIMIT 1";
$dao = CRM_Core_DAO::executeQuery($sql);
$case = false;
Expand Down

0 comments on commit 78c47d3

Please sign in to comment.