Page MenuHomePhabricator

Drive Herald edits via transactions
ClosedPublic

Authored by avivey on Mar 28 2016, 8:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 2:08 AM
Unknown Object (File)
Tue, Apr 16, 7:19 PM
Unknown Object (File)
Thu, Apr 11, 6:01 PM
Unknown Object (File)
Wed, Apr 3, 8:27 AM
Unknown Object (File)
Mar 20 2024, 1:31 PM
Unknown Object (File)
Mar 19 2024, 12:10 AM
Unknown Object (File)
Feb 16 2024, 3:51 AM
Unknown Object (File)
Feb 10 2024, 9:49 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.