mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 06:11:01 +01:00
Fix an issue with comment group aggregation.
Summary: Test Plan: Reviewers: CC:
This commit is contained in:
parent
1636e8274a
commit
076f342aed
1 changed files with 12 additions and 12 deletions
|
@ -78,23 +78,16 @@ class ManiphestTransactionDetailView extends AphrontView {
|
|||
|
||||
require_celerity_resource('maniphest-transaction-detail-css');
|
||||
|
||||
$comment_transaction = null;
|
||||
foreach ($this->transactions as $transaction) {
|
||||
if ($transaction->hasComments()) {
|
||||
$comment_transaction = $transaction;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$any_transaction = reset($transactions);
|
||||
|
||||
$author = $this->handles[$transaction->getAuthorPHID()];
|
||||
|
||||
$comments = $transaction->getCache();
|
||||
if (!strlen($comments)) {
|
||||
$comments = $transaction->getComments();
|
||||
if (strlen($comments)) {
|
||||
$comments = $this->markupEngine->markupText($comments);
|
||||
$transaction->setCache($comments);
|
||||
$transaction->save();
|
||||
}
|
||||
}
|
||||
$author = $this->handles[$any_transaction->getAuthorPHID()];
|
||||
|
||||
$more_classes = array();
|
||||
$descs = array();
|
||||
|
@ -107,7 +100,14 @@ class ManiphestTransactionDetailView extends AphrontView {
|
|||
|
||||
$more_classes = implode(' ', $classes);
|
||||
|
||||
if ($transaction->hasComments()) {
|
||||
if ($comment_transaction && $comment_transaction->hasComments()) {
|
||||
$comments = $comment_transaction->getCache();
|
||||
if (!strlen($comments)) {
|
||||
$comments = $comment_transaction->getComments();
|
||||
$comments = $this->markupEngine->markupText($comments);
|
||||
$transaction->setCache($comments);
|
||||
$transaction->save();
|
||||
}
|
||||
$comment_block =
|
||||
'<div class="maniphest-transaction-comments phabricator-remarkup">'.
|
||||
$comments.
|
||||
|
|
Loading…
Reference in a new issue