Fixes T12627. Updates FundInitiative and FundBacker with modular transactions.
Details
Details
- Reviewers
epriestley - Maniphest Tasks
- T12627: Update Fund for Modular Transactions
- Commits
- rPa9604c4604b7: Update Fund for modular transactions
Create an Initiative, back it with fake monies, close initiative, reopen, edit various fields.
Diff Detail
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
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". |
Comment Actions
This doesn't quite fully work. I can't seem to update the FundInitiative total funding count.
Comment Actions
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().
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. |