Answers.Body: <p>To this very old but unanswered question, I'll answer that there's now an extension that does exactly what you're asking: <a href="https://civicrm.org/extensions/clone-contribution" rel="nofollow noreferrer">Clone Contribution</a>. Quoting from the description:</p>
  
  <blockquote>
    <p><img src="https://raw.githubusercontent.com/twomice/civicrm-clonecontrib/master/images/screenshot.png" alt="Screenshot"></p>
    
    <p>This extension provides:</p>
    
    <ul>
    <li>UI controls to clone a particular contribution, wherever contributions are listed (e.g., a contact's Contributions tab;
    contributions search results).</li>
    <li>Options to omit certain contribution properties from the cloning process (i.e., properties that will not be copied from the source
    contribution to the new contribution).</li>
    <li>An API Contribution.clone for cloning any number of contributions.</li>
    </ul>
    
    <p>During the cloning process, the following contribution properties can
    be changed so that they're immediately different in the new
    contribution:</p>
    
    <ul>
    <li>Contribution Status</li>
    </ul>
  </blockquote>
  
  <p>I'm the developer on this extension.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-14T19:19:01.993Z
Answers.Text: Bravo. Good to know this happened.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-14T16:06:14.293Z
Answers.LastActivityDate: 2020-05-14T16:06:14.293Z
Answers.UserDisplayName: TwoMice
Body: <p>I've been requested to add a feature to our installation that allows an admin to copy or duplicate an existing contribution, including all it's custom fields.</p>
  
  <p>I was wondering if anyone has tackled this before, or if there is an extension out there which may help.</p>
  
  <p>If not, any pointers to doing this the right way?  Should/Can this be written as an extension?</p>
  
  <p>I was thinking to add a button on the contribution view page (not sure which template this may be yet), and then use the API to pull the current contribution (hopefully with custom fields) and create a new one with the same fields (removing/replacing the transaction id so we don't have a duplicate key).</p>
  
  <p>I'd appreciate any tips on this.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-29T13:41:58.240Z
Comments.Text: What is the use case for this?  Although you could use the API to get the fields of an existing contribution and create a new one, there are other fields besides transaction id that would not make sense to copy like dates, check_number, recurrence info, maybe status etc.  It would be safer to determine which fields you want to copy for your needs than just duplicate an existing one.
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-29T18:04:53.600Z
Comments.Text: The use case is for recurring checks and other offline type payments.  We have certain folks who donate regularly offline (check/cash), and each time the info is all similar (same custom fields, which there are a bunch of, etc).  And yes, my plan is to reset certain fields, most of the ones you mentioned and a couple of others. I was thinking to grab them all, reset the ones I need to, then create the new.  The admins trigger the copy and then review immediately after creation (will send them to the new cont's edit page right after successfully creating it).
Comments.UserDisplayName: Paul B
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-05-02T10:42:29.700Z
Comments.Text: Related: [How can I clone a contact?](https://civicrm.stackexchange.com/questions/18419/how-to-clone-a-contact) - maybe there's room for an extension which provides a generic "clone this entity" functionality ...
Comments.UserDisplayName: Chris Burgess
Tags: <contributions>
Title: Copy/Duplicate a Contribution
ThreadText: # Copy/Duplicate a Contribution
  
  (Asked by: username_0 on 2017-04-29)
  
  I've been requested to add a feature to our installation that allows an admin to copy or duplicate an existing contribution, including all it's custom fields.
  
  I was wondering if anyone has tackled this before, or if there is an extension out there which may help.
  
  If not, any pointers to doing this the right way? Should/Can this be written as an extension?
  
  I was thinking to add a button on the contribution view page (not sure which template this may be yet), and then use the API to pull the current contribution (hopefully with custom fields) and create a new one with the same fields (removing/replacing the transaction id so we don't have a duplicate key).
  
  I'd appreciate any tips on this.
  
  **Tags:** contributions
  
  > **Comments:**
  > **username_1**: What is the use case for this?  Although you could use the API to get the fields of an existing contribution and create a new one, there are other fields besides transaction id that would not make sense to copy like dates, check_number, recurrence info, maybe status etc.  It would be safer to determine which fields you want to copy for your needs than just duplicate an existing one.  
  > **username_0**: The use case is for recurring checks and other offline type payments.  We have certain folks who donate regularly offline (check/cash), and each time the info is all similar (same custom fields, which there are a bunch of, etc).  And yes, my plan is to reset certain fields, most of the ones you mentioned and a couple of others. I was thinking to grab them all, reset the ones I need to, then create the new.  The admins trigger the copy and then review immediately after creation (will send them to the new cont's edit page right after successfully creating it).  
  > **username_2**: Related: [How can I clone a contact?](https://civicrm.stackexchange.com/questions/18419/how-to-clone-a-contact) - maybe there's room for an extension which provides a generic "clone this entity" functionality ...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2020-05-14. Score: 2
  
  To this very old but unanswered question, I'll answer that there's now an extension that does exactly what you're asking: [Clone Contribution](https://civicrm.org/extensions/clone-contribution). Quoting from the description:
  
  > ![Screenshot](https://raw.githubusercontent.com/username_3/civicrm-clonecontrib/master/images/screenshot.png)
  >
  > This extension provides:
  >
  > * UI controls to clone a particular contribution, wherever contributions are listed (e.g., a contact's Contributions tab;
  >   contributions search results).
  > * Options to omit certain contribution properties from the cloning process (i.e., properties that will not be copied from the source
  >   contribution to the new contribution).
  > * An API Contribution.clone for cloning any number of contributions.
  >
  > During the cloning process, the following contribution properties can
  > be changed so that they're immediately different in the new
  > contribution:
  >
  > * Contribution Status
  
  I'm the developer on this extension.
  
  > **Comments:**
  > **username_4**: Bravo. Good to know this happened.  
  
  ---
  
  