Skip to content
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

DON-998: Stop assuming donations will always have transaction IDs #1157

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

bdsl
Copy link
Contributor

@bdsl bdsl commented Jan 7, 2025

This throw causes crashes in the regular giving form, and the assumption that almost every donation will have a non-null transaction ID stops being true when we launch regular giving, as for the 2nd and 3rd donations of each mandate there will be 1 and 2 month delays between donation creation and transaction id creation.

@bdsl bdsl force-pushed the DON-998-allow-donations-without-transaction-id branch 3 times, most recently from 8ed61f4 to 9a97084 Compare January 7, 2025 17:25
This throw causes crashes in the regular giving form, and the assumption
that almost every donation will have a non-null transaction ID stops
being true when we launch regular giving, as for the 2nd and 3rd
donations of each mandate there will be 1 and 2 month delays between
donation creation and transaction id creation.
@bdsl bdsl force-pushed the DON-998-allow-donations-without-transaction-id branch from 9a97084 to abadb0d Compare January 7, 2025 17:35
@bdsl bdsl marked this pull request as ready for review January 7, 2025 17:37
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 74.36%. Comparing base (064f96d) to head (1ba369e).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
src/Domain/DonationService.php 75.00% 3 Missing ⚠️
src/Application/Actions/Donations/Update.php 81.81% 2 Missing ⚠️
src/Application/Actions/Donations/Confirm.php 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1157      +/-   ##
===========================================
+ Coverage    74.28%   74.36%   +0.07%     
===========================================
  Files          128      128              
  Lines         5588     5601      +13     
===========================================
+ Hits          4151     4165      +14     
+ Misses        1437     1436       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

NoelLH
NoelLH previously approved these changes Jan 7, 2025
Copy link
Contributor

@NoelLH NoelLH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice simplifications along with the fix, looks good!

* NOT include an assertion that the donation has a transaction ID, as that is only required for confirmation, not
* for pre-auth.
*/
private function assertionsForConfirmOrPreAuth(): \Assert\LazyAssertion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Liking that these end up very clear in terms of what they allow, and DRY

@bdsl
Copy link
Contributor Author

bdsl commented Jan 7, 2025

Nice simplifications along with the fix, looks good!

Thanks! I think I'll wait until after #1151 is merged before merging this to avoid creating merge conflicts over there.

@bdsl bdsl force-pushed the DON-998-allow-donations-without-transaction-id branch from 3687710 to 1ba369e Compare January 8, 2025 12:09
@bdsl bdsl merged commit d2e300f into develop Jan 8, 2025
1 of 2 checks passed
@bdsl bdsl deleted the DON-998-allow-donations-without-transaction-id branch January 8, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants