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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Increase batch update limit
Pages: [1]

Author Topic: Increase batch update limit  (Read 3915 times)

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Increase batch update limit
March 13, 2009, 06:50:41 am
Hello there,

I imagine that there is a limit on batch update via profile because otherwise that form would take up to much room and be unprocessable.  However it causes problems in a few different situations I've encountered.  Here's an example use case:

1) An organisation uses CiviCRM to take payments online and processes membership.

2) They post membership packs to their new members.  Because they get new members all the time, they prefer to do this weekly but by the end of most weeks they are looking at over 100 memberships.

3) They have a custom field associated with memberships called membership pack sent which they use to search for people that need membership packs and set to yes when the membership pack has been sent.

Problem: when there are more than 100 people that need batch updating things have to be processed in stages, which is painful and error-prone.

Long term solution: Implement an option in batch update (similar in concept to the "with all # records" / "Selected records only" radio box that appears in the contact selector) that offers the option to: "Update fields to the same value" or "Update individually (limited to 100 records)".  This could appear on the same screen that asks you to select a profile.

The "Update fields to the same value" screen is similar to the normal batch update screen but has just one record and and extra check box for each field called "leave orginal value" that disables the field when checked.

I'd say this is a good addition because even though the current system scores extremely highly for usability (magically and temporily making your data as easy to edit as if it were in a spreadsheet) it does cause problems for the relatively common use case of lot of records that you want to update to the same value.

Short term solution: find the part of the code where the batch update limit is applied apply this 'psuedopatch'

- $batchUpdateLimit=100;
+ $batchUpdateLimit=200;

Would be good to know your thinking on limiting to 100.  Any other reasons?  Apart form the limit on number of form fields that you can submit, can you forsee any problems with applying the short term solution above?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

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: Increase batch update limit
March 13, 2009, 11:39:04 am

100 seems a nice round number (and so does 200). think of it in terms of number of form fields. if the profile has 5-7 fields, for a 100 limit, its a total of 500-700 fields and the html size is fairly large. Increasing the number doubles the html size / load 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

sbotts

  • Guest
Re: Increase batch update limit
September 21, 2010, 12:38:11 pm
Maybe this will be useful to someone else. On my local xampp server, for batch update of geocoding (full db transferred later), I changed max contacts to 1000. It works fine for me in that environment, but probably wouldn't be a good idea elsewhere. It takes a while, so I'm hesitant to go beyond 1000, but updating in increments of 100, with 100,000 voter records, was really getting me down.

In CRM/Contact/Form/Task/Batch.php:

protected $_maxContacts = 1000;

mnt_schred

  • I’m new here
  • *
  • Posts: 16
  • Karma: 1
  • CiviCRM version: 4.1.beta3
  • CMS version: Drupal 7
  • MySQL version: 5.0.67
  • PHP version: 5.2.6
Re: Increase batch update limit
September 26, 2012, 08:39:34 am
It would be better if this (and other variables) could be set in the settings of CiviCRM, maybe under a new tab 'performance' under 'system settings'? 1000 would be a better default.

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: Increase batch update limit
September 26, 2012, 09:27:56 am

yes, agreed. would be good to push this setting and a lot of other constants like this into the system settings table

would be great if you can come over to the apeldoorn sprint and help start this process :)

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) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Increase batch update limit

This forum was archived on 2017-11-26.