diff --git a/.github/workflows/ci-cd-pims-dev.yml b/.github/workflows/ci-cd-pims-dev.yml index 05edb002ec..c42a1d2bde 100644 --- a/.github/workflows/ci-cd-pims-dev.yml +++ b/.github/workflows/ci-cd-pims-dev.yml @@ -123,7 +123,7 @@ jobs: - name: call scripts to upgrade database shell: bash run: | - oc process -f ./openshift/4.0/templates/jobs/db-deploy.yaml -p DB_SECRET_NAME=pims-database GIT_BRANCH=dev SERVER_NAME=sqldevtst.th.gov.bc.ca -p DB_NAME=PIMS_DEV -p NAMESPACE=3cd915-dev | oc create -f - | grep -oP "(?<=job\.batch/)[^\s]*" | (read JOB_NAME; oc wait --for=condition=complete job/$JOB_NAME --timeout=120s) + oc process -f ./openshift/4.0/templates/jobs/db-deploy.yaml -p DB_SECRET_NAME=pims-database -p GIT_BRANCH=dev -p SERVER_NAME=sqldevtst.th.gov.bc.ca -p DB_NAME=PIMS_DEV -p NAMESPACE=3cd915-dev | oc create -f - | grep -oP "(?<=job\.batch/)[^\s]*" | (read JOB_NAME; oc wait --for=condition=complete job/$JOB_NAME --timeout=120s) sync-keycloak: name: Sync Keycloak diff --git a/.github/workflows/retag-dev-to-test.yml b/.github/workflows/retag-dev-to-test.yml index bfc83042db..8da2e51f9b 100644 --- a/.github/workflows/retag-dev-to-test.yml +++ b/.github/workflows/retag-dev-to-test.yml @@ -85,7 +85,7 @@ jobs: - name: call scripts to upgrade database shell: bash run: | - oc process -f ./openshift/4.0/templates/jobs/db-deploy.yaml -p DB_SECRET_NAME=pims-database-test GIT_BRANCH=dev SERVER_NAME=sqldevtst.th.gov.bc.ca -p DB_NAME=PIMS_TST -p NAMESPACE=3cd915-dev | oc create -f - | grep -oP "(?<=job\.batch/)[^\s]*" | (read JOB_NAME; oc wait --for=condition=complete job/$JOB_NAME --timeout=120s) + oc process -f ./openshift/4.0/templates/jobs/db-deploy.yaml -p DB_SECRET_NAME=pims-database-test -p GIT_BRANCH=dev -p SERVER_NAME=sqldevtst.th.gov.bc.ca -p DB_NAME=PIMS_TST -p NAMESPACE=3cd915-dev | oc create -f - | grep -oP "(?<=job\.batch/)[^\s]*" | (read JOB_NAME; oc wait --for=condition=complete job/$JOB_NAME --timeout=120s) sync-keycloak: diff --git a/.github/workflows/retag-test-to-uat.yml b/.github/workflows/retag-test-to-uat.yml index ef6f24268a..9adcb162f7 100644 --- a/.github/workflows/retag-test-to-uat.yml +++ b/.github/workflows/retag-test-to-uat.yml @@ -7,6 +7,7 @@ env: MS_TEAMS_WEBHOOK_BUILD_CHANNEL: ${{ secrets.MS_TEAMS_WEBHOOK_URI_BUILD_CHANNEL }} AUTH__KEYCLOAK__SECRET: ${{ secrets.KEYCLOAK_SECRET_UAT }} AUTH__KEYCLOAK__SERVICEACCOUNT__SECRET: ${{ secrets.KEYCLOAK_SERVICEACCOUNT_SECRET }} + sync-directory: ./tools/keycloak/sync ## variables for scripts under git\openshift\4.0\scripts\oc-*.sh APP_PORT: 8080 @@ -83,7 +84,7 @@ jobs: - name: call scripts to upgrade database shell: bash run: | - oc process -f ./openshift/4.0/templates/jobs/db-deploy.yaml -p DB_SECRET_NAME=pims-database GIT_BRANCH=test SERVER_NAME=sqlprd.th.gov.bc.ca -p DB_NAME=PIMS_UAT -p NAMESPACE=3cd915-test | oc create -f - | grep -oP "(?<=job\.batch/)[^\s]*" | (read JOB_NAME; oc wait --for=condition=complete job/$JOB_NAME --timeout=120s) + oc process -f ./openshift/4.0/templates/jobs/db-deploy.yaml -p DB_SECRET_NAME=pims-database -p GIT_BRANCH=test -p SERVER_NAME=sqlprd.th.gov.bc.ca -p DB_NAME=PIMS_UAT -p NAMESPACE=3cd915-test | oc create -f - | grep -oP "(?<=job\.batch/)[^\s]*" | (read JOB_NAME; oc wait --for=condition=complete job/$JOB_NAME --timeout=120s) sync-keycloak: name: Sync Keycloak diff --git a/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj b/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj index 74fd313a84..bf9a26060b 100644 --- a/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj +++ b/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj @@ -41,10 +41,10 @@ Package 1 0 - 36 + 47 - {E6831E32-A690-41BA-A665-7CF969E8783F} + {C036C22A-FB08-4CA9-8625-018613EC0B33} 8 @@ -77,7 +77,7 @@ 0 0 0 - Data Source=sqldevtst.th.gov.bc.ca;Initial Catalog=PIMS_TST;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package-{C854C770-B13C-477E-8DD4-44721E1B9FCF}sqldevtst.th.gov.bc.ca.PIMS_DEV; + Data Source=sqldevtst.th.gov.bc.ca;Initial Catalog=PIMS_DEV;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package-{C854C770-B13C-477E-8DD4-44721E1B9FCF}sqldevtst.th.gov.bc.ca.PIMS_DEV; 18 @@ -137,7 +137,7 @@ 0 0 0 - PIMS_TST + PIMS_DEV 18 diff --git a/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj.user b/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj.user index 8f318c130b..5acde15791 100644 --- a/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj.user +++ b/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION.dtproj.user @@ -8,6 +8,8 @@ false + ssistst.th.gov.bc.ca + /SSISDB/PIMS_DEV/PIMS_PROPERTY_SPATIAL_CORRECTION false diff --git a/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/Package.dtsx b/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/Package.dtsx index 828a833696..a19f112de1 100644 --- a/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/Package.dtsx +++ b/etl/PIMS_PROPERTY_SPATIAL_CORRECTION/PIMS_PROPERTY_SPATIAL_CORRECTION/Package.dtsx @@ -12,8 +12,8 @@ DTS:ObjectName="Package" DTS:PackageType="5" DTS:ProtectionLevel="0" - DTS:VersionBuild="36" - DTS:VersionGUID="{E6831E32-A690-41BA-A665-7CF969E8783F}"> + DTS:VersionBuild="47" + DTS:VersionGUID="{C036C22A-FB08-4CA9-8625-018613EC0B33}"> 8 @@ -26,7 +26,7 @@ + DTS:ConnectionString="Data Source=sqldevtst.th.gov.bc.ca;Initial Catalog=PIMS_DEV;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;Application Name=SSIS-Package-{C854C770-B13C-477E-8DD4-44721E1B9FCF}sqldevtst.th.gov.bc.ca.PIMS_DEV;" /> @@ -44,7 +44,7 @@ @@ -137,120 +137,6 @@ - - - 0 - UPDATE PIMS_PROPERTY SET LOCATION = geometry::STGeomFromText(?, 3008), CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 WHERE PROPERTY_ID = ? - 1252 - - - - - - - - - - - - - - 65 - - - - - 81 - - - - - - - - - - - - - - - - - - SC_4664d38d6d774888963e21557351c901 msBuild SC_4664d38d6d774888963e21557351c901 - {19A4DA25-7A35-4FC3-9BDA-B04939D13BB1} + {9DFA908A-4CC6-4FE2-93C1-582187F61F61} @@ -2671,380 +2566,380 @@ namespace Priority_Queue @@ -3156,6 +3051,132 @@ AAAAAAAAAAAAAAA=]]> + + + 0 + [dbo].[TEMP_PROPERTY_LOCATION] + + + 1252 + false + 3 + false + false + TABLOCK,CHECK_CONSTRAINTS,ROWS_PER_BATCH = 1000 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + + + startId="Package\Correct PIMS Locations\Script Component.Outputs[Output 0]" /> + + + + + + + + + + + + + + + + + + + + + + + @@ -3189,11 +3284,89 @@ AAAAAAAAAAAAAAA=]]> design-time-name="Package"> + Capacity="8" xmlns="clr-namespace:Microsoft.SqlServer.IntegrationServices.Designer.Model.Serialization;assembly=Microsoft.SqlServer.IntegrationServices.Graph" xmlns:mssgle="clr-namespace:Microsoft.SqlServer.Graph.LayoutEngine;assembly=Microsoft.SqlServer.Graph" xmlns:assembly="http://schemas.microsoft.com/winfx/2006/xaml"> + TopLeft="60,107.5" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3214,13 +3387,9 @@ AAAAAAAAAAAAAAA=]]> Size="159,42" Id="Package\Correct PIMS Locations\Conditional Split" TopLeft="63.5,209.5" /> - + Id="Package\Correct PIMS Locations.Paths[Output 0]" + TopLeft="143,149.5"> - + + Id="Package\Correct PIMS Locations.Paths[OLE DB Source Output]" + TopLeft="143,47.5"> + + Id="Package\Correct PIMS Locations.Paths[VALID_NEW_LOCATION]" + TopLeft="143,251.5"> + End="313.5,67"> + End="0,33.25" /> + + + + - + @@ -3302,5 +3487,18 @@ AAAAAAAAAAAAAAA=]]> + + + + DataSourceViewID + + + TableInfoObjectType + Table + + + ]]> \ No newline at end of file diff --git a/source/backend/dal/Repositories/PropertyRepository.cs b/source/backend/dal/Repositories/PropertyRepository.cs index 53b2849a72..6be4a2230a 100644 --- a/source/backend/dal/Repositories/PropertyRepository.cs +++ b/source/backend/dal/Repositories/PropertyRepository.cs @@ -451,7 +451,7 @@ public HashSet GetMatchingIds(PropertyFilterCriteria filter) if (!string.IsNullOrEmpty(filter.LeasePayRcvblType)) { query = query.Where(p => - p.PimsPropertyLeases.Any(pl => pl.Lease.LeasePayRvblTypeCode == filter.LeasePayRcvblType || filter.LeasePayRcvblType == "all")); + p.PimsPropertyLeases.Any(pl => (pl.Lease.LeasePayRvblTypeCode == filter.LeasePayRcvblType || filter.LeasePayRcvblType == "all") && (pl.Lease.OrigExpiryDate >= DateTime.Now.Date || pl.Lease.PimsLeaseTerms.Any(t => t.TermExpiryDate == null || t.TermExpiryDate >= DateTime.Now.Date)))); } // Anomalies diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/models.ts b/source/frontend/src/features/mapSideBar/acquisition/common/models.ts index e4cc32ec86..f539b9d4dd 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/common/models.ts +++ b/source/frontend/src/features/mapSideBar/acquisition/common/models.ts @@ -1,4 +1,4 @@ -import { isEmpty } from 'lodash'; +import { isEmpty, isNumber } from 'lodash'; import { fromApiOrganization, fromApiPerson, IContactSearchResult } from '@/interfaces'; import { Api_AcquisitionFileOwner, Api_AcquisitionFileTeam } from '@/models/api/AcquisitionFile'; @@ -42,9 +42,10 @@ export class AcquisitionTeamFormModel { person: undefined, organizationId: organizationId ?? undefined, organization: undefined, - primaryContactId: Number.isFinite(this.primaryContactId) - ? Number(this.primaryContactId) - : undefined, + primaryContactId: + !!this.primaryContactId && isNumber(+this.primaryContactId) + ? Number(this.primaryContactId) + : undefined, teamProfileType: toTypeCode(this.contactTypeCode), teamProfileTypeCode: this.contactTypeCode, }; diff --git a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/PropertyActivityEditForm.tsx b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/PropertyActivityEditForm.tsx index 73b356736e..67ccb5f9a1 100644 --- a/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/PropertyActivityEditForm.tsx +++ b/source/frontend/src/features/mapSideBar/property/tabs/propertyDetailsManagement/activity/edit/PropertyActivityEditForm.tsx @@ -52,6 +52,9 @@ export const PropertyActivityEditForm: React.FunctionComponent< const initialForm = useMemo(() => { const initialModel = PropertyActivityFormModel.fromApi(props.activity); + if (props.activity === undefined) { + initialModel.activityStatusCode = 'NOTSTARTED'; + } setActivityType(initialModel.activityTypeCode); return initialModel; }, [props.activity]);