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 CiviContribute (Moderator: Donald Lobo) »
  • Losing bulk contributions during validation
Pages: [1]

Author Topic: Losing bulk contributions during validation  (Read 782 times)

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Losing bulk contributions during validation
July 11, 2013, 04:32:07 pm
DemocracyNow has been using CiviCRM on Drupal 6 for several years. In May, we upgraded them to CiviCRM v4.2.9.  There have been no problems until recently when they began using the Bulk Contribution entry feature.  An intern enters the data, and saves it to be reviewed, validated (and entered) by a staff member.  But in just about every batch one or more contributions are simply dropped (and have to be manually entered again).  Here are four actual examples (only the batch names have changed):

Batch AAA
  • Originally had 30 contributions totaling 2,300
  • After validation the batch says it has 30 contributions totaling 2,275
  • Find Contributions >> Batch Name = AAA shows 29 contributions totaling 2,275
  • The first contribution for 25 in the batch disappeared when the batch was validated

Batch BBB
  • Originally had 21 contributions totaling 900
  • After validation the batch says it has 21 contributions totaling 875
  • Find Contributions >> Batch Name = BBB shows 20 contributions totaling 875
  • The 15th contribution for 25 in the batch disappeared when the batch was validated

Batch CCC
  • Originally had 15 contributions totaling 1,940
  • After validation the batch says it has 15 contributions totaling 1,765
  • Find Contributions >> Batch Name = CCC shows 14 contributions totaling 1,765
  • The 3rd contribution for 175 in the batch disappeared when the batch was validated

Batch DDD
  • Originally had 30 contributions totaling 1,465
  • After validation the batch says it has 30 contributions totaling 425
  • Find Contributions >> Batch Name = DDD shows 12 contributions totaling 425
  • 18 contributions (!!) totaling 1,040 in the batch disappeared when the batch was validated

This is, of course, not good.  I have checked for similar issues between the missing donations.  Some people have relationships, some have given before, a few are very recently added... but there seems to be no unifying pattern between them.

I've searched but have found no similar issues and nothing is showing up in the logs.  Ideas of where to look next?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Losing bulk contributions during validation
July 14, 2013, 08:48:23 am
Can you check the function processContribution() in CRM/Batch/Form/Entry.php

Note that if contact is not selected than we skip the batch entry row:
Quote
if (!CRM_Utils_Array::value($key, $params['primary_contact_select_id'])) {
  continue;
}

Quote
$params['field']
should have all the submitted rows.

Did you try replicating this on demo?

HTh
Kurund
Found this reply helpful? Support CiviCRM

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Losing bulk contributions during validation
July 16, 2013, 10:06:00 am
Thanks for the pointer, Kurund.

I was using v4.2.9.  It seems the situation is a bit better in v4.3.5, but there is still room for an improved UI in both versions -- especially since most of the pieces are in place:

The function checkColumns() in templates/CRM/Batch/Form/Entry.tpl sets the batch-valid 'check mark' flag. It checks for required fields such as primary_contact, contribution_type, receive_date, total_amount and contribution_status_id.  It seems to me that it should also check that contact_id is set, as without that the entry will be ignored.

I tried to figure out how to add this, looking at Entry.{php/tpl}, but I'm not much for javascript - someone who is could add this much more easily.
« Last Edit: July 16, 2013, 01:58:38 pm by fen »

fen

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 13
    • CivicActions
  • CiviCRM version: 3.3-4.3
  • CMS version: Drupal 6/7
  • MySQL version: 5.1/5.5
  • PHP version: 5.3/5.4
Re: Losing bulk contributions during validation
July 18, 2013, 07:35:10 am
Quote from: Kurund Jalmi on July 14, 2013, 08:48:23 am
Did you try replicating this on demo?

It's even worse:

On demo (currently running 4.3.4):
Contributions >> Batch data >> New Data Entry Batch
  • Number of items: 2
  • Total amount: 100
Contact 1:
  • Type 'coo' and choose Cooper, Felisha :: felishacooper@fake...
  • Type: Donation
  • Amount: 20
  • Status: Closed
Contact 2:
  • Type (do not choose from dropdown): 'Bachman, Daren'
  • Type: Donation
  • Amount: 80
  • Status: Closed

Note that both contacts show a 'batch-valid' check mark in left-most column.  But the second entry has no contact_id associated with it. Fixing this faulty validation would go a long way towards fixing the set of issues this has uncovered.

If you 'Validate & Process the Batch' it goes through, but two things go wrong:
  • Only Felicia's contribution is recorded (Daren's is silently lost)
  • The batch is gone (try searching for it via Find Contributions: the batch name is there but it is empty

Sometimes (during my testing on demo) when I 'Validate & Process the Batch' I get:
  • Sorry but we are not able to provide this at the moment.
  • DB Error: unknown error
  • Return to home page.
« Last Edit: July 18, 2013, 07:37:34 am by fen »

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Losing bulk contributions during validation
July 23, 2013, 10:33:30 am
Fen,

Can you try this patch: https://github.com/civicrm/civicrm-core/pull/1219 and let us know if that helps..

Thanks
Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Losing bulk contributions during validation

This forum was archived on 2017-11-26.