Skip to content

Commit

Permalink
Port 'Edit Blockers'
Browse files Browse the repository at this point in the history
  • Loading branch information
Shkiv committed Sep 5, 2024
1 parent a1ef803 commit 03e6274
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/__phutil_library_map__.php
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,7 @@
'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php',
'ManiphestTaskHasRevisionRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasRevisionRelationship.php',
'ManiphestTaskHasSubtaskRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasSubtaskRelationship.php',
'ManiphestTaskHasBlockerRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasBlockerRelationship.php',
'ManiphestTaskHeraldField' => 'applications/maniphest/herald/ManiphestTaskHeraldField.php',
'ManiphestTaskHeraldFieldGroup' => 'applications/maniphest/herald/ManiphestTaskHeraldFieldGroup.php',
'ManiphestTaskIsDuplicateOfTaskEdgeType' => 'applications/maniphest/edge/ManiphestTaskIsDuplicateOfTaskEdgeType.php',
Expand Down Expand Up @@ -8474,6 +8475,7 @@
'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasRevisionRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHasSubtaskRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHasBlockerRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHeraldField' => 'HeraldField',
'ManiphestTaskHeraldFieldGroup' => 'HeraldFieldGroup',
'ManiphestTaskIsDuplicateOfTaskEdgeType' => 'PhabricatorEdgeType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ private function buildCurtain(
ManiphestTaskHasParentRelationship::RELATIONSHIPKEY,
ManiphestTaskHasBlockedRelationship::RELATIONSHIPKEY,
ManiphestTaskHasSubtaskRelationship::RELATIONSHIPKEY,
ManiphestTaskHasBlockerRelationship::RELATIONSHIPKEY,
ManiphestTaskMergeInRelationship::RELATIONSHIPKEY,
ManiphestTaskCloseAsDuplicateRelationship::RELATIONSHIPKEY,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

final class ManiphestTaskHasBlockerRelationship
extends ManiphestTaskRelationship {

const RELATIONSHIPKEY = 'task.has-blocker';

public function getEdgeConstant() {
return ManiphestTaskBlockerEdgeType::EDGECONST;
}

protected function getActionName() {
return pht('Edit Blockers');
}

protected function getActionIcon() {
return 'fa-chevron-circle-down';
}

public function canRelateObjects($src, $dst) {
return ($dst instanceof ManiphestTask);
}

public function shouldAppearInActionMenu() {
return false;
}

public function getDialogTitleText() {
return pht('Edit Blockers');
}

public function getDialogHeaderText() {
return pht('Current Blockers');
}

public function getDialogButtonText() {
return pht('Save Blockers');
}

protected function newRelationshipSource() {
return id(new ManiphestTaskRelationshipSource())
->setSelectedFilter('open');
}

}

0 comments on commit 03e6274

Please sign in to comment.