@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Delete old Maniphest edit controller

Summary:
Ref T9908. No more callsites. Also:

- Phurl a couple of documentation URIs.
- Get rid of "task:" in the global search since it doesn't really make sense anymore.

Test Plan: `grep`, edited/created tasks.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9908

Differential Revision: https://secure.phabricator.com/D14716

+4 -771
-2
src/__phutil_library_map__.php
··· 1303 1303 'ManiphestTaskDescriptionHeraldField' => 'applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php', 1304 1304 'ManiphestTaskDetailController' => 'applications/maniphest/controller/ManiphestTaskDetailController.php', 1305 1305 'ManiphestTaskEditBulkJobType' => 'applications/maniphest/bulk/ManiphestTaskEditBulkJobType.php', 1306 - 'ManiphestTaskEditController' => 'applications/maniphest/controller/ManiphestTaskEditController.php', 1307 1306 'ManiphestTaskEditProController' => 'applications/maniphest/controller/ManiphestTaskEditProController.php', 1308 1307 'ManiphestTaskHasCommitEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasCommitEdgeType.php', 1309 1308 'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php', ··· 5304 5303 'ManiphestTaskDescriptionHeraldField' => 'ManiphestTaskHeraldField', 5305 5304 'ManiphestTaskDetailController' => 'ManiphestController', 5306 5305 'ManiphestTaskEditBulkJobType' => 'PhabricatorWorkerBulkJobType', 5307 - 'ManiphestTaskEditController' => 'ManiphestController', 5308 5306 'ManiphestTaskEditProController' => 'ManiphestController', 5309 5307 'ManiphestTaskHasCommitEdgeType' => 'PhabricatorEdgeType', 5310 5308 'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType',
-2
src/applications/maniphest/application/PhabricatorManiphestApplication.php
··· 57 57 'report/(?:(?P<view>\w+)/)?' => 'ManiphestReportController', 58 58 'batch/' => 'ManiphestBatchEditController', 59 59 'task/' => array( 60 - 'create/' => 'ManiphestTaskEditController', 61 - 'edit/(?P<id>[1-9]\d*)/' => 'ManiphestTaskEditController', 62 60 'descriptionpreview/' 63 61 => 'PhabricatorMarkupPreviewController', 64 62 ),
-757
src/applications/maniphest/controller/ManiphestTaskEditController.php
··· 1 - <?php 2 - 3 - final class ManiphestTaskEditController extends ManiphestController { 4 - 5 - public function handleRequest(AphrontRequest $request) { 6 - $viewer = $this->getViewer(); 7 - $id = $request->getURIData('id'); 8 - 9 - $response_type = $request->getStr('responseType', 'task'); 10 - $order = $request->getStr('order', PhabricatorProjectColumn::DEFAULT_ORDER); 11 - 12 - $can_edit_assign = $this->hasApplicationCapability( 13 - ManiphestEditAssignCapability::CAPABILITY); 14 - $can_edit_policies = $this->hasApplicationCapability( 15 - ManiphestEditPoliciesCapability::CAPABILITY); 16 - $can_edit_priority = $this->hasApplicationCapability( 17 - ManiphestEditPriorityCapability::CAPABILITY); 18 - $can_edit_projects = $this->hasApplicationCapability( 19 - ManiphestEditProjectsCapability::CAPABILITY); 20 - $can_edit_status = $this->hasApplicationCapability( 21 - ManiphestEditStatusCapability::CAPABILITY); 22 - $can_create_projects = PhabricatorPolicyFilter::hasCapability( 23 - $viewer, 24 - PhabricatorApplication::getByClass('PhabricatorProjectApplication'), 25 - ProjectCreateProjectsCapability::CAPABILITY); 26 - 27 - $parent_task = null; 28 - $template_id = null; 29 - 30 - if ($id) { 31 - $task = id(new ManiphestTaskQuery()) 32 - ->setViewer($viewer) 33 - ->requireCapabilities( 34 - array( 35 - PhabricatorPolicyCapability::CAN_VIEW, 36 - PhabricatorPolicyCapability::CAN_EDIT, 37 - )) 38 - ->withIDs(array($id)) 39 - ->needSubscriberPHIDs(true) 40 - ->needProjectPHIDs(true) 41 - ->executeOne(); 42 - if (!$task) { 43 - return new Aphront404Response(); 44 - } 45 - } else { 46 - $task = ManiphestTask::initializeNewTask($viewer); 47 - 48 - // We currently do not allow you to set the task status when creating 49 - // a new task, although now that statuses are custom it might make 50 - // sense. 51 - $can_edit_status = false; 52 - 53 - // These allow task creation with defaults. 54 - if (!$request->isFormPost()) { 55 - $task->setTitle($request->getStr('title')); 56 - 57 - if ($can_edit_projects) { 58 - $projects = $request->getStr('projects'); 59 - if ($projects) { 60 - $tokens = $request->getStrList('projects'); 61 - 62 - $type_project = PhabricatorProjectProjectPHIDType::TYPECONST; 63 - foreach ($tokens as $key => $token) { 64 - if (phid_get_type($token) == $type_project) { 65 - // If this is formatted like a PHID, leave it as-is. 66 - continue; 67 - } 68 - 69 - if (preg_match('/^#/', $token)) { 70 - // If this already has a "#", leave it as-is. 71 - continue; 72 - } 73 - 74 - // Add a "#" prefix. 75 - $tokens[$key] = '#'.$token; 76 - } 77 - 78 - $default_projects = id(new PhabricatorObjectQuery()) 79 - ->setViewer($viewer) 80 - ->withNames($tokens) 81 - ->execute(); 82 - $default_projects = mpull($default_projects, 'getPHID'); 83 - 84 - if ($default_projects) { 85 - $task->attachProjectPHIDs($default_projects); 86 - } 87 - } 88 - } 89 - 90 - if ($can_edit_priority) { 91 - $priority = $request->getInt('priority'); 92 - if ($priority !== null) { 93 - $priority_map = ManiphestTaskPriority::getTaskPriorityMap(); 94 - if (isset($priority_map[$priority])) { 95 - $task->setPriority($priority); 96 - } 97 - } 98 - } 99 - 100 - $task->setDescription($request->getStr('description')); 101 - 102 - if ($can_edit_assign) { 103 - $assign = $request->getStr('assign'); 104 - if (strlen($assign)) { 105 - $assign_user = id(new PhabricatorPeopleQuery()) 106 - ->setViewer($viewer) 107 - ->withUsernames(array($assign)) 108 - ->executeOne(); 109 - if (!$assign_user) { 110 - $assign_user = id(new PhabricatorPeopleQuery()) 111 - ->setViewer($viewer) 112 - ->withPHIDs(array($assign)) 113 - ->executeOne(); 114 - } 115 - 116 - if ($assign_user) { 117 - $task->setOwnerPHID($assign_user->getPHID()); 118 - } 119 - } 120 - } 121 - } 122 - 123 - $template_id = $request->getInt('template'); 124 - 125 - // You can only have a parent task if you're creating a new task. 126 - $parent_id = $request->getInt('parent'); 127 - if (strlen($parent_id)) { 128 - $parent_task = id(new ManiphestTaskQuery()) 129 - ->setViewer($viewer) 130 - ->withIDs(array($parent_id)) 131 - ->executeOne(); 132 - if (!$parent_task) { 133 - return new Aphront404Response(); 134 - } 135 - if (!$template_id) { 136 - $template_id = $parent_id; 137 - } 138 - } 139 - } 140 - 141 - $errors = array(); 142 - $e_title = true; 143 - 144 - $field_list = PhabricatorCustomField::getObjectFields( 145 - $task, 146 - PhabricatorCustomField::ROLE_EDIT); 147 - $field_list->setViewer($viewer); 148 - $field_list->readFieldsFromStorage($task); 149 - 150 - $aux_fields = $field_list->getFields(); 151 - 152 - $v_space = $task->getSpacePHID(); 153 - 154 - if ($request->isFormPost()) { 155 - $changes = array(); 156 - 157 - $new_title = $request->getStr('title'); 158 - $new_desc = $request->getStr('description'); 159 - $new_status = $request->getStr('status'); 160 - $v_space = $request->getStr('spacePHID'); 161 - 162 - if (!$task->getID()) { 163 - $workflow = 'create'; 164 - } else { 165 - $workflow = ''; 166 - } 167 - 168 - $changes[ManiphestTransaction::TYPE_TITLE] = $new_title; 169 - $changes[ManiphestTransaction::TYPE_DESCRIPTION] = $new_desc; 170 - 171 - if ($can_edit_status) { 172 - $changes[ManiphestTransaction::TYPE_STATUS] = $new_status; 173 - } else if (!$task->getID()) { 174 - // Create an initial status transaction for the burndown chart. 175 - // TODO: We can probably remove this once Facts comes online. 176 - $changes[ManiphestTransaction::TYPE_STATUS] = $task->getStatus(); 177 - } 178 - 179 - $owner_tokenizer = $request->getArr('assigned_to'); 180 - $owner_phid = reset($owner_tokenizer); 181 - 182 - if (!strlen($new_title)) { 183 - $e_title = pht('Required'); 184 - $errors[] = pht('Title is required.'); 185 - } 186 - 187 - $old_values = array(); 188 - foreach ($aux_fields as $aux_arr_key => $aux_field) { 189 - // TODO: This should be buildFieldTransactionsFromRequest() once we 190 - // switch to ApplicationTransactions properly. 191 - 192 - $aux_old_value = $aux_field->getOldValueForApplicationTransactions(); 193 - $aux_field->readValueFromRequest($request); 194 - $aux_new_value = $aux_field->getNewValueForApplicationTransactions(); 195 - 196 - // TODO: We're faking a call to the ApplicaitonTransaction validation 197 - // logic here. We need valid objects to pass, but they aren't used 198 - // in a meaningful way. For now, build User objects. Once the Maniphest 199 - // objects exist, this will switch over automatically. This is a big 200 - // hack but shouldn't be long for this world. 201 - $placeholder_editor = id(new PhabricatorUserProfileEditor()) 202 - ->setActor($viewer); 203 - 204 - $field_errors = $aux_field->validateApplicationTransactions( 205 - $placeholder_editor, 206 - PhabricatorTransactions::TYPE_CUSTOMFIELD, 207 - array( 208 - id(new ManiphestTransaction()) 209 - ->setOldValue($aux_old_value) 210 - ->setNewValue($aux_new_value), 211 - )); 212 - 213 - foreach ($field_errors as $error) { 214 - $errors[] = $error->getMessage(); 215 - } 216 - 217 - $old_values[$aux_field->getFieldKey()] = $aux_old_value; 218 - } 219 - 220 - if ($errors) { 221 - $task->setTitle($new_title); 222 - $task->setDescription($new_desc); 223 - $task->setPriority($request->getInt('priority')); 224 - $task->setOwnerPHID($owner_phid); 225 - $task->attachSubscriberPHIDs($request->getArr('cc')); 226 - $task->attachProjectPHIDs($request->getArr('projects')); 227 - } else { 228 - 229 - if ($can_edit_priority) { 230 - $changes[ManiphestTransaction::TYPE_PRIORITY] = 231 - $request->getInt('priority'); 232 - } 233 - if ($can_edit_assign) { 234 - $changes[ManiphestTransaction::TYPE_OWNER] = $owner_phid; 235 - } 236 - 237 - $changes[PhabricatorTransactions::TYPE_SUBSCRIBERS] = 238 - array('=' => $request->getArr('cc')); 239 - 240 - if ($can_edit_projects) { 241 - $projects = $request->getArr('projects'); 242 - $changes[PhabricatorTransactions::TYPE_EDGE] = 243 - $projects; 244 - $column_phid = $request->getStr('columnPHID'); 245 - // allow for putting a task in a project column at creation -only- 246 - if (!$task->getID() && $column_phid && $projects) { 247 - $column = id(new PhabricatorProjectColumnQuery()) 248 - ->setViewer($viewer) 249 - ->withProjectPHIDs($projects) 250 - ->withPHIDs(array($column_phid)) 251 - ->executeOne(); 252 - if ($column) { 253 - $changes[ManiphestTransaction::TYPE_PROJECT_COLUMN] = 254 - array( 255 - 'new' => array( 256 - 'projectPHID' => $column->getProjectPHID(), 257 - 'columnPHIDs' => array($column_phid), 258 - ), 259 - 'old' => array( 260 - 'projectPHID' => $column->getProjectPHID(), 261 - 'columnPHIDs' => array(), 262 - ), 263 - ); 264 - } 265 - } 266 - } 267 - 268 - if ($can_edit_policies) { 269 - $changes[PhabricatorTransactions::TYPE_SPACE] = $v_space; 270 - $changes[PhabricatorTransactions::TYPE_VIEW_POLICY] = 271 - $request->getStr('viewPolicy'); 272 - $changes[PhabricatorTransactions::TYPE_EDIT_POLICY] = 273 - $request->getStr('editPolicy'); 274 - } 275 - 276 - $template = new ManiphestTransaction(); 277 - $transactions = array(); 278 - 279 - foreach ($changes as $type => $value) { 280 - $transaction = clone $template; 281 - $transaction->setTransactionType($type); 282 - if ($type == ManiphestTransaction::TYPE_PROJECT_COLUMN) { 283 - $transaction->setNewValue($value['new']); 284 - $transaction->setOldValue($value['old']); 285 - } else if ($type == PhabricatorTransactions::TYPE_EDGE) { 286 - $project_type = 287 - PhabricatorProjectObjectHasProjectEdgeType::EDGECONST; 288 - $transaction 289 - ->setMetadataValue('edge:type', $project_type) 290 - ->setNewValue( 291 - array( 292 - '=' => array_fuse($value), 293 - )); 294 - } else { 295 - $transaction->setNewValue($value); 296 - } 297 - $transactions[] = $transaction; 298 - } 299 - 300 - if ($aux_fields) { 301 - foreach ($aux_fields as $aux_field) { 302 - $transaction = clone $template; 303 - $transaction->setTransactionType( 304 - PhabricatorTransactions::TYPE_CUSTOMFIELD); 305 - $aux_key = $aux_field->getFieldKey(); 306 - $transaction->setMetadataValue('customfield:key', $aux_key); 307 - $old = idx($old_values, $aux_key); 308 - $new = $aux_field->getNewValueForApplicationTransactions(); 309 - 310 - $transaction->setOldValue($old); 311 - $transaction->setNewValue($new); 312 - 313 - $transactions[] = $transaction; 314 - } 315 - } 316 - 317 - if ($transactions) { 318 - $is_new = !$task->getID(); 319 - 320 - $event = new PhabricatorEvent( 321 - PhabricatorEventType::TYPE_MANIPHEST_WILLEDITTASK, 322 - array( 323 - 'task' => $task, 324 - 'new' => $is_new, 325 - 'transactions' => $transactions, 326 - )); 327 - $event->setUser($viewer); 328 - $event->setAphrontRequest($request); 329 - PhutilEventEngine::dispatchEvent($event); 330 - 331 - $task = $event->getValue('task'); 332 - $transactions = $event->getValue('transactions'); 333 - 334 - $editor = id(new ManiphestTransactionEditor()) 335 - ->setActor($viewer) 336 - ->setContentSourceFromRequest($request) 337 - ->setContinueOnNoEffect(true) 338 - ->applyTransactions($task, $transactions); 339 - 340 - $event = new PhabricatorEvent( 341 - PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK, 342 - array( 343 - 'task' => $task, 344 - 'new' => $is_new, 345 - 'transactions' => $transactions, 346 - )); 347 - $event->setUser($viewer); 348 - $event->setAphrontRequest($request); 349 - PhutilEventEngine::dispatchEvent($event); 350 - } 351 - 352 - 353 - if ($parent_task) { 354 - // TODO: This should be transactional now. 355 - id(new PhabricatorEdgeEditor()) 356 - ->addEdge( 357 - $parent_task->getPHID(), 358 - ManiphestTaskDependsOnTaskEdgeType::EDGECONST, 359 - $task->getPHID()) 360 - ->save(); 361 - $workflow = $parent_task->getID(); 362 - } 363 - 364 - if ($request->isAjax()) { 365 - switch ($response_type) { 366 - case 'card': 367 - $owner = null; 368 - if ($task->getOwnerPHID()) { 369 - $owner = id(new PhabricatorHandleQuery()) 370 - ->setViewer($viewer) 371 - ->withPHIDs(array($task->getOwnerPHID())) 372 - ->executeOne(); 373 - } 374 - $tasks = id(new ProjectBoardTaskCard()) 375 - ->setViewer($viewer) 376 - ->setTask($task) 377 - ->setOwner($owner) 378 - ->setCanEdit(true) 379 - ->getItem(); 380 - 381 - $column = id(new PhabricatorProjectColumnQuery()) 382 - ->setViewer($viewer) 383 - ->withPHIDs(array($request->getStr('columnPHID'))) 384 - ->executeOne(); 385 - if (!$column) { 386 - return new Aphront404Response(); 387 - } 388 - 389 - // re-load projects for accuracy as they are not re-loaded via 390 - // the editor 391 - $project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( 392 - $task->getPHID(), 393 - PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); 394 - $task->attachProjectPHIDs($project_phids); 395 - $remove_from_board = false; 396 - if (!in_array($column->getProjectPHID(), $project_phids)) { 397 - $remove_from_board = true; 398 - } 399 - 400 - $positions = id(new PhabricatorProjectColumnPositionQuery()) 401 - ->setViewer($viewer) 402 - ->withColumns(array($column)) 403 - ->execute(); 404 - $task_phids = mpull($positions, 'getObjectPHID'); 405 - 406 - $column_tasks = id(new ManiphestTaskQuery()) 407 - ->setViewer($viewer) 408 - ->withPHIDs($task_phids) 409 - ->execute(); 410 - 411 - if ($order == PhabricatorProjectColumn::ORDER_NATURAL) { 412 - // TODO: This is a little bit awkward, because PHP and JS use 413 - // slightly different sort order parameters to achieve the same 414 - // effect. It would be good to unify this a bit at some point. 415 - $sort_map = array(); 416 - foreach ($positions as $position) { 417 - $sort_map[$position->getObjectPHID()] = array( 418 - -$position->getSequence(), 419 - $position->getID(), 420 - ); 421 - } 422 - } else { 423 - $sort_map = mpull( 424 - $column_tasks, 425 - 'getPrioritySortVector', 426 - 'getPHID'); 427 - } 428 - 429 - $data = array( 430 - 'sortMap' => $sort_map, 431 - 'removeFromBoard' => $remove_from_board, 432 - ); 433 - break; 434 - case 'task': 435 - default: 436 - $tasks = $this->renderSingleTask($task); 437 - $data = array(); 438 - break; 439 - } 440 - return id(new AphrontAjaxResponse())->setContent( 441 - array( 442 - 'tasks' => $tasks, 443 - 'data' => $data, 444 - )); 445 - } 446 - 447 - $redirect_uri = '/T'.$task->getID(); 448 - 449 - if ($workflow) { 450 - $redirect_uri .= '?workflow='.$workflow; 451 - } 452 - 453 - return id(new AphrontRedirectResponse()) 454 - ->setURI($redirect_uri); 455 - } 456 - } else { 457 - if (!$task->getID()) { 458 - $task->attachSubscriberPHIDs(array( 459 - $viewer->getPHID(), 460 - )); 461 - if ($template_id) { 462 - $template_task = id(new ManiphestTaskQuery()) 463 - ->setViewer($viewer) 464 - ->withIDs(array($template_id)) 465 - ->needSubscriberPHIDs(true) 466 - ->needProjectPHIDs(true) 467 - ->executeOne(); 468 - if ($template_task) { 469 - $cc_phids = array_unique(array_merge( 470 - $template_task->getSubscriberPHIDs(), 471 - array($viewer->getPHID()))); 472 - $task->attachSubscriberPHIDs($cc_phids); 473 - $task->attachProjectPHIDs($template_task->getProjectPHIDs()); 474 - $task->setOwnerPHID($template_task->getOwnerPHID()); 475 - $task->setPriority($template_task->getPriority()); 476 - $task->setViewPolicy($template_task->getViewPolicy()); 477 - $task->setEditPolicy($template_task->getEditPolicy()); 478 - 479 - $v_space = $template_task->getSpacePHID(); 480 - 481 - $template_fields = PhabricatorCustomField::getObjectFields( 482 - $template_task, 483 - PhabricatorCustomField::ROLE_EDIT); 484 - 485 - $fields = $template_fields->getFields(); 486 - foreach ($fields as $key => $field) { 487 - if (!$field->shouldCopyWhenCreatingSimilarTask()) { 488 - unset($fields[$key]); 489 - } 490 - if (empty($aux_fields[$key])) { 491 - unset($fields[$key]); 492 - } 493 - } 494 - 495 - if ($fields) { 496 - id(new PhabricatorCustomFieldList($fields)) 497 - ->setViewer($viewer) 498 - ->readFieldsFromStorage($template_task); 499 - 500 - foreach ($fields as $key => $field) { 501 - $aux_fields[$key]->setValueFromStorage( 502 - $field->getValueForStorage()); 503 - } 504 - } 505 - } 506 - } 507 - } 508 - } 509 - 510 - $error_view = null; 511 - if ($errors) { 512 - $error_view = new PHUIInfoView(); 513 - $error_view->setErrors($errors); 514 - } 515 - 516 - $priority_map = ManiphestTaskPriority::getTaskPriorityMap(); 517 - 518 - if ($task->getOwnerPHID()) { 519 - $assigned_value = array($task->getOwnerPHID()); 520 - } else { 521 - $assigned_value = array(); 522 - } 523 - 524 - if ($task->getSubscriberPHIDs()) { 525 - $cc_value = $task->getSubscriberPHIDs(); 526 - } else { 527 - $cc_value = array(); 528 - } 529 - 530 - if ($task->getProjectPHIDs()) { 531 - $projects_value = $task->getProjectPHIDs(); 532 - } else { 533 - $projects_value = array(); 534 - } 535 - 536 - $cancel_id = nonempty($task->getID(), $template_id); 537 - if ($cancel_id) { 538 - $cancel_uri = '/T'.$cancel_id; 539 - } else { 540 - $cancel_uri = '/maniphest/'; 541 - } 542 - 543 - if ($task->getID()) { 544 - $button_name = pht('Save Task'); 545 - $header_name = pht('Edit Task'); 546 - } else if ($parent_task) { 547 - $cancel_uri = '/T'.$parent_task->getID(); 548 - $button_name = pht('Create Task'); 549 - $header_name = pht('Create New Subtask'); 550 - } else { 551 - $button_name = pht('Create Task'); 552 - $header_name = pht('Create New Task'); 553 - } 554 - 555 - require_celerity_resource('maniphest-task-edit-css'); 556 - 557 - $project_tokenizer_id = celerity_generate_unique_node_id(); 558 - 559 - $form = new AphrontFormView(); 560 - $form 561 - ->setUser($viewer) 562 - ->addHiddenInput('template', $template_id) 563 - ->addHiddenInput('responseType', $response_type) 564 - ->addHiddenInput('order', $order) 565 - ->addHiddenInput('ungrippable', $request->getStr('ungrippable')) 566 - ->addHiddenInput('columnPHID', $request->getStr('columnPHID')); 567 - 568 - if ($parent_task) { 569 - $form 570 - ->appendChild( 571 - id(new AphrontFormStaticControl()) 572 - ->setLabel(pht('Parent Task')) 573 - ->setValue($viewer->renderHandle($parent_task->getPHID()))) 574 - ->addHiddenInput('parent', $parent_task->getID()); 575 - } 576 - 577 - $form 578 - ->appendChild( 579 - id(new AphrontFormTextAreaControl()) 580 - ->setLabel(pht('Title')) 581 - ->setName('title') 582 - ->setError($e_title) 583 - ->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT) 584 - ->setValue($task->getTitle())); 585 - 586 - if ($can_edit_status) { 587 - // See T4819. 588 - $status_map = ManiphestTaskStatus::getTaskStatusMap(); 589 - $dup_status = ManiphestTaskStatus::getDuplicateStatus(); 590 - 591 - if ($task->getStatus() != $dup_status) { 592 - unset($status_map[$dup_status]); 593 - } 594 - 595 - $form 596 - ->appendChild( 597 - id(new AphrontFormSelectControl()) 598 - ->setLabel(pht('Status')) 599 - ->setName('status') 600 - ->setValue($task->getStatus()) 601 - ->setOptions($status_map)); 602 - } 603 - 604 - $policies = id(new PhabricatorPolicyQuery()) 605 - ->setViewer($viewer) 606 - ->setObject($task) 607 - ->execute(); 608 - 609 - if ($can_edit_assign) { 610 - $form->appendControl( 611 - id(new AphrontFormTokenizerControl()) 612 - ->setLabel(pht('Assigned To')) 613 - ->setName('assigned_to') 614 - ->setValue($assigned_value) 615 - ->setUser($viewer) 616 - ->setDatasource(new PhabricatorPeopleDatasource()) 617 - ->setLimit(1)); 618 - } 619 - 620 - $form 621 - ->appendControl( 622 - id(new AphrontFormTokenizerControl()) 623 - ->setLabel(pht('CC')) 624 - ->setName('cc') 625 - ->setValue($cc_value) 626 - ->setUser($viewer) 627 - ->setDatasource(new PhabricatorMetaMTAMailableDatasource())); 628 - 629 - if ($can_edit_priority) { 630 - $form 631 - ->appendChild( 632 - id(new AphrontFormSelectControl()) 633 - ->setLabel(pht('Priority')) 634 - ->setName('priority') 635 - ->setOptions($priority_map) 636 - ->setValue($task->getPriority())); 637 - } 638 - 639 - if ($can_edit_policies) { 640 - $form 641 - ->appendChild( 642 - id(new AphrontFormPolicyControl()) 643 - ->setUser($viewer) 644 - ->setCapability(PhabricatorPolicyCapability::CAN_VIEW) 645 - ->setPolicyObject($task) 646 - ->setPolicies($policies) 647 - ->setSpacePHID($v_space) 648 - ->setName('viewPolicy')) 649 - ->appendChild( 650 - id(new AphrontFormPolicyControl()) 651 - ->setUser($viewer) 652 - ->setCapability(PhabricatorPolicyCapability::CAN_EDIT) 653 - ->setPolicyObject($task) 654 - ->setPolicies($policies) 655 - ->setName('editPolicy')); 656 - } 657 - 658 - if ($can_edit_projects) { 659 - $caption = null; 660 - if ($can_create_projects) { 661 - $caption = javelin_tag( 662 - 'a', 663 - array( 664 - 'href' => '/project/create/', 665 - 'mustcapture' => true, 666 - 'sigil' => 'project-create', 667 - ), 668 - pht('Create New Project')); 669 - } 670 - $form 671 - ->appendControl( 672 - id(new AphrontFormTokenizerControl()) 673 - ->setLabel(pht('Projects')) 674 - ->setName('projects') 675 - ->setValue($projects_value) 676 - ->setID($project_tokenizer_id) 677 - ->setCaption($caption) 678 - ->setDatasource(new PhabricatorProjectDatasource())); 679 - } 680 - 681 - $field_list->appendFieldsToForm($form); 682 - 683 - require_celerity_resource('phui-info-view-css'); 684 - 685 - Javelin::initBehavior('project-create', array( 686 - 'tokenizerID' => $project_tokenizer_id, 687 - )); 688 - 689 - $description_control = id(new PhabricatorRemarkupControl()) 690 - ->setLabel(pht('Description')) 691 - ->setName('description') 692 - ->setID('description-textarea') 693 - ->setValue($task->getDescription()) 694 - ->setUser($viewer); 695 - 696 - $form 697 - ->appendChild($description_control); 698 - 699 - if ($request->isAjax()) { 700 - $dialog = id(new AphrontDialogView()) 701 - ->setUser($viewer) 702 - ->setWidth(AphrontDialogView::WIDTH_FULL) 703 - ->setTitle($header_name) 704 - ->appendChild( 705 - array( 706 - $error_view, 707 - $form->buildLayoutView(), 708 - )) 709 - ->addCancelButton($cancel_uri) 710 - ->addSubmitButton($button_name); 711 - return id(new AphrontDialogResponse())->setDialog($dialog); 712 - } 713 - 714 - $form 715 - ->appendChild( 716 - id(new AphrontFormSubmitControl()) 717 - ->addCancelButton($cancel_uri) 718 - ->setValue($button_name)); 719 - 720 - $form_box = id(new PHUIObjectBoxView()) 721 - ->setHeaderText($header_name) 722 - ->setFormErrors($errors) 723 - ->setForm($form); 724 - 725 - $preview = id(new PHUIRemarkupPreviewPanel()) 726 - ->setHeader(pht('Description Preview')) 727 - ->setControlID('description-textarea') 728 - ->setPreviewURI($this->getApplicationURI('task/descriptionpreview/')); 729 - 730 - if ($task->getID()) { 731 - $page_objects = array($task->getPHID()); 732 - } else { 733 - $page_objects = array(); 734 - } 735 - 736 - $crumbs = $this->buildApplicationCrumbs(); 737 - 738 - if ($task->getID()) { 739 - $crumbs->addTextCrumb('T'.$task->getID(), '/T'.$task->getID()); 740 - } 741 - 742 - $crumbs->addTextCrumb($header_name); 743 - 744 - $title = $header_name; 745 - 746 - return $this->newPage() 747 - ->setTitle($title) 748 - ->setCrumbs($crumbs) 749 - ->setPageObjectPHIDs($page_objects) 750 - ->appendChild( 751 - array( 752 - $form_box, 753 - $preview, 754 - )); 755 - } 756 - 757 - }
-5
src/applications/search/engine/PhabricatorJumpNavHandler.php
··· 15 15 '/^u$/i' => 'uri:/people/', 16 16 '/^p\s+(.+)$/i' => 'project', 17 17 '/^u\s+(\S+)$/i' => 'user', 18 - '/^task:\s*(.+)/i' => 'create-task', 19 18 '/^(?:s)\s+(\S+)/i' => 'find-symbol', 20 19 '/^r\s+(.+)$/i' => 'find-repository', 21 20 ); ··· 64 63 $uri = urisprintf('/diffusion/?order=name&name=%s', $name); 65 64 } 66 65 return id(new AphrontRedirectResponse())->setURI($uri); 67 - case 'create-task': 68 - return id(new AphrontRedirectResponse()) 69 - ->setURI('/maniphest/editpro/?title=' 70 - .phutil_escape_uri($matches[1])); 71 66 default: 72 67 throw new Exception(pht("Unknown jump effect '%s'!", $effect)); 73 68 }
+2 -2
src/docs/contributor/bug_reports.diviner
··· 26 26 - gather debugging information; 27 27 - explain how to reproduce the issue; and 28 28 - create a task in 29 - [[ http://secure.phabricator.com/maniphest/task/create/ | Maniphest ]]. 29 + [[ http://secure.phabricator.com/u/newbug/ | Maniphest ]]. 30 30 31 31 The rest of this article walks through these points in detail. 32 32 ··· 189 189 It is **particularly critical** that you include reproduction steps. We will 190 190 not accept reports which describe issues we can not reproduce. 191 191 192 - (NOTE) https://secure.phabricator.com/maniphest/task/create/ 192 + (NOTE) https://secure.phabricator.com/u/newbug/ 193 193 194 194 If you don't want to file there (or, for example, your bug relates to being 195 195 unable to log in or unable to file an issue in Maniphest) you can file on any
+2 -2
src/docs/contributor/feature_requests.diviner
··· 23 23 - align your expectations around timelines and priorities; 24 24 - describe your problem, not your solution; and 25 25 - file a task in 26 - [[ http://secure.phabricator.com/maniphest/task/create/ | Maniphest ]]. 26 + [[ http://secure.phabricator.com/u/newfeature/ | Maniphest ]]. 27 27 28 28 The rest of this article walks through these points in detail. 29 29 ··· 230 230 not just the feature you want. We will not accept feature requests which do 231 231 not describe the root problem the feature is intended to resolve. 232 232 233 - (NOTE) https://secure.phabricator.com/maniphest/task/create/ 233 + (NOTE) https://secure.phabricator.com/u/newfeature/ 234 234 235 235 236 236 Next Steps
-1
src/docs/user/userguide/jump.diviner
··· 29 29 - **p** - Jump to Project 30 30 - **p Some Project** - Jump to Project: Some Project 31 31 - **s SymbolName** - Jump to Symbol SymbolName 32 - - **task: (new title)** - Jumps to Task Creation Page with pre-filled title. 33 32 - **(default)** - Search for input. 34 33 35 34 Next Steps