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 Severity Location Code Message Advice src/applications/fund/xaction/FundInitiativeBackerTransaction.php:34 XHP16 TODO Comment Advice src/applications/fund/xaction/FundInitiativeRefundTransaction.php:36 XHP16 TODO Comment - Unit
Tests Passed - Build Status
Buildable 16828 Build 22460: Run Core Tests Build 22459: arc lint + arc unit
Event Timeline
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". |
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 | ||
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. |