Page MenuHomePhabricator

Batch edit of Maniphest custom fields
Closed, ResolvedPublic

Description

I have a custom Manphest field that looks like this:

{
  "rebs:deployed": {
    "search": true, 
    "name": "Deployed", 
    "default": "Nope", 
    "required": false, 
    "type": "select", 
    "options": [
      "Nope", 
      "Staging", 
      "Production"
    ]
  }
}

I would like to be able to batch edit a set of Maniphest tasks and set "Deployed" to a specific value for all of them at once.

Event Timeline

felix.rently raised the priority of this task from to Needs Triage.
felix.rently updated the task description. (Show Details)
felix.rently added a project: Phabricator.
felix.rently added a subscriber: felix.rently.
chad triaged this task as Normal priority.Jul 23 2014, 2:32 PM
chad edited projects, added Maniphest, Custom Fields; removed Phabricator.

I haven't contributed anything to Phabricator yet, but this is a feature we need, so I might be able to take a stab at this. Any feedback whether this is something that will be accepted, and how complicated it might be?

I've marked D18879 as fixing this. It does not extend bulk editor support to all custom field types, but makes such support generally trivial. We'll fill in and test more field types as use cases arise.

how complicated it might be?

Pretty complicated.

$ git diff origin/master --stat
 resources/celerity/map.php                         |  72 ++--
 src/__phutil_library_map__.php                     |  22 +-
 .../PhabricatorBadgesBadgeQualityTransaction.php   |   6 +-
 src/applications/base/PhabricatorApplication.php   |   4 +
 .../editor/DiffusionRepositoryEditEngine.php       |   2 +-
 .../PhabricatorManiphestApplication.php            |   2 +-
 .../maniphest/bulk/ManiphestTaskBulkEngine.php     |  54 +++
 .../bulk/ManiphestTaskEditBulkJobType.php          | 303 ---------------
 .../controller/ManiphestBatchEditController.php    | 226 -----------
 .../controller/ManiphestBulkEditController.php     |  32 ++
 .../controller/ManiphestReportController.php       |   2 +-
 .../maniphest/editor/ManiphestEditEngine.php       |   5 +
 .../maniphest/view/ManiphestTaskResultListView.php |   2 +-
 .../PhabricatorProjectBoardViewController.php      |  23 +-
 .../PhabricatorProjectsEditEngineExtension.php     |  20 +-
 ...PhabricatorSubscriptionsEditEngineExtension.php |  20 +-
 .../transactions/bulk/PhabricatorBulkEngine.php    | 432 +++++++++++++++++++++
 .../bulk/PhabricatorEditEngineBulkJobType.php      | 101 +++++
 .../transactions/bulk/type/BulkParameterType.php   |  34 ++
 .../bulk/type/BulkRemarkupParameterType.php        |  10 +
 .../bulk/type/BulkSelectParameterType.php          |  29 ++
 .../bulk/type/BulkStringParameterType.php          |  10 +
 .../bulk/type/BulkTokenizerParameterType.php       |  40 ++
 .../editengine/PhabricatorEditEngine.php           | 139 ++++++-
 .../editfield/PhabricatorEditField.php             | 100 ++++-
 .../editfield/PhabricatorPHIDListEditField.php     |  10 +-
 .../editfield/PhabricatorRemarkupEditField.php     |   4 +
 .../editfield/PhabricatorSelectEditField.php       |   5 +
 .../editfield/PhabricatorTextEditField.php         |   4 +
 .../editfield/PhabricatorTokenizerEditField.php    |   8 +
 .../edittype/PhabricatorCommentEditType.php        |   4 +
 .../edittype/PhabricatorEdgeEditType.php           |   9 +
 .../transactions/edittype/PhabricatorEditType.php  |  52 ++-
 .../PhabricatorCommentEditEngineExtension.php      |   1 +
 .../PhabricatorSubtypeEditEngineExtension.php      |   6 +-
 .../editor/PhabricatorCustomFieldEditField.php     |  30 +-
 .../editor/PhabricatorCustomFieldEditType.php      |  10 +
 .../customfield/field/PhabricatorCustomField.php   |  27 ++
 .../PhabricatorStandardCustomFieldSelect.php       |   5 +
 .../PhabricatorStandardCustomFieldTokenizer.php    |   7 +
 src/view/phui/PHUIObjectItemView.php               |  57 +++
 .../css/application/maniphest/batch-editor.css     |  17 -
 .../css/phui/object-item/phui-oi-list-view.css     |  23 ++
 webroot/rsrc/css/phui/phui-box.css                 |   4 +
 webroot/rsrc/css/phui/phui-bulk-editor.css         |  27 ++
 .../application/maniphest/behavior-batch-editor.js | 158 --------
 .../maniphest/behavior-batch-selector.js           |  11 +-
 webroot/rsrc/js/core/behavior-bulk-editor.js       | 113 ++++++
 .../rsrc/js/phui/behavior-phui-selectable-list.js  |  44 +++
 webroot/rsrc/js/phuix/PHUIXFormControl.js          |  38 ++
 50 files changed, 1563 insertions(+), 801 deletions(-)