Page MenuHomePhabricator

Update Fund for modular transactions
ClosedPublic

Authored by chad on Apr 23 2017, 6:27 PM.
Tags
None
Referenced Files
F13134911: D17782.id42819.diff
Thu, May 2, 5:54 AM
F13134910: D17782.id42904.diff
Thu, May 2, 5:54 AM
F13134311: D17782.diff
Thu, May 2, 2:21 AM
Unknown Object (File)
Mon, Apr 29, 2:08 PM
Unknown Object (File)
Wed, Apr 24, 10:12 PM
Unknown Object (File)
Thu, Apr 11, 7:31 AM
Unknown Object (File)
Mar 29 2024, 6:00 PM
Unknown Object (File)
Mar 29 2024, 5:23 PM
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
Branch
fund-xaction (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16746
Build 22339: Run Core Tests
Build 22338: arc lint + arc unit

Event Timeline

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

Stray phlog().

src/applications/fund/xaction/FundInitiativeBackerTransaction.php
23–25

Unused.

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

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

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

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
14–18

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.