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)
Fri, Nov 22, 1:03 AM
Unknown Object (File)
Mon, Nov 18, 3:20 AM
Unknown Object (File)
Sun, Nov 17, 6:03 PM
Unknown Object (File)
Fri, Nov 15, 7:03 AM
Unknown Object (File)
Sun, Nov 10, 3:41 AM
Unknown Object (File)
Tue, Nov 5, 10:59 PM
Unknown Object (File)
Tue, Oct 29, 9:20 AM
Unknown Object (File)
Oct 24 2024, 7:05 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
Branch
fund-xaction (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16828
Build 22460: Run Core Tests
Build 22459: arc lint + arc unit

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

Can probably nuke this now.

src/applications/fund/xaction/FundBackerRefundTransaction.php
12–14

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

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

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

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

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.