CRM-21694 Cannot change contribution from 'Completed' to 'Pending'

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.29
    • Fix Version/s: None
    • Component/s: CiviContribute
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No
    • How it works currently:
      1. Create a contribution with status 'Completed'
      2. Edit the contribution - it's not possible to change the status to 'Pending'

      It's also not possible via the API.

      Description

      It's not possible to change a contribution with status 'Completed' to status 'Pending'. It should be, according to: https://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Data+Flow#CiviAccountsDataFlow-SupportedStatusTransitions.

        Attachments

          Activity

          [CRM-21694] Cannot change contribution from 'Completed' to 'Pending'
          Andrew West added a comment -

          Mentioned on Mattermost and @joemurray asked to have it assigned to him.

          Erik Hommel added a comment -

          That would make no sense at all to me? Once a contribution is completed it also leave a financial trail. Setting it back to pending would have lots of financial implications. Would it not make more sense to cancel the contribution and create a new one?

          Joe Murray what do you think?

          Erik Hommel added a comment -

          Björn Endres would also like to hear your opinion on this as I reckon it would affect CiviSepa/CiviBanking if it becomes possible to change a contribution from completed back to pending?

           

          Joe Murray added a comment -

          Hmm. My guess is that we support this because of desire to backout an error. So someone mistakenly changes a contribution from Pending Pay Later to Completed may want to put it back to Pending Pay Later. From an accounting perspective we would want to shift funds from the Asset account back to Accounts Receivable. 

          Erik Hommel added a comment -

          I understand Joe Murray. I would reckon we would need to wait for comment by Björn Endres for the CiviSepa implications before any code is changed.

          Björn Endres added a comment -

          I think it's a bad idea to allow this. I can think of a range of scenarios where you would have a completed contribution trigger some kind of workflow (e.g. sending out an email, signing somebody up, etc). These workflows obviously would have to be aware of the fact that those contributions could later be cancelled/refunded at any point, and cater for that. But I doubt that setting the status back to Pending has been considered anywhere, especially since it wasn't allowed so far. I think simply enabling that now could have serious implications for such existing workflows.

          That being said, I don't think CiviSepa/CiviBanking would be affected any more than any other such workflow. It definitely wouldn't crash, but it could lead to undefined states. Which IMHO should be avoided.

          Erik Hommel added a comment -

          I would agree with Björn Endres that it would introduce a new situation and potentially will need all kinds of changes in existing extensions and workflows that do not expect this to be possible. I know at least of 2 extensions (specific) with my customers that are based on the current behaviour (once a contribution is completed you can not "undo" that other than cancelling the contribution and creating a new one). They would need signification re-thought if it does become possible to "undo" the completion.

          Is it not possible to solve your problem with the cancel and new flow Joe Murray?

          Erik Hommel added a comment -

          Updated the type, based on the discussion above I do not classify this as a bug!

            People

            • Assignee:
              Joe Murray
              Reporter:
              Andrew West

              Dates

              • Created:
                Updated: