We have Case Types that only use sequences. For these cases, once we mark the last activity in the sequence to Completed, the Case automatically gets set to Resolved (even if Resolved is not an enabled status for the case, which is a separate issue).

Is there a way to disable this automated change of status when the sequence is complete? Any way we can modify that behavior per Case Type? If not through a GUI, any hook I should look into?

1 Answer 1


It would be a dopey workaround but you could have a task at the end of the sequence that's a dummy task, and just don't complete it. Or create a new activity status that means completed to you but isn't the same as the core completed.

If you're up for writing a small extension you can implement https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_container/ and what you can do is undo this: https://github.com/civicrm/civicrm-core/blob/f27b812e4dd51307422bd812918aa4afce1515fa/Civi/Core/Container.php#L406

$dispatcher->addListener('hook_civicrm_caseChange', ['\Civi\CCase\SequenceListener', 'onCaseChange_static']);

So in your hook do something like

\Civi::dispatcher()->removeListener('hook_civicrm_caseChange', ['\Civi\CCase\SequenceListener', 'onCaseChange_static']);

Note that also undoes the other things the sequencelistener does, so you could instead theoretically do something like implement https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_caseChange/ where you change the case status back to Ongoing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.