Skip to content
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-21644, Fixed set default for Preferred Communication Method #11499

Merged
merged 1 commit into from
Jan 10, 2018

Conversation

pradpnayak
Copy link
Contributor

@pradpnayak pradpnayak commented Jan 9, 2018


Before

screen shot 2018-01-10 at 2 54 34 am

After

screen shot 2018-01-10 at 2 55 14 am

----------------------------------------
* CRM-21644: Preferred Communication Method is not set to default for contact
  https://issues.civicrm.org/jira/browse/CRM-21644
@@ -2339,7 +2339,10 @@ public static function setProfileDefaults(
$defaults[$name . '_custom'] = $details[$name . '_custom'];
}
elseif ($name == 'preferred_communication_method') {
$v = explode(CRM_Core_DAO::VALUE_SEPARATOR, $details[$name]);
$v = $details[$name];
if (!is_array($details[$name])) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be slightly cleaner to use $v in the IF - but not a blocker in any way

@eileenmcnaughton
Copy link
Contributor

I tested this & it works. It is a trivial form layer fix & as such I think it can get away without a unit test. Code looks fine. Merge on pass

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@eileenmcnaughton eileenmcnaughton merged commit 0c07087 into civicrm:master Jan 10, 2018
@pradpnayak
Copy link
Contributor Author

Thanks @eileenmcnaughton

sluc23 pushed a commit to ixiam/civicrm-core that referenced this pull request Jan 10, 2018
CRM-21644, Fixed set default for Preferred Communication Method
@mlutfy mlutfy added this to the 4.7.31 milestone Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants