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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Number for "Add contacts to group" doesn't match "Number of selected contacts"
Pages: [1]

Author Topic: Number for "Add contacts to group" doesn't match "Number of selected contacts"  (Read 1425 times)

robekl01

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 3.2.2
  • CMS version: Drupal
  • MySQL version: Unsure
  • PHP version: Unsure
Number for "Add contacts to group" doesn't match "Number of selected contacts"
January 23, 2011, 10:07:48 pm
Hello,

I've been observing a strange behavior and wondered if anyone had encountered the same (I've combed the issue tracker with no sign of it documented) or had any insight.

I'm doing advanced searches for contacts (different criteria - name, or employer relationship, etc. - it varies). Then, I'm finding that when I select either some or all of the results to "add contacts to group," on the following screen, the number shown for "Number of selected contacts" does NOT match the selected contacts from the previous screen. Sometimes it's fewer, but often the number shown is ALL of my contacts - not just those included in the previous search results list.

This does not happen every time, just occasionally - and so far I have been unable to determine a pattern.

Any thoughts on this greatly appreciated! It's pretty frustrating for our users.
Karen

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
January 24, 2011, 08:01:23 am

There have been bugs with this in the past. Might be worth upgrading to the latest version (3.3.3) and see if that solves the issue

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

resga

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 3
  • CiviCRM version: 3.4.2
  • CMS version: Drupal
  • MySQL version: 5.1.41
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
June 07, 2011, 01:06:20 pm
I think the problem is that search conditions are not being passed on if the "Edit Search Criteria" tab is not expanded AND the search criteria is a custom field.

For example, if I conduct an advanced search for custom field "Gift Subscriptions" which gives only one result, I can select it like this: "Select Records: x The found record", select "Print PDF letter to contacts" and click "Go".
However, on the next page it says "Number of selected contacts: 602" in stead of "Number of selected contacts: 1"

But if I expand the "Edit Search Criteria" tab on the previous page, the search criteria are processed, and the result is "Number of selected contacts: 1".

This happens for custom fields, but not standard fields, like address or name field, where the criteria are respected, regardless of whether the tab is expanded or not.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
June 07, 2011, 01:25:27 pm

can u give us the exact steps to replicate this on demo

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

resga

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 3
  • CiviCRM version: 3.4.2
  • CMS version: Drupal
  • MySQL version: 5.1.41
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
June 07, 2011, 02:00:19 pm
Good news for CiviCRM, I could not recreate it on the demo server! I created the custom field "Gift Subscription" under Custom Data Set "Custom Field TEST", and when I Advance search for contacts with a Gift Subscription (only one user has it) it works, even if the "Edit Search Criteria" tab is collapsed.

Now I just have to find out why it doesn't work on my system, IF the "Edit Search Criteria" tab is collapsed... Something with the Javascript version perhaps? Or that I am using php 5.3?

resga

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 3
  • CiviCRM version: 3.4.2
  • CMS version: Drupal
  • MySQL version: 5.1.41
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
June 10, 2011, 02:53:12 am
I have found the bug, it happens when the language is not English (USA, Australian, etc.)

To replicate:
1. Create a custom data set called "Ekstra Information" and a custom field "Gift Subscription" (Yes/No)
2. Select three random contacts and set "Gift Subscription" to "Yes" (if the database has been reset)
3. Change the default language to Danish: "Settings - Localization" -> "Default language": Danish
4. Click "Avanceret Søgning" (Advanced Search)
5. Under "Tilrettet felter" (Custom Fields) -> "Ekstra Information", set "Gift Subscription" to "Ja" (Yes) and click "Søgning" (Search)
6. Select "Records: x All 3 records" and "Print PDF-brev til kontakter", then click "Gå"

Result: "Number of selected contacts: 107" but it should have been 3...

Now repeat the above, but in step number 6, click and expand BOTH the "Edit Search Criteria" tab and "Tilrettet felter" (Custom Fields) -> "Ekstra Information" so that "Gift Subscription" x "Ja" is visible.

The result will now be the correct: "Number of selected contacts: 3"

I tried with "English (Australia)" and it worked as expected, but not for "Dutch" so it probably works for all the English languages, but not for any other language.

Also, in step 6, notice how the "Tilrettet felter" (Custom Fields) is already expanded, when you click and expand the "Edit Search Criteria" with language set to English, but it is not expanded when language is set to Danish. But if you then click the "Tilrettet felter" tab, the little "loading" wheel pops up, and the search settings are loaded.

I have attached two images to show the different behaviour between the two languages, after clicking "Edit Search Criteria".
« Last Edit: June 10, 2011, 03:13:40 am by resga »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
June 10, 2011, 01:40:21 pm

The issue is with Step 6 and the custom tab not expanding. If i had to guess, the code is using the "english name" to expand the accordion which does not exist in danish (or any other language) and hence things break

Can you please file an issue and link to this forum post. If you can investigate and figure out whats happening that would help ensure it gets in the next release. The relevant code should be at:

CRM/Contact/Form/Search/Advanced.php, search for 'pane' (the 'open' parameter controls whether it is opened by default etc)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

resga

  • I post occasionally
  • **
  • Posts: 38
  • Karma: 3
  • CiviCRM version: 3.4.2
  • CMS version: Drupal
  • MySQL version: 5.1.41
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
June 13, 2011, 02:29:37 am
Thanks lobo! I am afraid my php and javascript skills are too limited to solve the problem, but I have filed an issue in the CiviCRM Issue Tracker: http://issues.civicrm.org/jira/browse/CRM-8287

EDIT: The issue has been fixed in version 3.4.4, see under 'Number for "Add contacts to group" doesn't match "Number of selected contacts"': http://issues.civicrm.org/jira/browse/CRM/fixforversion/10730

« Last Edit: June 29, 2011, 11:56:05 pm by resga »

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
July 14, 2011, 09:18:27 am
Sorry to bring this one up again, but:

I had this come up again on 3.4.4

Scenario is:

Do an advanced search on a named event, click search.
It returns x contacts
click on edit search criteria and the event name is not present on the search so when you hit add all to group it then wants to add to every contact in the database instead of the x records found in the initial search.

The event name is not being carried through from the initial search screen to the results screen.

Should I raise this on the issue tracker?

I've reproduced on the Joomla demo. (advanced search only parameter is one of the event names --> search --> add all to group --> then shows all 103 contacts)

Cheers,

Dave

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
September 09, 2011, 02:41:02 pm
Hi Again,

Any news on this issue? Still to be an issue in 3.4.5 (and in the demo site).

There is a similar problem with the changelog section in the 'advanced search' too, if you fill in criteria in that section it is not remembered when you select a bulk action when you have 'all contacts' selected. So it seems to be changelog and events.

Cheers,

Dave

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
September 09, 2011, 05:37:22 pm
i just tried the event stuff on joomla.demo.civicrm.org for fall fundraiser dinner and it worked as expected? can u give me the exact steps that caused the search criteria with events to be lost

also tried the contact log with modified date between sept 1,2010 and today (8 contacts) and that worked also

lobo
« Last Edit: September 09, 2011, 05:39:29 pm by Donald Lobo »
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davesage

  • I post frequently
  • ***
  • Posts: 153
  • Karma: 3
  • CiviCRM version: 3.4 & 4.1
  • CMS version: Joomla 1.5 & 2.5
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
September 09, 2011, 05:50:39 pm
Hi Lobo,

Just tried both scenarios on joomla.demo and still see the same behaviour.

When you run the search it shows less than 20 contacts for each search then you select 'All contacts' pick 'add to group' and hit go and then it shows 106 contacts to add to the group?

If you open the 'edit criteria' the fields are blank that were populated before search.

I just tried FF and it works fine so this seems to only occur in IE - humm - any pointers.

Cheers,

Dave

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Number for "Add contacts to group" doesn't match "Number of selected contacts"
September 09, 2011, 05:58:03 pm

IE 9? Someone else posted something similar on the forums.

Unfortunately most of us are not on Windows / IE. Would be great if you can investigate and debug and figure out what are the differences and why

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Number for "Add contacts to group" doesn't match "Number of selected contacts"

This forum was archived on 2017-11-26.