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) »
  • Entire database is exported when only a subset is selected in the query
Pages: [1]

Author Topic: Entire database is exported when only a subset is selected in the query  (Read 1453 times)

Dennis Gray

  • Ask me questions
  • ****
  • Posts: 472
  • Karma: 1
  • CiviCRM version: Various. See post.
  • CMS version: Drupal, Wordpress and Joomla. See post.
  • MySQL version: TBA
  • PHP version: TBA
Entire database is exported when only a subset is selected in the query
March 03, 2009, 04:34:04 pm
User is searching contacts using civicrm/contacts/search screen and leaves the default set to -all contacts-. The member is only supposed to be able to export contacts from groups for which he is admin (organic groups).  The resulting selection is only about 4000 records from the database of over 80,000 record. When the user actually does the export, all 80,000+ records are exported (Excel truncates the export, of course).

I can't post screenshots here because of data sensitivity.

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: Entire database is exported when only a subset is selected in the query
March 03, 2009, 09:01:24 pm

this was reported as a bug some time ago and has been fixed in recent releases. I dont remember what release / issue number etc. Rob might have to do a search through the issue tracker. Did a quick search adn this might be the issue: http://issues.civicrm.org/jira/browse/CRM-1969

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

Dennis Gray

  • Ask me questions
  • ****
  • Posts: 472
  • Karma: 1
  • CiviCRM version: Various. See post.
  • CMS version: Drupal, Wordpress and Joomla. See post.
  • MySQL version: TBA
  • PHP version: TBA
Re: Entire database is exported when only a subset is selected in the query
March 04, 2009, 02:33:09 am
As  an emergency fix we thought of restricting the ability to export after a search but I don't see any options for doing that. Any ideas?

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: Entire database is exported when only a subset is selected in the query
March 04, 2009, 09:56:12 am

For 1.9 this will need to be a code hack (CRM/Contact/Task.php)

For 2.2, you can use a hook to hide various actions (and hence hide export for all but a few users)

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

Dennis Gray

  • Ask me questions
  • ****
  • Posts: 472
  • Karma: 1
  • CiviCRM version: Various. See post.
  • CMS version: Drupal, Wordpress and Joomla. See post.
  • MySQL version: TBA
  • PHP version: TBA
Re: Entire database is exported when only a subset is selected in the query
March 05, 2009, 02:17:32 am
Can you explain more about the logic here. If the user only has the rights to select a certain subset of the database then selecting -all contacts- would only return the number of records selected. Why would the export need to use the same ACL rules to return the same set of records. This seems inefficient. Without looking at the code, I would think that the original query would create a temporary table that only included the results of the search and the export would not have to do any more work.


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: Entire database is exported when only a subset is selected in the query
March 05, 2009, 07:36:29 am

dennis:

it was a BUG in the code and hence you are seeing all contacts.

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

Dennis Gray

  • Ask me questions
  • ****
  • Posts: 472
  • Karma: 1
  • CiviCRM version: Various. See post.
  • CMS version: Drupal, Wordpress and Joomla. See post.
  • MySQL version: TBA
  • PHP version: TBA
Re: Entire database is exported when only a subset is selected in the query
March 05, 2009, 12:15:56 pm
Thanks, Lobo. I managed to catch up with Rob and he was able to fix it.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Entire database is exported when only a subset is selected in the query

This forum was archived on 2017-11-26.