Skip to content

Commit

Permalink
Merge pull request #4928 from bcgov/dev-rook-ST-4694
Browse files Browse the repository at this point in the history
Changes to send reminder notifications; only when outcome is not taken.
  • Loading branch information
sumathi-thirumani authored Dec 21, 2023
2 parents 05c99b3 + 4e10941 commit 27d92b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,8 @@ def getupcomingoipcduerecords(cls):
from "FOIMinistryRequests" fpa
order by fpa.foiministryrequestid , fpa.version desc) fma on frd.foiministryrequest_id = fma.foiministryrequestid
and frd.foiministryrequestversion_id = fma.foiministryrequestversion and fma.requeststatusid not in (5,6,4,11,3,15)
and inquiryattributes is not null
and frd.inquiryattributes ->> 'inquirydate' not in ('','null')
and (frd.inquiryattributes ->> 'inquirydate')::date between NOW() - INTERVAL '7 DAY' AND NOW() + INTERVAL '7 DAY'
and frd.outcomeid is null
order by frd.foiministryrequest_id , frd.foiministryrequestversion_id desc;"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,16 @@ def prepareoipc(self, requestschema, ministryrequestid, version, userid):
oipcreview.receiveddate = oipc["receiveddate"] if oipc["receiveddate"] not in (None, "") else None
oipcreview.closeddate = oipc["closeddate"] if oipc["closeddate"] not in (None, "") else None
if oipc["isinquiry"] == True:
oipcreview.inquiryattributes = oipc["inquiryattributes"]
oipcreview.inquiryattributes = self.__formatoipcattributes(oipc["inquiryattributes"])
oipcreview.createdby=userid
oipcreview.created_at= datetime2.now().isoformat()
oipcarr.append(oipcreview)
return oipcarr

def __formatoipcattributes(self, inquiryattributes):
if inquiryattributes not in (None, "") and inquiryattributes["inquirydate"] in ("","null"):
inquiryattributes["inquirydate"] = None
return inquiryattributes


def isNotBlankorNone(self, dataschema, key, location):
Expand Down

0 comments on commit 27d92b7

Please sign in to comment.