Details
- 
    Type:
Bug
 - 
    Status: Done/Fixed
 - 
    Priority:
Minor
 - 
    Resolution: Fixed/Completed
 - 
    Affects Version/s: 4.4.11
 - 
    Fix Version/s: 4.6
 - 
    Component/s: CiviContribute, CiviCRM API
 - 
    Labels:
 
- 
        Documentation Required?:None
 
Description
Steps to reproduce:
1. Create a new contribution in state "pending" with no transaction id (nominally via API or a BAO)
2. Attempt to complete the contribution via API Contribution.create(id => *, trxn_id => *, contribution_status_id => [Completed status id], ...)
Expected outcome:
a. Contribution status and transaction id is updated.
b. A financial transaction record is written with the relevant trxn_id
Actual outcome:
As expected but the trxn_id is NULL for part b.
This results in missing transactions data on reports as the civicrm_financial_trxn record can't be joined into, eg. civicrm_contribution