-
Notifications
You must be signed in to change notification settings - Fork 0
ASESPRT-783: Fix Status For 0 Amount Contributions #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes an issue where contributions with a zero amount were incorrectly created with "pending" status instead of "completed" status. The fix ensures that the contribution payment listener ignores zero-amount contributions, allowing them to maintain their correct "completed" status.
Key Changes:
- Added a filter to exclude zero-amount contributions from status recalculation logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Civi/Financeextras/Event/Listener/ContributionPaymentUpdatedListener.php
Show resolved
Hide resolved
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
cb011fb to
9efe6b7
Compare
9efe6b7 to
eab093c
Compare
erawat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shahrukh-compuco The PR looks good, approved BUT can you update the description to link to the actual PR or commit not the workstream's merge PR.
done |
Overview
Currently when a contribution of amount 0 is created either through membership purchase or event registration it gets created with pending status. This PR fixes this issue and now 0 amount contributions will get created with completed status.
Technical Details
In this commit we added an event listener that runs whenever a payment is made or contribution is created or updated, it calculates and updates the contribution status based upon total amount and paid amount. But we dont want it to run for contributions that have amount as 0 so we don't update the status for 0 amount contributions as these should always be in completed status since there is no payment to be made.