-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#1295 Add is_active field to civicrm_status_preference #15409
Conversation
(Standard links)
|
@eileenmcnaughton Jenkins is displeased https://test.civicrm.org/job/CiviCRM-Core-PR/29164/checkstyleResult/new/ |
@@ -25,14 +25,44 @@ | |||
+--------------------------------------------------------------------+ | |||
*/ | |||
|
|||
|
|||
use Civi\Api4\StatusPreference; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton why is this needed?
CRM/Utils/Check/Component.php
Outdated
if (empty($this->checksConfig)) { | ||
$this->checksConfig = Civi::cache('checks')->get('checksConfig', []); | ||
if (empty($this->checksConfig)) { | ||
$this->checksConfig = StatusPreference::get()->execute()->indexBy('name'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton wouldn't you route through civicrm_api4 or similar or something?
6d240e2
to
ac03bac
Compare
CRM/Utils/Check/Component.php
Outdated
*/ | ||
public function checkAll() { | ||
$messages = []; | ||
foreach (get_class_methods($this) as $method) { | ||
if ($method !== 'checkAll' && strpos($method, 'check') === 0) { | ||
$r = $this->isDisabled($method); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton what is this used for at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 thanks - fixed
Note this is done BEFORE doing checks in case it is for performance reasons
ac03bac
to
b4628ea
Compare
I've added merge ready as i think this is right but we may want to have a discussion about whether we want to be standardising on the OOP style API4 coding or use the traditional |
Overview
Add is_active field to civicrm_status_pref per discussions in NYC this is to be api-accessible but not UI exposed.
Importantly the is_active field is checked BEFORE attempting the check rather than after
Before
No way to stop a check from running at all
After
is_active field can be set to zero to disable
Technical Details
For devs to disable a status check they would need to add or edit a row in civicrm_status_check for that check - e.g
Comments