Page MenuHomePhabricator

Drive Herald edits via transactions
ClosedPublic

Authored by avivey on Mar 28 2016, 8:51 PM.
Tags
None
Referenced Files
F14416714: D15542.diff
Tue, Dec 24, 10:55 PM
Unknown Object (File)
Sun, Dec 15, 11:32 AM
Unknown Object (File)
Tue, Dec 3, 12:09 PM
Unknown Object (File)
Mon, Dec 2, 4:02 PM
Unknown Object (File)
Nov 19 2024, 5:24 PM
Unknown Object (File)
Nov 16 2024, 11:46 AM
Unknown Object (File)
Nov 12 2024, 4:10 AM
Unknown Object (File)
Nov 9 2024, 11:41 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.