mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-01 17:38:24 +01:00
(stable) Add an "isDone" flag to "transaction.search" for Differential inline comments
Summary: See PHI1684. Expose the published state of the "Done" checkbox to the API. Test Plan: Made API calls on a comment in all four states, got correct published states via the API in all cases. Differential Revision: https://secure.phabricator.com/D21059
This commit is contained in:
parent
6a62b63db1
commit
ff348b40f9
1 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,14 @@ final class DifferentialRevisionInlineTransaction
|
|||
$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(),
|
||||
|
@ -47,6 +55,7 @@ final class DifferentialRevisionInlineTransaction
|
|||
'line' => (int)$comment->getLineNumber(),
|
||||
'length' => (int)($comment->getLineLength() + 1),
|
||||
'replyToCommentPHID' => $comment->getReplyToCommentPHID(),
|
||||
'isDone' => $is_done,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue