mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Herald - add support for "assignee" conditions
Summary: add support for "assignee" conditions Test Plan: Create a Herald rule where condition is assignee, and create a task assign to someone. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7813
This commit is contained in:
parent
a70de394e1
commit
54a0dd8139
3 changed files with 7 additions and 1 deletions
|
@ -8,6 +8,7 @@ abstract class HeraldAdapter {
|
|||
const FIELD_TITLE = 'title';
|
||||
const FIELD_BODY = 'body';
|
||||
const FIELD_AUTHOR = 'author';
|
||||
const FIELD_ASSIGNEE = 'assignee';
|
||||
const FIELD_REVIEWER = 'reviewer';
|
||||
const FIELD_REVIEWERS = 'reviewers';
|
||||
const FIELD_COMMITTER = 'committer';
|
||||
|
@ -150,6 +151,7 @@ abstract class HeraldAdapter {
|
|||
self::FIELD_TITLE => pht('Title'),
|
||||
self::FIELD_BODY => pht('Body'),
|
||||
self::FIELD_AUTHOR => pht('Author'),
|
||||
self::FIELD_ASSIGNEE => pht('Assignee'),
|
||||
self::FIELD_COMMITTER => pht('Committer'),
|
||||
self::FIELD_REVIEWER => pht('Reviewer'),
|
||||
self::FIELD_REVIEWERS => pht('Reviewers'),
|
||||
|
@ -230,6 +232,7 @@ abstract class HeraldAdapter {
|
|||
self::CONDITION_IS_NOT_ANY,
|
||||
);
|
||||
case self::FIELD_REPOSITORY:
|
||||
case self::FIELD_ASSIGNEE:
|
||||
return array(
|
||||
self::CONDITION_IS_ANY,
|
||||
self::CONDITION_IS_NOT_ANY,
|
||||
|
|
|
@ -60,6 +60,7 @@ final class HeraldManiphestTaskAdapter extends HeraldAdapter {
|
|||
self::FIELD_TITLE,
|
||||
self::FIELD_BODY,
|
||||
self::FIELD_AUTHOR,
|
||||
self::FIELD_ASSIGNEE,
|
||||
self::FIELD_CC,
|
||||
self::FIELD_CONTENT_SOURCE,
|
||||
self::FIELD_PROJECTS,
|
||||
|
@ -102,6 +103,8 @@ final class HeraldManiphestTaskAdapter extends HeraldAdapter {
|
|||
return $this->getTask()->getDescription();
|
||||
case self::FIELD_AUTHOR:
|
||||
return $this->getTask()->getAuthorPHID();
|
||||
case self::FIELD_ASSIGNEE:
|
||||
return $this->getTask()->getOwnerPHID();
|
||||
case self::FIELD_CC:
|
||||
return $this->getTask()->getCCPHIDs();
|
||||
case self::FIELD_PROJECTS:
|
||||
|
|
|
@ -16,7 +16,7 @@ final class HeraldRule extends HeraldDAO
|
|||
protected $ruleType;
|
||||
protected $isDisabled = 0;
|
||||
|
||||
protected $configVersion = 19;
|
||||
protected $configVersion = 20;
|
||||
|
||||
// phids for which this rule has been applied
|
||||
private $ruleApplied = self::ATTACHABLE;
|
||||
|
|
Loading…
Reference in a new issue