Page MenuHomePhabricator

Drive Herald edits via transactions
ClosedPublic

Authored by avivey on Mar 28 2016, 8:51 PM.
Tags
None
Referenced Files
F13218990: D15542.id.diff
Sat, May 18, 2:24 PM
F13180376: D15542.id37468.diff
Wed, May 8, 11:29 PM
F13180375: D15542.id37470.diff
Wed, May 8, 11:29 PM
F13178363: D15542.diff
Wed, May 8, 8:22 PM
Unknown Object (File)
Thu, Apr 25, 2:08 AM
Unknown Object (File)
Apr 16 2024, 7:19 PM
Unknown Object (File)
Apr 11 2024, 6:01 PM
Unknown Object (File)
Apr 3 2024, 8:27 AM
Subscribers

Details

Summary

This is kinda bad in terms of UI (It just makes a json of the thing and diffs that), but it's a start.

Test Plan

edit rule, create rule, add/remove/edit conditions, actions

Diff Detail

Repository
rP Phabricator
Branch
herald-tx
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 11335
Build 14104: Run Core Tests
Build 14103: arc lint + arc unit

Event Timeline

avivey retitled this revision from to Drive Herald edits via transactions.
avivey updated this object.
avivey edited the test plan for this revision. (Show Details)
avivey added a reviewer: epriestley.

This actually fails some of the tests.

avivey requested a review of this revision.Mar 28 2016, 9:19 PM

What I thought was a failing test is just strange validation error (It throws an exception if you submit a rule with no actions/conditions; Just reporting them as "errors" makes things break later; Maybe do this validation in the client side?).

epriestley edited edge metadata.

For consistency, I think TYPE_RENAME should just be TYPE_NAME. There's a special awkward case when creating a rule right now:

Screen Shot 2016-03-28 at 2.45.56 PM.png (44×392 px, 7 KB)

You could technically ignore that because it will be fixed by EditEngine, but maybe worth special casing it in the meantime since it could be a while before EditEngine arrives here.

In an ideal world it might be nice for this to be split into smaller pieces (repetition, match rule, conditions, actions?) but I think this is a big step forward and it's not particularly difficult to split apart later.

src/applications/herald/storage/HeraldRuleTransaction.php
80

Maybe include a TYPE_EDIT here -- the default value that it's picking up is actually fairly reasonable, but can't be translated.

This revision is now accepted and ready to land.Mar 28 2016, 9:50 PM
avivey edited edge metadata.
  • s/rename/name/
  • change first "renamed" transaction to "created".

The first "Edited" tx still shows as "edited", but this is harder to test for.

This revision was automatically updated to reflect the committed changes.