Page MenuHomePhabricator

MetaMTA - add support for "Default Author"
ClosedPublic

Authored by btrahan on Jan 20 2015, 8:45 PM.
Tags
None
Referenced Files
F14063270: D11446.diff
Mon, Nov 18, 5:35 PM
F14055228: D11446.diff
Sat, Nov 16, 9:37 AM
F14043432: D11446.diff
Tue, Nov 12, 10:11 AM
F14029752: D11446.id27768.diff
Fri, Nov 8, 9:11 PM
F14027163: D11446.diff
Fri, Nov 8, 5:46 AM
F13983615: D11446.diff
Sun, Oct 20, 7:33 AM
F13982966: D11446.id27770.diff
Sun, Oct 20, 3:13 AM
F13982445: D11446.id27768.diff
Sat, Oct 19, 11:21 PM
Subscribers

Details

Summary

Ref T5952. This adds support for a "default author" and deploys it on Maniphest.

Test Plan

used augmented (by this diff) bin/mail receive-test to test creation via an application email with a default author configured and no author specified. a task was created with the author as the default author i configured.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to MetaMTA - add support for "Default Author".
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
src/applications/maniphest/mail/ManiphestCreateMailReceiver.php
21

I couldn't figure out an easy way to stick this logic in the base class without rewriting a bunch. I figure this side effect thing is pretty bad but maybe okay. Maybe the best path forward will suss itself out later as I add more applications to this new way of doing things?

Open for suggestions now of course.

src/applications/metamta/storage/PhabricatorMetaMTAApplicationEmail.php
13

I will change this constant to CONFIG_DEFAULT_AUTHOR

src/applications/meta/controller/PhabricatorApplicationEditEmailController.php
285–286

whoops, should use $title here

Okay, done dissecting this thing myself now. :D

resources/sql/autopatches/20150120.maniphestdefaultauthor.php
2–22

Forgot to deprecate this option in the UI...

fixed stuff from self review, except didn't come up with a better way to do the setApplicationEmail thing

epriestley edited edge metadata.

The setApplicationEmail() stuff seems reasonable to me.

I think we can probably remove this entirely (it should be completely obsoleted by phabricator.allow-email-users already?) but that would (a) break installs and (b) I'm not confident the phabricator.allow-email-users stuff actually works 100%, so retaining it for now make sense. We should be able to throw this all away eventually.

src/applications/metamta/storage/PhabricatorMetaMTAApplicationEmail.php
60

For consistency with other similar methods, consider , $default = null and then passing $default to idx().

This revision is now accepted and ready to land.Jan 28 2015, 7:09 PM
btrahan edited edge metadata.

add $default = null parameter for consistency / utility down the road

This revision was automatically updated to reflect the committed changes.