Page MenuHomePhabricator

Add workboard trigger rule for changing task priority
ClosedPublic

Authored by amckinley on Mar 26 2019, 6:33 PM.

Details

Summary

Ref T13269. This is a copy/paste/find-and-replace-all of the status rule added by D20288.

Test Plan

Made some triggers, moved some tasks, edited some triggers. Grepped for the word "status" in the new file.

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

amckinley created this revision.Mar 26 2019, 6:33 PM
amckinley requested review of this revision.Mar 26 2019, 6:35 PM
amckinley added inline comments.Mar 26 2019, 6:36 PM
src/applications/project/trigger/PhabricatorProjectTriggerManiphestPriorityRule.php
31

The <select> element uses the numeric priorities (because that's what ManiphestTaskPriority::getTaskPriorityMap() returns), but I turn that back into a keyword here because that's what the priority transaction expects. Otherwise this is identical to the equivalent task status trigger rule does.

epriestley accepted this revision.Mar 26 2019, 6:38 PM

Looks great to me.

I'm not sure the "open/close" and "raise/lower" actions will end up being a good idea, but if they are we might end up with this kind of class tree:

  • abstract PriorityRule
    • final SetPriorityRule
    • final RaisePriorityRule
    • final LowerPriorityRule

...where the subclasses tweak strings and offer a subset of statuses/priorities (you can't "close" as an open status, for instance). But this is strictly a step toward that and I'm not sure open/close/raise/lower are actually useful, anyway.

This revision is now accepted and ready to land.Mar 26 2019, 6:38 PM
This revision was automatically updated to reflect the committed changes.