-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
CRM-20947, fixed notice error on Activity tab #10788
Conversation
---------------------------------------- * CRM-20947: Remove Deprecation Notice for Option group https://issues.civicrm.org/jira/browse/CRM-20947
CRM/Activity/BAO/Activity.php
Outdated
@@ -2373,7 +2373,10 @@ public static function createFollowupActivity($activityId, $params) { | |||
$followupParams = array(); | |||
$followupParams['parent_id'] = $activityId; | |||
$followupParams['source_contact_id'] = CRM_Core_Session::getLoggedInContactID(); | |||
$followupParams['status_id'] = CRM_Core_OptionGroup::getValue('activity_status', 'Scheduled', 'name'); | |||
$followupParams['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', | |||
'activity_status', |
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.
shouldn't this be status_id
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.
Oops sorry.. Not sure how i missed that. Pushed the change.
first one looks wrong, others look right |
---------------------------------------- * CRM-20947: Remove Deprecation Notice for Option group https://issues.civicrm.org/jira/browse/CRM-20947 fixed fieldname
I thought that last one was wrong & it should be just status_id - however grepping says CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_status_id', 'Completed'), These are simple changes but easy to make errors in - hopefully there won't be anything we both miss though! |
yes both works (status_id / activity_status_id). I feel the code takes as field name or fields unique name defined in |
Ah cool! |
Overview
This PR fixes notice error when trying to save activity and viewing list of activity in Activity tab.
Before
After
No error.
Technical Details
This PR fixes the notice error of using deprecated function. I have replaced it with CRM_Core_PseudoConstant::getKey() method to retrieve value of option values.