From 2582382c9d91bd5c5984b3a08ec8e4b6c1c40e44 Mon Sep 17 00:00:00 2001
From: saran s <saran.s@vtigersolutions.com>
Date: Thu, 5 Sep 2024 15:29:57 +0530
Subject: [PATCH] Fix: Reply comments are visible from parent comments

---
 layouts/v7/modules/Vtiger/Comment.tpl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/v7/modules/Vtiger/Comment.tpl b/layouts/v7/modules/Vtiger/Comment.tpl
index 7234907a5..f1a927e10 100644
--- a/layouts/v7/modules/Vtiger/Comment.tpl
+++ b/layouts/v7/modules/Vtiger/Comment.tpl
@@ -89,7 +89,7 @@
 											{/if}
 
 											{assign var=CHILD_COMMENTS_COUNT value=$COMMENT->getChildCommentsCount()}
-											{if $CHILD_COMMENTS_MODEL neq null and (isset($CHILDS_ROOT_PARENT_ID)&& $CHILDS_ROOT_PARENT_ID neq $PARENT_COMMENT_ID)}
+											{if $CHILD_COMMENTS_MODEL neq null and (!isset($CHILDS_ROOT_PARENT_ID)&& $CHILDS_ROOT_PARENT_ID neq $PARENT_COMMENT_ID)}
 												{if $COMMENTS_MODULE_MODEL->isPermitted('EditView')}&nbsp;&nbsp;&nbsp;{/if}
 												<span class="viewThreadBlock" data-child-comments-count="{$CHILD_COMMENTS_COUNT}">
 													<a href="javascript:void(0)" class="cursorPointer viewThread" style="color: blue;">
@@ -101,7 +101,7 @@
 														<span class="childCommentsCount">{$CHILD_COMMENTS_COUNT}</span>&nbsp;{if $CHILD_COMMENTS_COUNT eq 1}{vtranslate('LBL_REPLY',$MODULE_NAME)}{else}{vtranslate('LBL_REPLIES',$MODULE_NAME)}{/if}&nbsp;
 													</a>
 												</span>
-											{elseif $CHILD_COMMENTS_MODEL neq null and (isset($CHILDS_ROOT_PARENT_ID)&& $CHILDS_ROOT_PARENT_ID eq $PARENT_COMMENT_ID)}
+											{elseif $CHILD_COMMENTS_MODEL neq null and (!isset($CHILDS_ROOT_PARENT_ID)&& $CHILDS_ROOT_PARENT_ID eq $PARENT_COMMENT_ID)}
 												{if $COMMENTS_MODULE_MODEL->isPermitted('EditView')}&nbsp;&nbsp;&nbsp;{/if}
 												<span class="viewThreadBlock" data-child-comments-count="{$CHILD_COMMENTS_COUNT}" style="display:none;">
 													<a href="javascript:void(0)" class="cursorPointer viewThread" style="color: blue;">
-- 
GitLab