Publish draft "done" status when submitting comments/updates/actions/inlines

Summary:
Ref T1460. When a revision author updates/comments/etc on a revision, publish all their checkmarks.

This doesn't handle Diffusion/audits yet.

Test Plan: {F346870}

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: yelirekim, epriestley

Maniphest Tasks: T1460

Differential Revision: https://secure.phabricator.com/D12126
This commit is contained in:
epriestley
2015-03-21 10:49:06 -07:00
parent 4310c4ed53
commit 9f3210c883
4 changed files with 152 additions and 0 deletions

View File

@@ -3,13 +3,33 @@
abstract class PhabricatorDiffInlineCommentQuery
extends PhabricatorApplicationTransactionCommentQuery {
private $fixedStates;
private $needReplyToComments;
public function withFixedStates(array $states) {
$this->fixedStates = $states;
return $this;
}
public function needReplyToComments($need_reply_to) {
$this->needReplyToComments = $need_reply_to;
return $this;
}
protected function buildWhereClauseComponents(
AphrontDatabaseConnection $conn_r) {
$where = parent::buildWhereClauseComponents($conn_r);
if ($this->fixedStates !== null) {
$where[] = qsprintf(
$conn_r,
'fixedState IN (%Ls)',
$this->fixedStates);
}
return $where;
}
protected function willFilterPage(array $comments) {
if ($this->needReplyToComments) {
$reply_phids = array();