CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • 2.2 profile signup does not truly make e-mail data primary
Pages: [1]

Author Topic: 2.2 profile signup does not truly make e-mail data primary  (Read 2544 times)

greenmachine

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 6
2.2 profile signup does not truly make e-mail data primary
April 26, 2009, 07:13:34 pm
I had this bug in 2.0, and thought an upgrade to 2.2 would fix it, but I guess not. I've confirmed this behavior in the demo.

Problem: User-submitted contact data contains an e-mail address that is marked as part of a primary location (as shown when editing the contact), but that e-mail address doesn't show up in the search results summary or in export when exporting "primary fields."

Steps to reproduce:
  • Create a profile with the fields: Individual-First Name, Individual-Last Name, Contact-E-mail-Other, Contact-Postal Code-Other (I have tried this with Contact-E-mail-Primary and Contact-Postal Code-Primary as well). In the demo currently the profile ID is 5 and labeled "Newsletter signup"
  • Visit the profile signup page as an anonymous visitor (http://drupal.demo.civicrm.org/civicrm/profile/create?reset=1&gid=5)
  • Enter contact information and save the profile signup page
  • Search for the resulting contact in CiviCRM. Note that the e-mail address entered does not show up in the contact search results e-mail column.
  • Select the contact in the results table and attempt to export contacts, using the "Export PRIMARY fields" option. Note that the e-mail address does not show up in the export file
  • Edit the contact. Note that the location is marked "primary" in the edit form. Save the contact without changing anything - see how the e-mail address shows up in the search results after saving.

At least I think this is a bug - I don't see how it is advantageous behavior. Will result in data not being accessed by API functions, export, and (I presume) CiviMail.

I have not tested this with other location fields, but I assume other fields would have the same issue.

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: 2.2 profile signup does not truly make e-mail data primary
April 26, 2009, 11:47:58 pm
hi,

case 1 : Contact-E-mail-Other
IMO make sure 'Other' location type should be set default = true
check here : http://drupal.demo.civicrm.org/civicrm/admin/locationType?reset=1
then profile Other email field will be same as search selector email and export primary fields.

case 2 : Contact-E-mail-Primary
Make sure twice, as in my case http://drupal.demo.civicrm.org/civicrm/profile/create?reset=1&gid=6
email get display in search contact selector as well as get exported as primary field. 

Quote
Edit the contact. Note that the location is marked "primary" in the edit form. Save the contact without changing anything - see how the e-mail address shows up in the search results after saving.
I guess in this case though profile created contact w/ 'Other' location type which is primary = false, but here we see it is primary set = true.
As this contact having only single location so might be considered as primary.

kiran
You Are Designed To Choose... Defined By Choice.

greenmachine

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 6
Re: 2.2 profile signup does not truly make e-mail data primary
April 27, 2009, 12:11:22 am
Ah, you're right, it does make a difference to set the location as "default" on the location types admin page. Thanks.

In my head, I was expecting that, if a contact is created that has only one location, that location should be marked as "primary" by default upon creation. Maybe there are reasons for a contact to be created with location data that cannot be pulled through the Primary shortcut, but I am ignorant of them.

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: 2.2 profile signup does not truly make e-mail data primary
April 27, 2009, 12:20:25 am
hi,

Quote
if a contact is created that has only one location, that location should be marked as "primary" by default upon creation.
It's true when you create/edit contact with main contact edit form.
ie
1. http://drupal.demo.civicrm.org/civicrm/contact/add?ct=Individual&reset=1
2. http://drupal.demo.civicrm.org/civicrm/contact/add?reset=1&action=update&cid=...

Quote
Maybe there are reasons for a contact to be created with location data that cannot be pulled through the Primary shortcut
primary shortcuts pull data from db where is_primary is set to true, and In this profile case created email ( 'Other' location type ) having is_primary = false in db when profile form get submitted, hence we are not able to get email field in search selector and export primary field.

but when you edit same contact by main contact edit form as our rule if single location make it as primary hence after submitting this form same email with same location become is_primary = true in db, now onward we get this email in contact search selector as well as in export contact fields
 
hope this help
kiran
« Last Edit: April 27, 2009, 12:31:24 am by kiran »
You Are Designed To Choose... Defined By Choice.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • 2.2 profile signup does not truly make e-mail data primary

This forum was archived on 2017-11-26.