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
F13050673: D20325.diff
Fri, Apr 19, 3:06 AM
Unknown Object (File)
Wed, Apr 17, 11:21 AM
Unknown Object (File)
Thu, Apr 11, 8:13 AM
Unknown Object (File)
Wed, Apr 10, 2:30 PM
Unknown Object (File)
Sun, Mar 31, 11:01 AM
Unknown Object (File)
Wed, Mar 27, 7:19 PM
Unknown Object (File)
Mon, Mar 25, 2:22 AM
Unknown Object (File)
Feb 3 2024, 9:51 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.