Answers.Body: <p>4 years later and different situation... if you use CiviSEPA, this may apply to you: <a href="https://github.com/Project60/org.project60.sepapp/issues/17" rel="nofollow noreferrer">https://github.com/Project60/org.project60.sepapp/issues/17</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-22T15:16:35.740Z
Answers.LastActivityDate: 2024-01-22T15:16:35.740Z
Answers.UserDisplayName: wintermoor
Answers.Body: <p>Since Imran is on CiviCRM Spark, I had a quick look at the issue. I think it was caused by the field mapping, where the import was trying to import the "Contribution Status", but there wasn't a status for "paid out", causing the import to fail.</p>
  
  <p>So I changed the import mapping to ignore the import status (since the file only completed contributions), and it seems to have resolved the issue.</p>
  
  <p>ADD-ON: this also happens when you try import Contributions with status=completed (as opposed to Completed)!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-05T09:47:27.637Z
Answers.Text: should this be reported as a bug? Seems the error should have said "Invalid Contribution Status".
Answers.UserDisplayName: artfulrobot
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-03T19:06:28.400Z
Answers.LastActivityDate: 2020-06-15T20:49:10.467Z
Answers.LastEditDate: 2020-06-15T20:49:10.467Z
Answers.UserDisplayName: bgm
Body: <p>I am importing contributions from my donors from a .csv file. I have tested the process using a simple .csv file with one row of data for a payment from a donor I have already added to contacts. The import was successful, matching the contribution to the donor. When I try to repeat this process using a spreadsheet with approximately 40 rows of data (including multiple contributions from some donors) all rows of the spreadsheet fail to import and have the error message 'Expected one Contribution but found 2'. I am using the email address to match to contact. </p>
  
  <p>Any ideas what I am doing wrong?  </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-28T15:55:51.710Z
Comments.Text: Hi Imran, are you choosing "Insert new contributions" or "Update existing contributions" on the import form?
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-29T12:29:40.920Z
Comments.Text: Hi, I'm choosing "insert new contributions".
Comments.UserDisplayName: Imran Chaudhary
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-30T10:06:02.757Z
Comments.Text: Very odd! Hmmm. There are several contribution fields that must be unique, e.g. transaction ID, invoice ID (I think there may be a couple of others too). There's no chance that somehow those have ended up with multiple records having the same IDs? i.e. are you using any "id" fields in your import?
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-03T08:11:38.577Z
Comments.Text: I have checked the csv file and there's no duplicates on the unique fields. The docs say the following fo importing contributions: If you insert new contributions, your CSV file must include at least the following fields:
  
  - Contact Id or External Identifier or all the fields used in your Unsupervised Duplicate Matching rule (to match to an existing contact)
  - Financial Type
  - Total Amount (continued)
Comments.UserDisplayName: Imran Chaudhary
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-03T08:15:49.037Z
Comments.Text: I've manually added the contact id to the spreadsheet, still no joy. The default 'unsupervised duplicate matching rule' that I have says name and email, but when I set up the field matching there are no 'name' fields in the drop down list to match to. Strange that this originally worked for a single line import.
Comments.UserDisplayName: Imran Chaudhary
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-03T09:49:02.023Z
Comments.Text: "no name fields" - no, that's why I wrote this [CSV import helper](https://civicrm.org/extensions/csv-import-helper). Have you tried Contact ID (with populated IDs), mapping that field, ignoring the email one (not needed if you have contact ID)? If you have tried this and it still errors then my import helper is not going to help you out of this hole, although you may (or may not!) still find it helpful.
Comments.UserDisplayName: artfulrobot
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-04T13:31:41.480Z
Comments.Text: Thanks for your response. I had a response from the CiviCRM Spark team yesterday which has fixed the problem, please see below.
Comments.UserDisplayName: Imran Chaudhary
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-04T13:32:41.280Z
Comments.Text: I will check out your importer as well!
Comments.UserDisplayName: Imran Chaudhary
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-05T09:46:38.880Z
Comments.Text: Great that you got it sorted Imran!
Comments.UserDisplayName: artfulrobot
Tags: <contributions><import>
Title: Expected one Contribution but found 25
ThreadText: # Expected one Contribution but found 25
  
  (Asked by: username_0 on 2020-01-24)
  
  I am importing contributions from my donors from a .csv file. I have tested the process using a simple .csv file with one row of data for a payment from a donor I have already added to contacts. The import was successful, matching the contribution to the donor. When I try to repeat this process using a spreadsheet with approximately 40 rows of data (including multiple contributions from some donors) all rows of the spreadsheet fail to import and have the error message 'Expected one Contribution but found 2'. I am using the email address to match to contact.
  
  Any ideas what I am doing wrong?
  
  **Tags:** contributions, import
  
  > **Comments:**
  > **username_1**: Hi Imran, are you choosing "Insert new contributions" or "Update existing contributions" on the import form?  
  > **username_0**: Hi, I'm choosing "insert new contributions".  
  > **username_1**: Very odd! Hmmm. There are several contribution fields that must be unique, e.g. transaction ID, invoice ID (I think there may be a couple of others too). There's no chance that somehow those have ended up with multiple records having the same IDs? i.e. are you using any "id" fields in your import?  
  > **username_0**: I have checked the csv file and there's no duplicates on the unique fields. The docs say the following fo importing contributions: If you insert new contributions, your CSV file must include at least the following fields:  - Contact Id or External Identifier or all the fields used in your Unsupervised Duplicate Matching rule (to match to an existing contact) - Financial Type - Total Amount (continued)  
  > **username_0**: I've manually added the contact id to the spreadsheet, still no joy. The default 'unsupervised duplicate matching rule' that I have says name and email, but when I set up the field matching there are no 'name' fields in the drop down list to match to. Strange that this originally worked for a single line import.  
  > **username_1**: "no name fields" - no, that's why I wrote this [CSV import helper](https://civicrm.org/extensions/csv-import-helper). Have you tried Contact ID (with populated IDs), mapping that field, ignoring the email one (not needed if you have contact ID)? If you have tried this and it still errors then my import helper is not going to help you out of this hole, although you may (or may not!) still find it helpful.  
  > **username_0**: Thanks for your response. I had a response from the CiviCRM Spark team yesterday which has fixed the problem, please see below.  
  > **username_0**: I will check out your importer as well!  
  > **username_1**: Great that you got it sorted Imran!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2020-02-03. Score: 4 | Accepted answer
  
  Since Imran is on CiviCRM Spark, I had a quick look at the issue. I think it was caused by the field mapping, where the import was trying to import the "Contribution Status", but there wasn't a status for "paid out", causing the import to fail.
  
  So I changed the import mapping to ignore the import status (since the file only completed contributions), and it seems to have resolved the issue.
  
  ADD-ON: this also happens when you try import Contributions with status=completed (as opposed to Completed)!
  
  > **Comments:**
  > **username_1**: should this be reported as a bug? Seems the error should have said "Invalid Contribution Status".  
  
  ---
  
  ### Answer by username_2 on 2024-01-22. Score: 0
  
  4 years later and different situation... if you use CiviSEPA, this may apply to you: <https://github.com/Project60/org.project60.sepapp/issues/17>
  
  
  ---
  
  