From 1afd61dcdf42d8629561f3d38a7772091a2834c3 Mon Sep 17 00:00:00 2001 From: Richard Qi Date: Mon, 10 Jun 2024 16:25:20 -0700 Subject: [PATCH 1/3] bug fix: wrong page count --- .../MCS.FOI.AXISIntegration.DAL/RequestsDA.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs b/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs index c92718d24..f92ab2b46 100644 --- a/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs +++ b/axisintegrationapi/MCS.FOI.AXISIntegration/MCS.FOI.AXISIntegration.DAL/RequestsDA.cs @@ -196,7 +196,7 @@ private DataTable GetAxisRequestData(string request) onbehalf.vcLastName as onbehalfLastName, onbehalf.vcMiddleName as onbehalfMiddleName, (SELECT terminology.vcTerminology from tblTerminologyLookup terminology WHERE terminology.iLabelID = requestTypes.iLabelID and terminology.tiLocaleID = 1) as requestType, - sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT + sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT else 0 end) as requestPageCount, (case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount, @@ -353,7 +353,7 @@ private DataTable GetAxisRequestsPageCount(string[] arrayOfRequestId) ConnectionString = SettingsManager.ConnectionString; var inClauseValues = RequestsHelper.GetInClause(arrayOfRequestId); - string query = $@"Select vcVisibleRequestID as axisRequestId, sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT + string query = $@"Select vcVisibleRequestID as axisRequestId, sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT else 0 end) as requestPageCount, (case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount @@ -394,7 +394,7 @@ private DataTable GetAxisRequestsPageCount() { ConnectionString = SettingsManager.ConnectionString; - string query = @"Select vcVisibleRequestID as axisRequestId, sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT + string query = @"Select vcVisibleRequestID as axisRequestId, sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT else 0 end) as requestPageCount, (case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount From 6584969f99b406dd8965c527e5799e768a6164d2 Mon Sep 17 00:00:00 2001 From: Richard Qi Date: Tue, 11 Jun 2024 10:55:28 -0700 Subject: [PATCH 2/3] bug fix: axis sync set mod page count to 0 --- forms-flow-web/src/components/FOI/FOIRequest/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/forms-flow-web/src/components/FOI/FOIRequest/utils.js b/forms-flow-web/src/components/FOI/FOIRequest/utils.js index d06081cee..f981f15eb 100644 --- a/forms-flow-web/src/components/FOI/FOIRequest/utils.js +++ b/forms-flow-web/src/components/FOI/FOIRequest/utils.js @@ -440,6 +440,9 @@ export const persistRequestFieldsNotInAxis = (newRequestDetails, existingRequest newRequestDetails.assignedToFirstName= existingRequestDetails.assignedToFirstName; newRequestDetails.assignedToLastName= existingRequestDetails.assignedToLastName; newRequestDetails.assignedToName= existingRequestDetails.assignedToName; + if(existingRequestDetails.recordspagecount && existingRequestDetails.recordspagecount > 0) { + newRequestDetails.recordspagecount= existingRequestDetails.recordspagecount; + } let foiReqAdditionalPersonalInfo = existingRequestDetails.additionalPersonalInfo; let axisAdditionalPersonalInfo = newRequestDetails.additionalPersonalInfo; if(newRequestDetails.requestType === 'personal'){ From 70a77e36ae2ec44acd631012d6fb20a8cf8eb0b0 Mon Sep 17 00:00:00 2001 From: Richard Qi Date: Tue, 11 Jun 2024 11:29:39 -0700 Subject: [PATCH 3/3] bug fix: axis sync set recordspagecount to 0 --- forms-flow-web/src/components/FOI/FOIRequest/utils.js | 3 --- .../request_api/schemas/foirequestwrapper.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/forms-flow-web/src/components/FOI/FOIRequest/utils.js b/forms-flow-web/src/components/FOI/FOIRequest/utils.js index f981f15eb..d06081cee 100644 --- a/forms-flow-web/src/components/FOI/FOIRequest/utils.js +++ b/forms-flow-web/src/components/FOI/FOIRequest/utils.js @@ -440,9 +440,6 @@ export const persistRequestFieldsNotInAxis = (newRequestDetails, existingRequest newRequestDetails.assignedToFirstName= existingRequestDetails.assignedToFirstName; newRequestDetails.assignedToLastName= existingRequestDetails.assignedToLastName; newRequestDetails.assignedToName= existingRequestDetails.assignedToName; - if(existingRequestDetails.recordspagecount && existingRequestDetails.recordspagecount > 0) { - newRequestDetails.recordspagecount= existingRequestDetails.recordspagecount; - } let foiReqAdditionalPersonalInfo = existingRequestDetails.additionalPersonalInfo; let axisAdditionalPersonalInfo = newRequestDetails.additionalPersonalInfo; if(newRequestDetails.requestType === 'personal'){ diff --git a/request-management-api/request_api/schemas/foirequestwrapper.py b/request-management-api/request_api/schemas/foirequestwrapper.py index 67db1d9b0..d41378eb0 100644 --- a/request-management-api/request_api/schemas/foirequestwrapper.py +++ b/request-management-api/request_api/schemas/foirequestwrapper.py @@ -91,6 +91,7 @@ class Meta: # pylint: disable=too-few-public-methods axisSyncDate = fields.Str(data_key="axisSyncDate",allow_none=True) axisRequestId = fields.Str(data_key="axisRequestId",allow_none=True, validate=[validate.Length(max=120, error=MAX_EXCEPTION_MESSAGE)]) axispagecount = fields.Int(data_key="axispagecount",allow_none=True) + recordspagecount = fields.Int(data_key="recordspagecount",allow_none=True) description = fields.Str(data_key="description", required=True,validate=[validate.Length(min=1, error=BLANK_EXCEPTION_MESSAGE)]) category = fields.Str(data_key="category", required=True,validate=[validate.Length(min=1, error=BLANK_EXCEPTION_MESSAGE)]) requestType = fields.Str(data_key="requestType", required=True,validate=[validate.Length(min=1, error=BLANK_EXCEPTION_MESSAGE)])