From 3ca6b996892d187a035d739cec97a883b72c7aa5 Mon Sep 17 00:00:00 2001 From: Aparna Date: Fri, 30 Aug 2024 09:13:47 -0700 Subject: [PATCH] FOIMOD-2982-Comments Tab - Type of Comments (Peer Review, Internal, General)-Observation 20 Fix for replies not triggering a notification to the author of the parent Internal/peer review type comment. --- .../request_api/models/FOIRawRequestComments.py | 2 +- request-management-api/request_api/models/FOIRequestComments.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/request-management-api/request_api/models/FOIRawRequestComments.py b/request-management-api/request_api/models/FOIRawRequestComments.py index 279278ec0..126425ccf 100644 --- a/request-management-api/request_api/models/FOIRawRequestComments.py +++ b/request-management-api/request_api/models/FOIRawRequestComments.py @@ -207,7 +207,7 @@ def getcommentusers(cls, commentid): select commentid, commenttypeid, createdby, taggedusers from "FOIRawRequestComments" frc where commentid = (select parentcommentid from "FOIRawRequestComments" frc where commentid=:commentid) and isactive = true union all select commentid, commenttypeid, createdby, taggedusers from "FOIRawRequestComments" frc where commentid <> :commentid and parentcommentid = (select parentcommentid from "FOIRawRequestComments" frc where commentid=:commentid) and isactive = true - ) cmt where commenttypeid =1""" + ) cmt where commenttypeid not in (2,3)""" rs = db.session.execute(text(sql), {'commentid': commentid}) for row in rs: users.append({"commentid": row["commentid"], "createdby": row["createdby"], "taggedusers": row["taggedusers"]}) diff --git a/request-management-api/request_api/models/FOIRequestComments.py b/request-management-api/request_api/models/FOIRequestComments.py index 1e80e3f04..67480f18d 100644 --- a/request-management-api/request_api/models/FOIRequestComments.py +++ b/request-management-api/request_api/models/FOIRequestComments.py @@ -218,7 +218,7 @@ def getcommentusers(cls, commentid): select commentid, commenttypeid, createdby, taggedusers from "FOIRequestComments" frc where commentid = (select parentcommentid from "FOIRequestComments" frc where commentid=:commentid) and isactive = true union all select commentid, commenttypeid, createdby, taggedusers from "FOIRequestComments" frc where commentid <> :commentid and parentcommentid = (select parentcommentid from "FOIRequestComments" frc where commentid=:commentid) and isactive = true - ) cmt where commenttypeid =1""" + ) cmt where commenttypeid not in (2,3)""" rs = db.session.execute(text(sql), {'commentid': commentid}) for row in rs: users.append({"commentid": row["commentid"], "createdby": row["createdby"], "taggedusers": row["taggedusers"]})