Page MenuHomePhabricator

Update Fund for modular transactions
ClosedPublic

Authored by chad on Apr 23 2017, 6:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 7:31 AM
Unknown Object (File)
Fri, Mar 29, 6:00 PM
Unknown Object (File)
Fri, Mar 29, 5:23 PM
Unknown Object (File)
Mon, Mar 25, 8:24 PM
Unknown Object (File)
Feb 27 2024, 6:14 PM
Unknown Object (File)
Feb 22 2024, 6:50 PM
Unknown Object (File)
Feb 13 2024, 6:39 PM
Unknown Object (File)
Jan 23 2024, 11:01 AM
Subscribers

Details

Summary

Fixes T12627. Updates FundInitiative and FundBacker with modular transactions.

Test Plan

Create an Initiative, back it with fake monies, close initiative, reopen, edit various fields.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added inline comments.
src/applications/fund/editor/FundInitiativeEditor.php
31

Stray phlog().

src/applications/fund/xaction/FundInitiativeBackerTransaction.php
24–26

Unused.

src/applications/fund/xaction/FundInitiativeMerchantTransaction.php
19

I think there's just a renderHandle() instead of renderHandleList() to simplify this slightly?

src/applications/fund/xaction/FundInitiativeNameTransaction.php
27

Probably remove the word "initiative".

This revision is now accepted and ready to land.May 1 2017, 6:39 PM

This doesn't quite fully work. I can't seem to update the FundInitiative total funding count.

It was late, so I figured I'd take another crack at it in a day.

Oh, applyCustomInternalTransaction() won't get called for ModularTransactions.

Probably something like:

  • Extend Backer and Refund from a new abstract FundInitiativeChangeAmountOfMoneyTransaction.
  • Put a method on that like protected changeTheAmountOfMoney($amount, $is_refund).
  • Move the editing logic there, have Backer and Refund implement applyInternal... and call $this->changeTheAmountOfMoney().
chad planned changes to this revision.May 1 2017, 7:45 PM
chad retitled this revision from [DRAFT] Modernize Fund with Modular Transactions to [DRAFT] Update Fund for modular transactions.May 4 2017, 3:16 AM

I'm about done here, but unsure how to "refund" a donation?

oh i think i see what I did. nevermind.

This revision is now accepted and ready to land.May 5 2017, 5:50 PM
chad requested review of this revision.May 5 2017, 5:51 PM
chad edited edge metadata.

Just re-queuing this.

chad retitled this revision from [DRAFT] Update Fund for modular transactions to Update Fund for modular transactions.May 5 2017, 5:53 PM
chad edited the summary of this revision. (Show Details)
chad edited the test plan for this revision. (Show Details)
epriestley added inline comments.
src/applications/fund/editor/FundBackerEditor.php
13–14

Can probably nuke this now.

src/applications/fund/xaction/FundBackerRefundTransaction.php
13–15

(Is this abstract so we have to implement it?)

src/applications/fund/xaction/FundInitiativeBackerTransaction.php
36–37

I think you should be able to $this->getEditor()->getContentSource().

src/applications/fund/xaction/FundInitiativeRefundTransaction.php
37

As above.

This revision is now accepted and ready to land.May 5 2017, 5:56 PM
This revision was automatically updated to reflect the committed changes.
chad marked 2 inline comments as done.