mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Support Spaces in Maniphest batch editor
Summary: Ref T8498. This editor is an artifact of the Old World at this point, but it still works fine. Test Plan: Moved tasks between spaces using the batch editor. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8498 Differential Revision: https://secure.phabricator.com/D13249
This commit is contained in:
parent
b978f576be
commit
4faef88376
3 changed files with 38 additions and 11 deletions
|
@ -374,7 +374,7 @@ return array(
|
|||
'rsrc/js/application/herald/HeraldRuleEditor.js' => 'b2cae298',
|
||||
'rsrc/js/application/herald/PathTypeahead.js' => 'f7fc67ec',
|
||||
'rsrc/js/application/herald/herald-rule-editor.js' => '7ebaeed3',
|
||||
'rsrc/js/application/maniphest/behavior-batch-editor.js' => 'f5d1233b',
|
||||
'rsrc/js/application/maniphest/behavior-batch-editor.js' => '782ab6e7',
|
||||
'rsrc/js/application/maniphest/behavior-batch-selector.js' => '7b98d7c5',
|
||||
'rsrc/js/application/maniphest/behavior-line-chart.js' => '88f0c5b3',
|
||||
'rsrc/js/application/maniphest/behavior-list-edit.js' => 'a9f88de2',
|
||||
|
@ -587,7 +587,7 @@ return array(
|
|||
'javelin-behavior-lightbox-attachments' => 'f8ba29d7',
|
||||
'javelin-behavior-line-chart' => '88f0c5b3',
|
||||
'javelin-behavior-load-blame' => '42126667',
|
||||
'javelin-behavior-maniphest-batch-editor' => 'f5d1233b',
|
||||
'javelin-behavior-maniphest-batch-editor' => '782ab6e7',
|
||||
'javelin-behavior-maniphest-batch-selector' => '7b98d7c5',
|
||||
'javelin-behavior-maniphest-list-editor' => 'a9f88de2',
|
||||
'javelin-behavior-maniphest-subpriority-editor' => '84845b5b',
|
||||
|
@ -1385,6 +1385,14 @@ return array(
|
|||
'javelin-util',
|
||||
'phabricator-busy',
|
||||
),
|
||||
'782ab6e7' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'phabricator-prefab',
|
||||
'multirow-row-manager',
|
||||
'javelin-json',
|
||||
),
|
||||
'7927a7d3' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-quicksand',
|
||||
|
@ -1967,14 +1975,6 @@ return array(
|
|||
'javelin-request',
|
||||
'phabricator-keyboard-shortcut',
|
||||
),
|
||||
'f5d1233b' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'phabricator-prefab',
|
||||
'multirow-row-manager',
|
||||
'javelin-json',
|
||||
),
|
||||
'f6555212' => array(
|
||||
'javelin-install',
|
||||
'javelin-reactornode',
|
||||
|
|
|
@ -88,6 +88,8 @@ final class ManiphestBatchEditController extends ManiphestController {
|
|||
$mailable_source->setViewer($viewer);
|
||||
$owner_source = new ManiphestAssigneeDatasource();
|
||||
$owner_source->setViewer($viewer);
|
||||
$spaces_source = id(new PhabricatorSpacesNamespaceDatasource())
|
||||
->setViewer($viewer);
|
||||
|
||||
require_celerity_resource('maniphest-batch-editor');
|
||||
Javelin::initBehavior(
|
||||
|
@ -112,6 +114,12 @@ final class ManiphestBatchEditController extends ManiphestController {
|
|||
'placeholder' => $mailable_source->getPlaceholderText(),
|
||||
'browseURI' => $mailable_source->getBrowseURI(),
|
||||
),
|
||||
'spaces' => array(
|
||||
'src' => $spaces_source->getDatasourceURI(),
|
||||
'placeholder' => $spaces_source->getPlaceholderText(),
|
||||
'browseURI' => $spaces_source->getBrowseURI(),
|
||||
'limit' => 1,
|
||||
),
|
||||
),
|
||||
'input' => 'batch-form-actions',
|
||||
'priorityMap' => ManiphestTaskPriority::getTaskPriorityMap(),
|
||||
|
@ -201,6 +209,7 @@ final class ManiphestBatchEditController extends ManiphestController {
|
|||
'remove_project' => PhabricatorTransactions::TYPE_EDGE,
|
||||
'add_ccs' => PhabricatorTransactions::TYPE_SUBSCRIBERS,
|
||||
'remove_ccs' => PhabricatorTransactions::TYPE_SUBSCRIBERS,
|
||||
'space' => PhabricatorTransactions::TYPE_SPACE,
|
||||
);
|
||||
|
||||
$edge_edit_types = array(
|
||||
|
@ -246,6 +255,10 @@ final class ManiphestBatchEditController extends ManiphestController {
|
|||
case PhabricatorTransactions::TYPE_SUBSCRIBERS:
|
||||
$current = $task->getSubscriberPHIDs();
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_SPACE:
|
||||
$current = PhabricatorSpacesNamespaceQuery::getObjectSpacePHID(
|
||||
$task);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,6 +273,12 @@ final class ManiphestBatchEditController extends ManiphestController {
|
|||
continue 2;
|
||||
}
|
||||
break;
|
||||
case PhabricatorTransactions::TYPE_SPACE:
|
||||
if (empty($value)) {
|
||||
continue 2;
|
||||
}
|
||||
$value = head($value);
|
||||
break;
|
||||
case ManiphestTransaction::TYPE_OWNER:
|
||||
if (empty($value)) {
|
||||
continue 2;
|
||||
|
|
|
@ -24,12 +24,14 @@ JX.behavior('maniphest-batch-editor', function(config) {
|
|||
'add_comment': 'Comment',
|
||||
'assign': 'Assign',
|
||||
'add_ccs' : 'Add CCs',
|
||||
'remove_ccs' : 'Remove CCs'
|
||||
'remove_ccs' : 'Remove CCs',
|
||||
'space': 'Shift to Space'
|
||||
});
|
||||
|
||||
var proj_tokenizer = build_tokenizer(config.sources.project);
|
||||
var owner_tokenizer = build_tokenizer(config.sources.owner);
|
||||
var cc_tokenizer = build_tokenizer(config.sources.cc);
|
||||
var space_tokenizer = build_tokenizer(config.sources.spaces);
|
||||
|
||||
var priority_select = JX.Prefab.renderSelect(config.priorityMap);
|
||||
var status_select = JX.Prefab.renderSelect(config.statusMap);
|
||||
|
@ -60,6 +62,12 @@ JX.behavior('maniphest-batch-editor', function(config) {
|
|||
return JX.keys(owner_tokenizer.object.getTokens());
|
||||
};
|
||||
break;
|
||||
case 'space':
|
||||
JX.DOM.setContent(cell, space_tokenizer.template);
|
||||
vfunc = function() {
|
||||
return JX.keys(space_tokenizer.object.getTokens());
|
||||
};
|
||||
break;
|
||||
case 'add_comment':
|
||||
JX.DOM.setContent(cell, comment_input);
|
||||
vfunc = function() {
|
||||
|
|
Loading…
Reference in a new issue