Import of contributions (update existing) -> error for total_amount = "0"
#3820 (closed) )
(This issue is related toIn some use case for contribution import, it is needed to update the total_amount to "0".
However, since 5.51(?) this creates an error:
Missing required fields: Contribution ID OR Total Amount
In the past, it was okay to set this field to "0". However now, I have to set it to "0.00" in order to make the update parser understand, that the value is not empty...
Of course, this is a minor issue, since there is an easy workaround. However, out there might be regular import procedures relying on "total_amount='0' ".
Reproduction steps
- Create a csv file for import of contributions as "update contribution", with transaction_id as key and total_amount = "0"
- Import the file
- Workaround: set the total_amount in the import file to total_amount = "0.00" -> this will work.
Current behaviour
total_amount = 0 is not accepted and produces an error when trying to import
Expected behaviour
total_amount = 0 is accepted and updates the total_amount to "0.00"
Environment information
CiviCRM 5.52.2 (with patch https://github.com/civicrm/civicrm-core/pull/24367 )