diff --git a/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php b/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php index 35d5034033..8ad4e00762 100644 --- a/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php +++ b/src/applications/differential/xaction/DifferentialRevisionInlineTransaction.php @@ -1,53 +1,62 @@ getViewer(); $changeset_ids = array(); foreach ($xactions as $xaction) { $changeset_ids[] = $xaction->getComment()->getChangesetID(); } $changesets = id(new DifferentialChangesetQuery()) ->setViewer($viewer) ->withIDs($changeset_ids) ->execute(); $changesets = mpull($changesets, null, 'getID'); return $changesets; } public function getFieldValuesForConduit($object, $data) { $comment = $object->getComment(); $changeset = $data[$comment->getChangesetID()]; $diff = $changeset->getDiff(); + $is_done = false; + switch ($comment->getFixedState()) { + case PhabricatorInlineCommentInterface::STATE_DONE: + case PhabricatorInlineCommentInterface::STATE_UNDRAFT: + $is_done = true; + break; + } + return array( 'diff' => array( 'id' => (int)$diff->getID(), 'phid' => $diff->getPHID(), ), 'path' => $changeset->getDisplayFilename(), 'line' => (int)$comment->getLineNumber(), 'length' => (int)($comment->getLineLength() + 1), 'replyToCommentPHID' => $comment->getReplyToCommentPHID(), + 'isDone' => $is_done, ); } }