Skip to content

Commit

Permalink
Merge pull request #857 from compucorp/WHF-329-sql-syntax
Browse files Browse the repository at this point in the history
WHF-329: Remove the use of sql keyword 'grouping' causing syntax error
  • Loading branch information
olayiwola-compucorp authored Jul 8, 2022
2 parents f815d98 + 151853f commit d4bffe6
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 150 deletions.
2 changes: 1 addition & 1 deletion CRM/Civicase/Helper/CaseCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public static function getInstanceObject($caseCategoryValue) {
return new CaseManagementUtils();
}

$instanceClasses = CRM_Core_OptionGroup::values('case_category_instance_type', FALSE, FALSE, TRUE, NULL, 'grouping');
$instanceClasses = CRM_Core_OptionGroup::values('case_category_instance_type', TRUE, TRUE, TRUE, NULL);
$instanceClass = $instanceClasses[$instanceValue];

return new $instanceClass($caseCategoryInstance->id);
Expand Down
12 changes: 6 additions & 6 deletions CRM/Civicase/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public function install() {
'return' => 'id',
'option_group_id' => 'activity_type',
'name' => ['IN' => $activityTypes],
'api.OptionValue.setvalue' => [
'field' => 'grouping',
'value' => $grouping,
'api.OptionValue.create' => [
'option_group_id' => 'activity_type',
'grouping' => $grouping,
],
]);
}
Expand Down Expand Up @@ -105,9 +105,9 @@ public function install() {
'option_group_id' => 'activity_status',
'name' => $status,
'return' => 'id',
'api.OptionValue.setvalue' => [
'field' => 'grouping',
'value' => $grouping,
'api.OptionValue.create' => [
'option_group_id' => 'activity_status',
'grouping' => $grouping,
],
]);
}
Expand Down
Loading

0 comments on commit d4bffe6

Please sign in to comment.