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 »
  • Using Import (Moderator: Yashodha Chaku) »
  • Weird issue with a custom field yes/no
Pages: [1] 2

Author Topic: Weird issue with a custom field yes/no  (Read 1363 times)

jkirsner

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 1
  • CiviCRM version: 4.1.2
  • CMS version: Drupal
  • MySQL version: unsure
  • PHP version: unsure
Weird issue with a custom field yes/no
April 10, 2014, 08:28:30 am
Hello,

We have a custom field that is a yes/no select that we would like to be able to toggle between yes and no en masse using the import functionality. This has worked fantastically for the past 3 months when we have been only marking people as the Yes option: import works perfectly. However, when trying to mark contacts No, it completely ignores the import and keeps the contacts marked as yes. Does anyone have any solutions?

Thanks!
-Jessica

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Weird issue with a custom field yes/no
April 10, 2014, 12:43:45 pm
hi jessica - until some better suggestions come along the following might be worth trying

import a small test of new contacts, some with the Yes label, some with the 'yes' value (is this yes, y, 1 or something else - you can check by looking at the Field options - if you used standard civi yes/no i expect it would be a 1)
also some contacts with the No label and 'no' value

hope the above makes sense

also provide a bit more detail on your import settings ie is it FILL (which won't overwrite existing data) or UPDATE (which will overwrite)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

jkirsner

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 1
  • CiviCRM version: 4.1.2
  • CMS version: Drupal
  • MySQL version: unsure
  • PHP version: unsure
Re: Weird issue with a custom field yes/no
April 10, 2014, 12:56:02 pm
I am using the update setting. I am using the standard Civi Yes/No, which imports/exports them as "Yes" and "No". When I try to import the fields using the "Update" setting, which should overwrite the data, the No will not overwrite the Yes.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Weird issue with a custom field yes/no
April 10, 2014, 01:32:44 pm
have you tried importing using 0 and 1?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Weird issue with a custom field yes/no
April 10, 2014, 01:43:26 pm
I think Pete's right - using 1 for yes and 0 for no will probably resolve this.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

jkirsner

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 1
  • CiviCRM version: 4.1.2
  • CMS version: Drupal
  • MySQL version: unsure
  • PHP version: unsure
Re: Weird issue with a custom field yes/no
April 11, 2014, 09:52:39 am
I have tried using 0, and the boxes remain marked Yes.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Weird issue with a custom field yes/no
April 11, 2014, 01:24:47 pm
nothing weird but obvious like the field is disabled?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

jkirsner

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 1
  • CiviCRM version: 4.1.2
  • CMS version: Drupal
  • MySQL version: unsure
  • PHP version: unsure
Re: Weird issue with a custom field yes/no
April 22, 2014, 10:42:26 am
Nothing like that, and as I said, it works fine to override either "No" or nothing selected with "Yes": it just won't let me override yes.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Weird issue with a custom field yes/no
April 23, 2014, 11:49:17 am
I was just about to post about the same issue (which just appeared for us yesterday as well!).

We are using the standard civi yes/no in a custom field.

When I import (update), the import is working fine.  The changelog shows the times I import, and I can change any field, including changing yes/no fields from NULL or 0 to 1.  However, if a field is a 1 (yes), and I import a 0, it just ignores that part of the import.

I feel certain that we have done this before (as it is part of our normal workflow), but this may be the first time we've tried since updating (we just updated to 4.4.4 -- any point to jumping to 4.4.5 to try to resolve?).

I was thinking I was crazy again, but maybe not.

TIA for any thoughts.

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Weird issue with a custom field yes/no
April 23, 2014, 11:50:25 am
Also, I can't change a null field by importing a 0 either.

So, it seems like an "import 0" problem, rather than a change 1 to 0 problem, in case that matters.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Weird issue with a custom field yes/no
April 23, 2014, 02:44:17 pm
so maybe a change in core means that a 0 is being treated as 'empty' - and empty means it won't update

i will try and catch someone from core on irc and flag
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Weird issue with a custom field yes/no
April 23, 2014, 03:07:24 pm
petednz -

that makes sense... and i think it's a relatively recent change as our site is usually fairly up to date.

thanks!

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Weird issue with a custom field yes/no
April 25, 2014, 12:40:22 pm
petendz-

any luck finding anyone with thoughts on this?  should I try to post somewhere else?

i can do a work around... essentially changing our binary system to 1/9 and recoding everything from 1/0 to 1/9, but it seems a little silly.  but, as i don't have the skills to actually fix anything, that may be where i'm headed.

appreciate any suggestions!
-tiffani


JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Weird issue with a custom field yes/no
April 25, 2014, 08:06:17 pm
Jessica,

I meant to mention in person today, but - jlacey and I are working on an extension for 4.5 to allow you to replace a value on a single field for all contacts in a found set.

That doesn't fix this bug, but presents a more elegant solution to your needs!

Jon
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Tiffani Chin

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.4
  • CMS version: Drupal 7.26
  • MySQL version: 5.5.30
  • PHP version: 5.3.17
Re: Weird issue with a custom field yes/no
April 29, 2014, 12:59:48 pm
JonGold,

Will you post the extension when you have it done?
I never realized how often I import zeros until it stopped working. :)

Thanks,
-tiffani


Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Weird issue with a custom field yes/no

This forum was archived on 2017-11-26.