Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 917
    • Issues 917
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #2206

Closed
Open
Opened Nov 22, 2020 by eileen@eileen🎱Owner

Fix pledge action on failed/ cancelled contribution

In digging into #927 the pledge action appears to be incorrect to me when a contribution is cancelled or fails.

Currently there is a call to update the pledge which might reset it's status back to overdue or whatever. However if the pledge has 4 payments one of those is still attached to the failed payment and is not available in the UI to have a new payment added to it. It is effectively voided rather than released and needs a database intervention.

This is a pretty obscure scenario so rarely reached. However, I propose that it should be

  1. if a contribution attached to a plege payment is cancelled or fails then the contribution should be unattached (contribution_id set to NULL) and the pledge_payment field actual_amount reset to null and pledge payment status reset to Pending .
  2. I think this can be done whenever a contribution is updated with a status of failed or cancelled and there is a pledge payment related to it (this means we are saying we would clean up on null edit - which we do with a number of other things we deem to be part of the data model and we don't have to look up so see if status is changing - just that status is cancelled/failed & the pledge_payment exists).
  3. I think this should be moved back out of the extension into being called directly from contibution.create action. The reason is that I think this is actually our data model as opposed to a business process. The way the UI works & the fact no additional payment row is created suggests there was never an intent to have non-payments assigned to pledge payment rows.
Edited Nov 22, 2020 by eileen
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#2206