1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 08:20:57 +01:00

Fill in some straightforward Maniphest transactions for transaction.search

Summary:
See PHI197. Populates "status" transactions and a few other obvious types where there's no security/performance/payload/formatting issue I can come up with.

The names here are the same as the names for editing with `maniphest.edit`.

Test Plan: Used `transaction.search` to retrieve transactions of all new types.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D18761
This commit is contained in:
epriestley 2017-11-06 10:25:37 -08:00
parent 03d059dd26
commit cb98b60033
6 changed files with 57 additions and 3 deletions

View file

@ -74,10 +74,10 @@ final class DifferentialRevisionStatusTransaction
return 'status';
}
public function getFieldValuesForConduit($object, $data) {
public function getFieldValuesForConduit($xaction, $data) {
return array(
'old' => $object->getOldValue(),
'new' => $object->getNewValue(),
'old' => $xaction->getOldValue(),
'new' => $xaction->getNewValue(),
);
}

View file

@ -57,5 +57,15 @@ final class ManiphestTaskDescriptionTransaction
return $changes;
}
public function getTransactionTypeForConduit($xaction) {
return 'description';
}
public function getFieldValuesForConduit($xaction, $data) {
return array(
'old' => $xaction->getOldValue(),
'new' => $xaction->getNewValue(),
);
}
}

View file

@ -154,5 +154,15 @@ final class ManiphestTaskOwnerTransaction
}
public function getTransactionTypeForConduit($xaction) {
return 'owner';
}
public function getFieldValuesForConduit($xaction, $data) {
return array(
'old' => $xaction->getOldValue(),
'new' => $xaction->getNewValue(),
);
}
}

View file

@ -107,4 +107,16 @@ final class ManiphestTaskPointsTransaction
return $value;
}
public function getTransactionTypeForConduit($xaction) {
return 'points';
}
public function getFieldValuesForConduit($xaction, $data) {
return array(
'old' => $xaction->getOldValue(),
'new' => $xaction->getNewValue(),
);
}
}

View file

@ -229,4 +229,15 @@ final class ManiphestTaskStatusTransaction
}
public function getTransactionTypeForConduit($xaction) {
return 'status';
}
public function getFieldValuesForConduit($xaction, $data) {
return array(
'old' => $xaction->getOldValue(),
'new' => $xaction->getNewValue(),
);
}
}

View file

@ -72,4 +72,15 @@ final class ManiphestTaskTitleTransaction
return $errors;
}
public function getTransactionTypeForConduit($xaction) {
return 'title';
}
public function getFieldValuesForConduit($xaction, $data) {
return array(
'old' => $xaction->getOldValue(),
'new' => $xaction->getNewValue(),
);
}
}