CRM-13179 fix country autofill
authoreileen <eileen@fuzion.co.nz>
Thu, 22 Aug 2013 23:50:42 +0000 (11:50 +1200)
committereileen <eileen@fuzion.co.nz>
Thu, 22 Aug 2013 23:50:42 +0000 (11:50 +1200)
api/v3/Profile.php
api/v3/examples/ProfileGet.php
tests/phpunit/api/v3/ProfileTest.php

index 7c41d54d96d70f2c5776aa475ccde60764450d0b..a7196eeb1047a5e8cbca203e18da0e7bf935bc44 100644 (file)
@@ -386,7 +386,7 @@ function _civicrm_api3_profile_getbillingpseudoprofile(&$params) {
     'api.address.get.2' => array('is_billing' => True, 'return' => $addressFields),
     'api.email.get.1' => array('location_type_id' => 'Billing',),
     'api.email.get.2' => array('is_billing' => True,),
-    'return' => 'api.email.get, api.address.get, api.address.getoptions, state_province, email, first_name, last_name, middle_name, ' . implode($addressFields, ','),
+    'return' => 'api.email.get, api.address.get, api.address.getoptions, country, state_province, email, first_name, last_name, middle_name, ' . implode($addressFields, ','),
    )
   );
 
index ad458c86c7f1737bb013ecaa9aed6e79094b0672..a3906660003e8e63baefeb13e2d71898a5b9b258 100644 (file)
@@ -62,7 +62,7 @@ function profile_get_expectedresult(){
           'billing_street_address-5' => '5 Saint Helier St',
           'billing_city-5' => 'Gotham City',
           'billing_state_province_id-5' => '1021',
-          'billing_country_id-5' => '',
+          'billing_country_id-5' => '1228',
           'billing_postal_code-5' => '90210',
           'billing-email-5' => 'abc1.xyz1@yahoo.com',
           'email-5' => 'abc1.xyz1@yahoo.com',
index 01d9fb179f47857b026350a1b3a56eb97fe423bc..b2e699e0154e318ecd1c58bd33504833ef860536 100644 (file)
@@ -131,7 +131,7 @@ class api_v3_ProfileTest extends CiviUnitTestCase {
       'billing_street_address-5' => '5 Saint Helier St',
       'billing_city-5' => 'Gotham City',
       'billing_state_province_id-5' => '1021',
-      'billing_country_id-5' => '',
+      'billing_country_id-5' => '1228',
       'billing-email-5' => 'abc1.xyz1@yahoo.com',
       'billing_postal_code-5' => '90210',
       'billing-email-5' => 'abc1.xyz1@yahoo.com',