Page MenuHomePhabricator

Add workboard trigger rule for changing task priority
ClosedPublic

Authored by amckinley on Mar 26 2019, 6:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 6:20 PM
Unknown Object (File)
Sun, Nov 17, 10:06 AM
Unknown Object (File)
Sat, Nov 16, 9:46 PM
Unknown Object (File)
Thu, Nov 7, 4:46 AM
Unknown Object (File)
Oct 17 2024, 8:07 PM
Unknown Object (File)
Oct 11 2024, 10:04 PM
Unknown Object (File)
Oct 7 2024, 2:55 PM
Unknown Object (File)
Sep 21 2024, 1:50 PM
Subscribers

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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.

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.