Page MenuHomePhorge

D25546.1737751007.diff
No OneTemporary

D25546.1737751007.diff

diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
--- a/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
+++ b/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
@@ -296,12 +296,29 @@
private function renderCommentPanel() {
$viewer = $this->getViewer();
+ // Set placeholder in comment field if a duplicate task - T15749
+ $placeholder_text = '';
+ $object_phid = $this->getObjectPHID();
+ if (substr_compare($object_phid, 'PHID-TASK-', 0, 10) === 0) {
+ $query = id(new ManiphestTaskQuery())
+ ->setViewer(PhabricatorUser::getOmnipotentUser())
+ ->needSubscriberPHIDs(false)
+ ->needProjectPHIDs(false);
+ $query->withPHIDs(array($object_phid));
+ $task = $query->executeOne();
+ if ($task->getStatus() === ManiphestTaskStatus::STATUS_CLOSED_DUPLICATE) {
+ $placeholder_text = 'This task is closed as a duplicate. '.
+ 'Comment here only if you think that this task is not a duplicate.';
+ }
+ }
+
$remarkup_control = id(new PhabricatorRemarkupControl())
->setViewer($viewer)
->setID($this->getCommentID())
->addClass('phui-comment-fullwidth-control')
->addClass('phui-comment-textarea-control')
->setCanPin(true)
+ ->setPlaceholder($placeholder_text)
->setName('comment');
$draft_comment = '';

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 20:36 (6 d, 3 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1147927
Default Alt Text
D25546.1737751007.diff (1 KB)

Event Timeline