Basic task dependencies for Maniphest

Summary:
This allows you to edit dependencies. It is a better patch than it used to be.
It depends on D725.

  - If you create a cycle, it just throws an exception and aborts the workflow.
It should not do this.
  - Tasks which depend on the current task aren't shown in the UI. Need to add a
new table for this.
  - Transaction text says "attached Task" but should probably say "added a
dependency on task".

Test Plan: Created valid and invalid dependencies between tasks. Created valid
and invalid dependencies between revisions.
Reviewed By: tuomaspelkonen
Reviewers: davidreuss, jungejason, tuomaspelkonen, aran
Commenters: codeblock
CC: aran, codeblock, tuomaspelkonen, epriestley
Differential Revision: 595
This commit is contained in:
epriestley
2011-07-05 13:18:47 -07:00
parent 24390d2b40
commit f49e35deaf
11 changed files with 191 additions and 22 deletions

View File

@@ -440,6 +440,16 @@ class DifferentialRevisionViewController extends DifferentialController {
$properties['Unit'] = $ustar.' '.$umsg.$utail;
$drevs = $revision->getAttachedPHIDs(
PhabricatorPHIDConstants::PHID_TYPE_DREV);
if ($drevs) {
$links = array();
foreach ($drevs as $drev_phid) {
$links[] = $handles[$drev_phid]->renderLink();
}
$properties['Depends On'] = implode('<br />', $links);
}
if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) {
$tasks = $revision->getAttachedPHIDs(
PhabricatorPHIDConstants::PHID_TYPE_TASK);
@@ -513,6 +523,13 @@ class DifferentialRevisionViewController extends DifferentialController {
require_celerity_resource('phabricator-object-selector-css');
require_celerity_resource('javelin-behavior-phabricator-object-selector');
$links[] = array(
'class' => 'action-dependencies',
'name' => 'Edit Dependencies',
'href' => "/search/attach/{$revision_phid}/DREV/dependencies/",
'sigil' => 'workflow',
);
if (PhabricatorEnv::getEnvConfig('maniphest.enabled')) {
$links[] = array(
'class' => 'attach-maniphest',