Example #1
0
 def saveministryrequestversion(self, ministryrequestschema, foirequestid,
                                ministryid, userid):
     _foirequest = FOIRequest().getrequest(foirequestid)
     _foiministryrequest = FOIMinistryRequest(
     ).getrequestbyministryrequestid(ministryid)
     _foirequestapplicant = FOIRequestApplicantMapping(
     ).getrequestapplicants(foirequestid, _foirequest["version"])
     _foirequestcontact = FOIRequestContactInformation(
     ).getrequestcontactinformation(foirequestid, _foirequest["version"])
     _foirequestpersonalattrbs = FOIRequestPersonalAttribute(
     ).getrequestpersonalattributes(foirequestid, _foirequest["version"])
     foiministryrequestarr = []
     foirequest = requestserviceministrybuilder(
     ).createfoirequestfromobject(_foirequest, userid)
     foiministryrequest = requestserviceministrybuilder(
     ).createfoiministryrequestfromobject(_foiministryrequest,
                                          ministryrequestschema, userid)
     foiministryrequestarr.append(foiministryrequest)
     foirequest.ministryRequests = foiministryrequestarr
     foirequest.requestApplicants = requestserviceministrybuilder(
     ).createfoirequestappplicantfromobject(_foirequestapplicant,
                                            foirequestid,
                                            _foirequest['version'] + 1,
                                            userid)
     foirequest.contactInformations = requestserviceministrybuilder(
     ).createfoirequestcontactfromobject(_foirequestcontact, foirequestid,
                                         _foirequest['version'] + 1, userid)
     foirequest.personalAttributes = requestserviceministrybuilder(
     ).createfoirequestpersonalattributefromobject(
         _foirequestpersonalattrbs, foirequestid,
         _foirequest['version'] + 1, userid)
     FOIMinistryRequest.deActivateFileNumberVersion(
         ministryid, _foiministryrequest['filenumber'],
         _foiministryrequest['version'] + 1, userid)
     return FOIRequest.saverequest(foirequest)
Example #2
0
 def __getversionforrequest(self, requestid, requesttype):
     """ Returns the active version of the request id based on type.
     """
     if requesttype == "ministryrequest":
         return FOIMinistryRequest.getversionforrequest(requestid)[0]
     else:
         return FOIRawRequest.getversionforrequest(requestid)[0]
Example #3
0
    def getministryrequestqueuepagination (self, groups=None, page=1, size=10, sortingitems=[], sortingorders=[], filterfields=[], keyword=None, additionalfilter='All', userid=None):
        requests = FOIMinistryRequest.getrequestspagination(groups, page, size, sortingitems, sortingorders, filterfields, keyword, additionalfilter, userid)

        requestqueue = []
        for request in requests.items:
            _openrequest = self.__preparebaserequestinfo(request.id, request.requestType, request.currentState, 
                                                         request.receivedDate, request.receivedDateUF, request.assignedGroup, 
                                                         request.assignedTo, request.idNumber, request.version)
            _openrequest.update({'assignedministrygroup': request.assignedministrygroup})
            _openrequest.update({'assignedministryperson': request.assignedministryperson})
            _openrequest.update({'cfrstatus':'Select Division'})
            _openrequest.update({'cfrduedate': request.cfrduedate})
            _openrequest.update({'duedate': request.duedate})
            _openrequest.update({'ministryrequestid': request.ministryrequestid})
            _openrequest.update({'applicantcategory': request.applicantcategory})
            _openrequest.update({'bcgovcode': request.bcgovcode})
            _openrequest.update({'assignedToFirstName': request.assignedToFirstName})
            _openrequest.update({'assignedToLastName': request.assignedToLastName})
            _openrequest.update({'assignedministrypersonFirstName': request.assignedministrypersonFirstName})
            _openrequest.update({'assignedministrypersonLastName': request.assignedministrypersonLastName})
            requestqueue.append(_openrequest)

        meta = {
            'page': requests.page,
            'pages': requests.pages,
            'total': requests.total,
            'prev_num': requests.prev_num,
            'next_num': requests.next_num,
            'has_next': requests.has_next,
            'has_prev': requests.has_prev,
        }

        return jsonify({'data': requestqueue, 'meta': meta})
Example #4
0
 def saverequestversion(self, foirequestschema, foirequestid, ministryid,
                        userid):
     activeversion = 1
     filenumber = foirequestschema.get("idNumber")
     #Identify version
     if foirequestid is not None:
         _foirequest = FOIRequest().getrequest(foirequestid)
         if _foirequest != {}:
             activeversion = _foirequest["version"] + 1
         else:
             return _foirequest
         FOIMinistryRequest.deActivateFileNumberVersion(
             ministryid, filenumber, activeversion, userid)
         self.__disablewatchers(ministryid, foirequestschema, userid)
         return self.saverequest(foirequestschema, userid, foirequestid,
                                 ministryid, filenumber, activeversion,
                                 _foirequest["foirawrequestid"],
                                 _foirequest["wfinstanceid"])
 def getrawrequestfieldsforid(self, requestid, fields):
     request = FOIRawRequest.get_request(requestid)
     fieldsresp = {}
     for field in fields:
         if field == "ministries" and request['status'] == 'Archived':
             fieldsresp[
                 'openedMinistries'] = FOIMinistryRequest.getministriesopenedbyuid(
                     request["requestid"])
     return fieldsresp
Example #6
0
 def createministryrequestwatcher(self, data, userid, usergroups):
     """Creates a watcher for a user with groups passed in for an opened request.
     """
     version = FOIMinistryRequest.getversionforrequest(
         data["ministryrequestid"])
     if 'watchedbygroup' in data:
         return FOIRequestWatcher.savewatcher(data, version, userid)
     else:
         return FOIRequestWatcher.savewatcherbygroups(
             data, version, userid, self.__getwatchablegroups(usergroups))
Example #7
0
 def __hasreopened(self, requestid, requesttype):
     if requesttype == "rawrequest":
         states =  FOIRawRequest.getstatenavigation(requestid)
     else:
         states =  FOIMinistryRequest.getstatenavigation(requestid)
     if len(states) == 2:
         newstate = states[0]
         oldstate = states[1]
         if newstate != oldstate and oldstate == "Closed":
             return True
     return False 
Example #8
0
 def __getauditfromministryrequest(self, id):
     _ministrydescriptions = []
     ministryrecords  = FOIMinistryRequest().getrequestById(id) 
     foirequestid = 0 
     for entry in ministryrecords:
         foirequestid = entry['foirequest_id']
         createdat = datetime.fromisoformat(entry['created_at']).strftime("%Y-%m-%d %H:%M:%S") 
         fromdate = datetime.fromisoformat(entry['recordsearchfromdate']).strftime("%Y-%m-%d") if entry['recordsearchfromdate'] is not None else None 
         todate = datetime.fromisoformat(entry['recordsearchtodate']).strftime("%Y-%m-%d") if entry['recordsearchtodate'] is not None else None
         _ministrydescriptions.append({"description": entry['description'], "fromdate": fromdate, "todate": todate, "createdat": createdat, "createdby": entry['createdby'], "status": entry['requeststatus.name']})
     return {"foirequestid" :foirequestid  , "audit":_ministrydescriptions}
Example #9
0
 def __haschanged(self, requestid, requesttype):
     if requesttype == "rawrequest":
         states = FOIRawRequest.getstatenavigation(requestid)
     else:
         states = FOIMinistryRequest.getstatenavigation(requestid)
     if len(states) == 2:
         newstate = states[0]
         oldstate = states[1]
         if newstate != oldstate:
             return newstate
     return None
Example #10
0
 def getlatestapprovedduedate(self, prevstatus, ministryrequestid,
                              approvedextension):
     if approvedextension and len(approvedextension) != 0:
         return approvedextension['extendedduedate']
     # if Prev extension status was Approved and no approved extension in FOIRequestExtension table then get the original DueDate from FOIMinisrtRequests table
     elif prevstatus == 2 and not approvedextension:
         duedate = FOIMinistryRequest.getrequestoriginalduedate(
             ministryrequestid)
         return duedate
     #if current and prev status is Pending or Denied
     else:
         return None
Example #11
0
 def getonholdtransition(self, foiministryrequestid):
     onholddate = None
     transitions = FOIMinistryRequest.getrequeststatusById(
         foiministryrequestid)
     for entry in transitions:
         if entry['requeststatusid'] == 11:
             onholddate = parse(str(
                 entry['created_at'])).strftime("%Y-%m-%d")
         else:
             if onholddate is not None:
                 break
     return onholddate
Example #12
0
 def getrequestdetailsforministry(self, foirequestid, foiministryrequestid,
                                  authmembershipgroups):
     request = FOIRequest.getrequest(foirequestid)
     requestministry = FOIMinistryRequest.getrequestbyministryrequestid(
         foiministryrequestid)
     requestministrydivisions = FOIMinistryRequestDivision.getdivisions(
         foiministryrequestid, requestministry['version'])
     baserequestinfo = {}
     if requestministry["assignedministrygroup"] in authmembershipgroups:
         baserequestinfo = self.__preparebaseinfo(request,
                                                  foiministryrequestid,
                                                  requestministry,
                                                  requestministrydivisions)
     return baserequestinfo
Example #13
0
 def createdueevent(self):
     try: 
         _today = self.gettoday()
         notificationservice().dismissremindernotification("ministryrequest", self.__notificationtype())            
         ca_holidays = self.getholidays()
         _upcomingdues = FOIMinistryRequest.getupcominglegislativeduerecords()
         for entry in _upcomingdues:
             _duedate = self.formatduedate(entry['duedate'])
             message = None
             if  _duedate == _today:                
                 message = self.__todayduemessage()     
             elif  self.getpreviousbusinessday(entry['duedate'],ca_holidays) == _today:
                 message = self.__upcomingduemessage(_duedate)
             self.__createnotification(message,entry['foiministryrequestid'])
         return DefaultMethodResult(True,'Legislative reminder notifications created',_today)
     except BusinessException as exception:            
         current_app.logger.error("%s,%s" % ('Legislative reminder Notification Error', exception.message))
         return DefaultMethodResult(False,'Legislative reminder notifications failed',_today)
Example #14
0
 def createdivisionevent(self, requestid, requesttype, userid):
     if requesttype != "ministryrequest":
         return DefaultMethodResult(True, 'No division required', requestid)
     version = FOIMinistryRequest.getversionforrequest(requestid)
     curdivisions = FOIMinistryRequestDivision.getdivisions(
         requestid, version)
     prevdivisions = FOIMinistryRequestDivision.getdivisions(
         requestid, version[0] - 1)
     divisionsummary = self.__maintained(curdivisions,
                                         prevdivisions) + self.__deleted(
                                             curdivisions, prevdivisions)
     if divisionsummary is None or (divisionsummary
                                    and len(divisionsummary) < 1):
         return DefaultMethodResult(True, 'No change', requestid)
     try:
         for division in divisionsummary:
             self.createcomment(requestid, division['division'],
                                division['stage'], division['event'],
                                userid)
         return DefaultMethodResult(True, 'Comment posted', requestid)
     except BusinessException as exception:
         return DefaultMethodResult(
             False, 'unable to post comment - ' + exception.message,
             requestid)
Example #15
0
 def __getrequest(self, requestid, requesttype):
     if requesttype == "ministryrequest":
         return FOIMinistryRequest.getrequestbyministryrequestid(requestid)
     else:
         return FOIRawRequest.get_request(requestid)
Example #16
0
 def __attachministriesinfo(self, request):
     if request != {} and request['status'] == 'Archived':
         request['requestrawdata'][
             'openedMinistries'] = FOIMinistryRequest.getministriesopenedbyuid(
                 request["requestid"])
     return request
Example #17
0
 def __getassignments(self, requestid, requesttype):
     if requesttype == "ministryrequest":
         return FOIMinistryRequest.getassignmenttransition(requestid)
     else:
         return FOIRawRequest.getassignmenttransition(requestid)
Example #18
0
 def updateministryrequestduedate(self, ministryrequestid, duedate, userid):
     return FOIMinistryRequest().updateduedate(ministryrequestid, duedate,
                                               userid)
    def createfoiministryrequestfromobject(self, ministryschema, requestschema,
                                           userid):
        requestdict = self.createfoiministryrequestfromobject1(
            ministryschema, requestschema)

        foiministryrequest = FOIMinistryRequest()
        foiministryrequest.foiministryrequestid = ministryschema[
            "foiministryrequestid"]
        foiministryrequest.version = ministryschema["version"] + 1
        foiministryrequest.foirequest_id = ministryschema["foirequest_id"]
        foiministryrequest.foirequestversion_id = ministryschema[
            "foirequestversion_id"]
        foiministryrequest.description = ministryschema["description"]
        foiministryrequest.recordsearchfromdate = requestdict[
            'recordsearchfromdate']
        foiministryrequest.recordsearchtodate = requestdict[
            'recordsearchtodate']
        foiministryrequest.filenumber = ministryschema["filenumber"]
        foiministryrequest.cfrduedate = requestdict['cfrduedate']
        foiministryrequest.startdate = requestdict['startdate']
        foiministryrequest.duedate = requestdict['duedate']
        foiministryrequest.assignedministrygroup = requestdict[
            'assignedministrygroup']
        if 'assignedministryperson' in requestschema:
            foiministryrequest.assignedministryperson = requestschema[
                'assignedministryperson']
            firstname = requestschema[
                'assignedministrypersonFirstName'] if requestschema[
                    'assignedministryperson'] != None else None
            middlename = None
            lastname = requestschema[
                'assignedministrypersonLastName'] if requestschema[
                    'assignedministryperson'] != None else None
            self.createfoiassigneefromobject(
                requestschema['assignedministryperson'], firstname, middlename,
                lastname)
        else:
            foiministryrequest.assignedministryperson = ministryschema[
                "assignedministryperson"]

        foiministryrequest.assignedgroup = requestdict['assignedgroup']
        if 'assignedto' in requestschema:
            foiministryrequest.assignedto = requestschema['assignedto']
            fn = requestschema['assignedtoFirstName'] if requestschema[
                'assignedto'] != None else None
            mn = None
            ln = requestschema['assignedtoLastName'] if requestschema[
                'assignedto'] != None else None
            self.createfoiassigneefromobject(requestschema['assignedto'], fn,
                                             mn, ln)
        else:
            foiministryrequest.assignedto = ministryschema["assignedto"]

        foiministryrequest.requeststatusid = requestdict['requeststatusid']
        foiministryrequest.programareaid = requestdict['programareaid']
        foiministryrequest.createdby = userid
        if 'divisions' in requestschema:
            foiministryrequest.divisions = self.createfoirequestdivision(
                requestschema, ministryschema["foiministryrequestid"],
                ministryschema["version"] + 1, userid)
        else:
            divisions = FOIMinistryRequestDivision().getdivisions(
                ministryschema["foiministryrequestid"],
                ministryschema["version"])
            foiministryrequest.divisions = self.createfoirequestdivisionfromobject(
                divisions, ministryschema["foiministryrequestid"],
                ministryschema["version"] + 1, userid)
        foiministryrequest.documents = self.createfoirequestdocuments(
            requestschema, ministryschema["foiministryrequestid"],
            ministryschema["version"] + 1, userid)
        foiministryrequest.extensions = self.createfoirequestextensions(
            ministryschema["foiministryrequestid"],
            ministryschema["version"] + 1, userid)
        foiministryrequest.closedate = requestdict['closedate']
        foiministryrequest.closereasonid = requestdict['closereasonid']
        return foiministryrequest
Example #20
0
 def __getministrystatus(self,filenumber, version):
     ministryreq = FOIMinistryRequest.getrequestbyfilenumberandversion(filenumber,version-1)
     return ministryreq["requeststatus.name"]    
Example #21
0
 def createministryrequestcomment(self, data, userid, type=1):
     version = FOIMinistryRequest.getversionforrequest(data["ministryrequestid"])
     return FOIRequestComment.savecomment(type, data, version, userid) 
Example #22
0
    def getrequest(self, foirequestid, foiministryrequestid):
        request = FOIRequest.getrequest(foirequestid)
        requestministry = FOIMinistryRequest.getrequestbyministryrequestid(
            foiministryrequestid)
        requestcontactinformation = FOIRequestContactInformation.getrequestcontactinformation(
            foirequestid, request['version'])
        requestapplicants = FOIRequestApplicantMapping.getrequestapplicants(
            foirequestid, request['version'])
        personalattributes = FOIRequestPersonalAttribute.getrequestpersonalattributes(
            foirequestid, request['version'])
        requestministrydivisions = FOIMinistryRequestDivision.getdivisions(
            foiministryrequestid, requestministry['version'])

        baserequestinfo = self.__preparebaseinfo(request, foiministryrequestid,
                                                 requestministry,
                                                 requestministrydivisions)
        baserequestinfo[
            'lastStatusUpdateDate'] = FOIMinistryRequest.getLastStatusUpdateDate(
                foiministryrequestid,
                requestministry['requeststatus.requeststatusid']).strftime(
                    self.__genericdateformat()),
        for contactinfo in requestcontactinformation:
            if contactinfo['contacttype.name'] == 'Email':
                baserequestinfo.update(
                    {'email': contactinfo['contactinformation']})
            else:
                baserequestinfo.update({
                    contactinfo['dataformat']:
                    contactinfo['contactinformation']
                })

        additionalpersonalinfo = {}
        for applicant in requestapplicants:
            firstname = applicant['foirequestapplicant.firstname']
            middlename = applicant['foirequestapplicant.middlename']
            lastname = applicant['foirequestapplicant.lastname']
            businessname = applicant['foirequestapplicant.businessname']
            dob = parse(applicant['foirequestapplicant.dob']).strftime(
                self.__genericdateformat(
                )) if applicant['foirequestapplicant.dob'] is not None else ''
            alsoknownas = applicant['foirequestapplicant.alsoknownas']
            requestortypeid = applicant['requestortype.requestortypeid']
            if requestortypeid == 1:
                baserequestinfo.update(
                    self.__prepareapplicant(firstname, middlename, lastname,
                                            businessname))
            additionalpersonalinfo.update(
                self.__prepareadditionalpersonalinfo(firstname, middlename,
                                                     lastname, dob,
                                                     alsoknownas,
                                                     requestortypeid))

        for personalattribute in personalattributes:
            attribute, location = self.__preparepersonalattribute(
                personalattribute)
            if location == "main":
                baserequestinfo.update(attribute)
            elif location == "additionalPersonalInfo":
                additionalpersonalinfo.update(attribute)

        baserequestinfo['additionalPersonalInfo'] = additionalpersonalinfo
        originalduedate = FOIMinistryRequest.getrequestoriginalduedate(
            foiministryrequestid)
        baserequestinfo['originalDueDate'] = originalduedate.strftime(
            self.__genericdateformat())
        return baserequestinfo
Example #23
0
 def __getversionforrequest(self, requestid):
     """ Returns the active version of the request id based on type.
     """
     return FOIMinistryRequest.getversionforrequest(requestid)[0]
Example #24
0
    def createministry(self,
                       requestschema,
                       ministry,
                       activeversion,
                       userid,
                       filenumber=None,
                       ministryid=None):
        foiministryrequest = FOIMinistryRequest()
        foiministryrequest.__dict__.update(ministry)
        foiministryrequest.requeststatusid = requestschema.get(
            "requeststatusid")
        foiministryrequest.isactive = True
        foiministryrequest.filenumber = self.generatefilenumber(
            ministry["code"], requestschema.get(
                "foirawrequestid")) if filenumber is None else filenumber
        foiministryrequest.programareaid = self.getvalueof(
            "programArea", ministry["code"])
        foiministryrequest.description = requestschema.get("description")
        foiministryrequest.duedate = requestschema.get("dueDate")
        if requestschema.get("cfrDueDate") is not None and requestschema.get(
                "cfrDueDate") != "":
            foiministryrequest.cfrduedate = requestschema.get("cfrDueDate")
        foiministryrequest.startdate = requestschema.get("startDate")
        foiministryrequest.created_at = datetime2.now().isoformat()
        foiministryrequest.createdby = userid
        requeststatusid = self.getpropertyvaluefromschema(
            requestschema, 'requeststatusid')
        if requeststatusid is not None:
            status = self.getstatusname(requeststatusid)
            if self.__isgrouprequired(status):
                foiministryrequest.assignedministrygroup = MinistryTeamWithKeycloackGroup[
                    ministry["code"]].value
        if self.isNotBlankorNone(requestschema, "fromDate", "main") == True:
            foiministryrequest.recordsearchfromdate = requestschema.get(
                "fromDate")
        if self.isNotBlankorNone(requestschema, "toDate", "main") == True:
            foiministryrequest.recordsearchtodate = requestschema.get("toDate")
        foiministryrequest.assignedgroup = requestschema.get("assignedGroup")
        if self.isNotBlankorNone(requestschema, "assignedTo", "main") == True:
            foiministryrequest.assignedto = requestschema.get("assignedTo")
            requestserviceministrybuilder().createfoiassigneefromobject(
                requestschema.get("assignedTo"),
                requestschema.get("assignedToFirstName"),
                requestschema.get("assignedToMiddleName"),
                requestschema.get("assignedToLastName"))
        else:
            foiministryrequest.assignedto = None
        if self.isNotBlankorNone(requestschema, "assignedministrygroup",
                                 "main") == True:
            foiministryrequest.assignedministrygroup = requestschema.get(
                "assignedministrygroup")
        if self.isNotBlankorNone(requestschema, "assignedministryperson",
                                 "main") == True:
            foiministryrequest.assignedministryperson = requestschema.get(
                "assignedministryperson")
            requestserviceministrybuilder().createfoiassigneefromobject(
                requestschema.get("assignedministryperson"),
                requestschema.get("assignedministrypersonFirstName"),
                requestschema.get("assignedministrypersonMiddleName"),
                requestschema.get("assignedministrypersonLastName"))
        if (ministryid is None and filenumber is None and status == "Open"):
            foiministryrequest.assignedto = None
            foiministryrequest.assignedgroup = self.__getgroupname(
                requestschema.get("requestType"), ministry["code"])

        if ministryid is not None:
            foiministryrequest.foiministryrequestid = ministryid
            activeversion = FOIMinistryRequest.getversionforrequest(
                ministryid)[0] + 1
            divisions = FOIMinistryRequestDivision().getdivisions(
                ministryid, activeversion - 1)
            foiministryrequest.divisions = requestserviceministrybuilder(
            ).createfoirequestdivisionfromobject(divisions, ministryid,
                                                 activeversion, userid)
            foiministryrequest.documents = requestserviceministrybuilder(
            ).createfoirequestdocuments(requestschema, ministryid,
                                        activeversion, userid)
            foiministryrequest.extensions = requestserviceministrybuilder(
            ).createfoirequestextensions(ministryid, activeversion, userid)
        foiministryrequest.version = activeversion
        foiministryrequest.closedate = self.getpropertyvaluefromschema(
            requestschema, 'closedate')
        foiministryrequest.closereasonid = self.getpropertyvaluefromschema(
            requestschema, 'closereasonid')
        return foiministryrequest
Example #25
0
 def __preparebaseinfo(self, request, foiministryrequestid, requestministry,
                       requestministrydivisions):
     _receiveddate = parse(request['receiveddate'])
     baserequestinfo = {
         'id':
         request['foirequestid'],
         'requestType':
         request['requesttype'],
         'receivedDate':
         _receiveddate.strftime('%Y %b, %d'),
         'receivedDateUF':
         parse(request['receiveddate']).strftime('%Y-%m-%d %H:%M:%S.%f'),
         'deliverymodeid':
         request['deliverymode.deliverymodeid'],
         'deliveryMode':
         request['deliverymode.name'],
         'receivedmodeid':
         request['receivedmode.receivedmodeid'],
         'receivedMode':
         request['receivedmode.name'],
         'assignedGroup':
         requestministry["assignedgroup"],
         'assignedTo':
         requestministry["assignedto"],
         'idNumber':
         requestministry["filenumber"],
         'description':
         requestministry['description'],
         'fromDate':
         parse(requestministry['recordsearchfromdate']).strftime(
             self.__genericdateformat())
         if requestministry['recordsearchfromdate'] is not None else '',
         'toDate':
         parse(requestministry['recordsearchtodate']).strftime(
             self.__genericdateformat())
         if requestministry['recordsearchtodate'] is not None else '',
         'currentState':
         requestministry['requeststatus.name'],
         'requeststatusid':
         requestministry['requeststatus.requeststatusid'],
         'requestProcessStart':
         parse(requestministry['startdate']).strftime(
             self.__genericdateformat())
         if requestministry['startdate'] is not None else '',
         'dueDate':
         parse(requestministry['duedate']).strftime(
             self.__genericdateformat()),
         'programareaid':
         requestministry['programarea.programareaid'],
         'category':
         request['applicantcategory.name'],
         'categoryid':
         request['applicantcategory.applicantcategoryid'],
         'assignedministrygroup':
         requestministry["assignedministrygroup"],
         'assignedministryperson':
         requestministry["assignedministryperson"],
         'selectedMinistries': [{
             'code':
             requestministry['programarea.bcgovcode'],
             'id':
             requestministry['foiministryrequestid'],
             'name':
             requestministry['programarea.name'],
             'selected':
             'true'
         }],
         'divisions':
         self.getdivisions(requestministrydivisions),
         'onholdTransitionDate':
         self.getonholdtransition(foiministryrequestid),
         'stateTransition':
         FOIMinistryRequest.getstatesummary(foiministryrequestid),
         'assignedToFirstName':
         requestministry["assignee.firstname"]
         if requestministry["assignedto"] != None else None,
         'assignedToLastName':
         requestministry["assignee.lastname"]
         if requestministry["assignedto"] != None else None,
         'assignedministrypersonFirstName':
         requestministry["ministryassignee.firstname"]
         if requestministry["assignedministryperson"] != None else None,
         'assignedministrypersonLastName':
         requestministry["ministryassignee.lastname"]
         if requestministry["assignedministryperson"] != None else None,
     }
     if requestministry['cfrduedate'] is not None:
         baserequestinfo.update({
             'cfrDueDate':
             parse(requestministry['cfrduedate']).strftime(
                 self.__genericdateformat())
         })
     return baserequestinfo