Skip to content
Snippets Groups Projects
Commit 367a9df5 authored by Christopher Johnson's avatar Christopher Johnson
Browse files
parents 6878b881 df6e9dee
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,10 @@ final class SprintBeginDateField extends SprintProjectCustomField {
return 'isdc:sprint:startdate';
}
public function getModernFieldKey() {
return 'startdate';
}
public function getFieldName() {
return 'Sprint Start Date';
}
......
......@@ -168,7 +168,7 @@ final class BoardDataProvider {
$scope_phid = $this->project->getPHID();
$task_phids = mpull($this->tasks, 'getPHID');
$query = new ManiphestTransactionQuery();
$query->withTransactionTypes(array(ManiphestTransaction::TYPE_PROJECT_COLUMN));
$query->withTransactionTypes(array(PhabricatorTransactions::TYPE_COLUMNS));
$query->withObjectPHIDs($task_phids);
$query->setViewer($this->viewer);
$col_xactions = $query->execute();
......@@ -176,7 +176,8 @@ final class BoardDataProvider {
$xaction_date = $xaction->getDateCreated();
if ($xaction_date >= $this->start && $xaction_date <= $this->end) {
$newval = $xaction->getNewValue();
if ($newval['projectPHID'] == $scope_phid) {
$newArr = call_user_func_array('array_merge', $newval);
if ($newArr['boardPHID'] == $scope_phid) {
$xactions[] = $xaction;
}
}
......
......@@ -63,7 +63,7 @@ final class SprintColumnTransaction {
break;
case 'reopen':
$this->reopenedTasksToday($date, $dates);
$this->reopenedPointsToday($date, $points, $dates);
// $this->reopenedPointsToday($date, $points, $dates);
break;
}
}
......@@ -91,12 +91,11 @@ final class SprintColumnTransaction {
}
private function setXActionEventType($old_col_name, $new_col_name) {
$old_is_closed = ($old_col_name === null) ||
SprintConstants::TYPE_CLOSED_STATUS_COLUMN == $old_col_name;
$old_is_closed = ($old_col_name = SprintConstants::TYPE_CLOSED_STATUS_COLUMN and $new_col_name != SprintConstants::TYPE_CLOSED_STATUS_COLUMN);
if ($old_is_closed) {
return 'reopen';
} else {
} else if ($new_col_name) {
switch ($new_col_name) {
case SprintConstants::TYPE_CLOSED_STATUS_COLUMN:
return 'close';
......@@ -109,6 +108,8 @@ final class SprintColumnTransaction {
default:
break;
}
} else {
return null;
}
}
......@@ -118,22 +119,28 @@ final class SprintColumnTransaction {
$new_col_name = null;
$events = array();
foreach ($xactions as $xaction) {
$old_col_phid = idx($xaction->getOldValue(), 'columnPHIDs');
$oldval = $xaction->getOldValue();
if (!empty($oldval)) {
$newArr = call_user_func_array('array_merge', $oldval);
$old_col_phid = idx($newArr, 'columnPHID');
foreach ($old_col_phid as $phid) {
$old_col = $this->query->getColumnforPHID($phid);
foreach ($old_col as $obj) {
$old_col_name = $obj->getDisplayName();
}
}
$new_col_phid = idx($xaction->getNewValue(), 'columnPHIDs');
foreach ($new_col_phid as $phid) {
$new_col = $this->query->getColumnforPHID($phid);
}
$newval = $xaction->getNewValue();
if (!empty($newval)) {
$newArr = call_user_func_array('array_merge', $newval);
$new_col_phid = idx($newArr, 'columnPHID');
$xaction_scope_phid = idx($newArr, 'boardPHID');
$new_col = $this->query->getColumnforPHID($new_col_phid);
foreach ($new_col as $obj) {
$new_col_name = $obj->getDisplayName();
}
}
$scope_phid = $this->project->getPHID();
$xaction_scope_phid = idx($xaction->getNewValue(), 'projectPHID');
if ($scope_phid == $xaction_scope_phid) {
$event_type = $this->setXActionEventType($old_col_name, $new_col_name);
if ($event_type !== null) {
......
......@@ -19,7 +19,7 @@ final class SprintDataView extends SprintView {
return $this;
}
public function setViewer($viewer) {
public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
return $this;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment