Skip to content

Commit

Permalink
make case type required for change case type activity instead of a pr…
Browse files Browse the repository at this point in the history
…eprocess check that doesn't work
  • Loading branch information
demeritcowboy committed Mar 15, 2020
1 parent 301b2fe commit cbad2a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions CRM/Case/Form/Activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,6 @@ public function preProcess() {
);
}
if (!$this->_activityId) {
$caseTypes = CRM_Case_PseudoConstant::caseType();

if (empty($caseTypes) && ($this->_activityTypeName == 'Change Case Type') && !$this->_caseId) {
$url = CRM_Utils_System::url('civicrm/contact/view/case',
"reset=1&action=view&cid={$this->_currentlyViewedContactId}&id={$caseIds}&show=1"
);
$session = CRM_Core_Session::singleton();
$session->pushUserContext($url);
CRM_Core_Error::statusBounce(ts("You do not have any active Case Types"));
}

// check if activity count is within the limit
$xmlProcessor = new CRM_Case_XMLProcessor_Process();
foreach ($this->_caseId as $casePos => $caseId) {
Expand Down
2 changes: 1 addition & 1 deletion CRM/Case/Form/Activity/ChangeCaseType.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function buildQuickForm(&$form) {
$form->_caseType[$form->_caseTypeId] = CRM_Core_DAO::getFieldValue('CRM_Case_DAO_CaseType', $form->_caseTypeId, 'title');
}

$form->addField('case_type_id', ['context' => 'create', 'entity' => 'Case']);
$form->addField('case_type_id', ['context' => 'create', 'entity' => 'Case'], TRUE);

// timeline
$form->addYesNo('is_reset_timeline', ts('Reset Case Timeline?'), NULL, TRUE);
Expand Down

0 comments on commit cbad2a5

Please sign in to comment.