From 139d2876d71fbebf80bcce4d8ecb8d236f6f814f Mon Sep 17 00:00:00 2001 From: Remi Blom-Ohlsen Date: Wed, 15 Mar 2023 11:09:25 +0100 Subject: [PATCH 1/3] Add undefined check if templateParamters is null to prevent sync bug --- .../ProjectWebParts/src/data/SPDataAdapter/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts b/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts index f364489f9..062e43fdc 100644 --- a/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts +++ b/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts @@ -132,7 +132,7 @@ class SPDataAdapter extends SPDataAdapterBase { {} ) const [fields, siteUsers] = await Promise.all([ - templateParameters.ProjectContentTypeId + templateParameters && templateParameters.ProjectContentTypeId ? this.entityService .usingParams({ contentTypeId: templateParameters.ProjectContentTypeId }) .getEntityFields() @@ -146,7 +146,7 @@ class SPDataAdapter extends SPDataAdapterBase { }[] >() ]) - const fieldsToSync = this._getFieldsToSync(fields, templateParameters.CustomSiteFields, [ + const fieldsToSync = this._getFieldsToSync(fields, templateParameters && templateParameters.CustomSiteFields, [ 'GtIsParentProject', 'GtIsProgram' ]) From eb78d0ee8bc1b677a1421a5709dadcd7a50d1a1c Mon Sep 17 00:00:00 2001 From: Remi Blom-Ohlsen Date: Wed, 15 Mar 2023 11:14:52 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb4e1a56a..c9ab6ae0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Sjekk ut [release notes](./releasenotes/1.8.0.md) for høydepunkter og mer detal - Fikset et problem i oppgraderingsskript der noen tenants ikke kunne hente alle hub children - Fikset et problem hvor kommandolinje ikke ble vist som standard [#1042](https://github.com/Puzzlepart/prosjektportalen365/issues/1042) +- Fikset problem hvor det ikke var mulig å synkronisere data fra 'Prosjektdata' listen (Idebehandling) ## 1.8.0 - 28.02.2023 From 8c36a466a519237241992ddca196fca7fe937a5f Mon Sep 17 00:00:00 2001 From: Remi Blom-Ohlsen Date: Mon, 20 Mar 2023 09:08:40 +0100 Subject: [PATCH 3/3] Minor adjustments --- .../ProjectWebParts/src/data/SPDataAdapter/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts b/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts index 062e43fdc..50f2c497d 100644 --- a/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts +++ b/SharePointFramework/ProjectWebParts/src/data/SPDataAdapter/index.ts @@ -132,7 +132,7 @@ class SPDataAdapter extends SPDataAdapterBase { {} ) const [fields, siteUsers] = await Promise.all([ - templateParameters && templateParameters.ProjectContentTypeId + templateParameters?.ProjectContentTypeId ? this.entityService .usingParams({ contentTypeId: templateParameters.ProjectContentTypeId }) .getEntityFields() @@ -146,7 +146,7 @@ class SPDataAdapter extends SPDataAdapterBase { }[] >() ]) - const fieldsToSync = this._getFieldsToSync(fields, templateParameters && templateParameters.CustomSiteFields, [ + const fieldsToSync = this._getFieldsToSync(fields, templateParameters?.CustomSiteFields, [ 'GtIsParentProject', 'GtIsProgram' ])