How to change workflow in the Maniphest


#1

I have specific bug-tracking workflow in my company. (government one - a lot of decsion makers on different management levels, a lot of papers to make anything, Everything must be documented for eventual control, ya know ;))
I need to implement such workflow to move bugs moving between management, analysts, programmers, and back up to management when closed. Additionaly the variety of close statuses :wink:
Could you help me, how can I change default way? (on different steps different groups of users should have different access to the bug, and each user with RW access on each step need to have privillege to change bug’s state)


#2

@pmodlins: Have you looked at / experimented with Spaces for such access separation? See https://secure.phabricator.com/book/phabricator/article/spaces/


#3

I don’t think there’s an easy way to do this.

Maniphest currently does have some detailed access controls (“Edit Task Status”, “Can Assign Tasks”, etc), but this is actually legacy, and might melt away with ApplicationEditor, and there’s no way to configure it on a per-task level.

There are similar high-level concepts in “Quorum” (https://secure.phabricator.com/T9515) and “Release” (https://secure.phabricator.com/T9530), but both tools are in the far-future section of planning.

Here’s a rough idea about how you could implement this:

  1. Modify ManiphestEditEngine, editing buildCustomEditFields() and adding newBuiltinEngineConfigurations(), to make some fields only editable by members of some Project, depending on task status (Or possibly a custom worfkflow-state field).
  2. Update ManiphestTaskStatusTransaction to only allow status changes that are permitted in your workflow.
  3. add custom actions to Maniphest that correspond to each transition in your workflow - see PhabricatorFlagsUIEventListener for an example on how to implement this.
    This will add an action item in the actions section on the right side - you’ll need to figure out how to add a similar action in the action box (where you can currently change status, etc).