Skip to content

Commit

Permalink
Port 'Edit Blocked Task'
Browse files Browse the repository at this point in the history
  • Loading branch information
Shkiv committed Sep 5, 2024
1 parent 2787b6a commit a1ef803
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 @@ -1869,6 +1869,7 @@
'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php',
'ManiphestTaskHasMockRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasMockRelationship.php',
'ManiphestTaskHasParentRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasParentRelationship.php',
'ManiphestTaskHasBlockedRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasBlockedRelationship.php',
'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php',
'ManiphestTaskHasRevisionRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasRevisionRelationship.php',
'ManiphestTaskHasSubtaskRelationship' => 'applications/maniphest/relationship/ManiphestTaskHasSubtaskRelationship.php',
Expand Down Expand Up @@ -8469,6 +8470,7 @@
'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasMockRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHasParentRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHasBlockedRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasRevisionRelationship' => 'ManiphestTaskRelationship',
'ManiphestTaskHasSubtaskRelationship' => 'ManiphestTaskRelationship',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ private function buildCurtain(
$subtask_item,
$blocker_item,
ManiphestTaskHasParentRelationship::RELATIONSHIPKEY,
ManiphestTaskHasBlockedRelationship::RELATIONSHIPKEY,
ManiphestTaskHasSubtaskRelationship::RELATIONSHIPKEY,
ManiphestTaskMergeInRelationship::RELATIONSHIPKEY,
ManiphestTaskCloseAsDuplicateRelationship::RELATIONSHIPKEY,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

final class ManiphestTaskHasBlockedRelationship
extends ManiphestTaskRelationship {

const RELATIONSHIPKEY = 'task.has-blocked';

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

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

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

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

public function shouldAppearInActionMenu() {
return false;
}

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

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

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

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

}

0 comments on commit a1ef803

Please sign in to comment.