mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 22:31:03 +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');
|
require_celerity_resource('maniphest-transaction-detail-css');
|
||||||
|
|
||||||
|
$comment_transaction = null;
|
||||||
foreach ($this->transactions as $transaction) {
|
foreach ($this->transactions as $transaction) {
|
||||||
if ($transaction->hasComments()) {
|
if ($transaction->hasComments()) {
|
||||||
|
$comment_transaction = $transaction;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$any_transaction = reset($transactions);
|
||||||
|
|
||||||
$author = $this->handles[$transaction->getAuthorPHID()];
|
$author = $this->handles[$any_transaction->getAuthorPHID()];
|
||||||
|
|
||||||
$comments = $transaction->getCache();
|
|
||||||
if (!strlen($comments)) {
|
|
||||||
$comments = $transaction->getComments();
|
|
||||||
if (strlen($comments)) {
|
|
||||||
$comments = $this->markupEngine->markupText($comments);
|
|
||||||
$transaction->setCache($comments);
|
|
||||||
$transaction->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$more_classes = array();
|
$more_classes = array();
|
||||||
$descs = array();
|
$descs = array();
|
||||||
|
@ -107,7 +100,14 @@ class ManiphestTransactionDetailView extends AphrontView {
|
||||||
|
|
||||||
$more_classes = implode(' ', $classes);
|
$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 =
|
$comment_block =
|
||||||
'<div class="maniphest-transaction-comments phabricator-remarkup">'.
|
'<div class="maniphest-transaction-comments phabricator-remarkup">'.
|
||||||
$comments.
|
$comments.
|
||||||
|
|
Loading…
Reference in a new issue