Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Add the possibility to Update ContentTypes assigned on existing Lists #2663

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

czullu
Copy link
Contributor

@czullu czullu commented May 29, 2020

Q A
Bug fix? no
New feature? yes
New sample? no
Related issues?

What's in this Pull Request?

Added the Option UpdateContentTypeOnExistingLists to ProvisioningTemplateApplyingInformation in order to tell the Methode UpdateList that it can Update ContentTypes on existing Lists.

…tingLists in order to control if CT shall be updated/added on existing lists.
@czullu czullu changed the title Add the possibility to have ContentTypes updated on existing Lists Add the possibility to have ContentTypes default ContantyType changed on existing Lists Jun 2, 2020
@czullu czullu changed the title Add the possibility to have ContentTypes default ContantyType changed on existing Lists Add the possibility to Update ContentTypes assigned on existing Lists Jun 2, 2020
@jansenbe
Copy link
Contributor

jansenbe commented Jun 4, 2020

Thanks @czullu , I've assigned @erwinvanhunen to this PR

@jansenbe jansenbe added the status:tracked Triaged and are being investigated further label Jun 4, 2020
@@ -1467,7 +1467,8 @@ private static XElement PrepareField(XElement fieldElement)
isDirty = false;
}

if (existingList.ContentTypesEnabled)
//it might make sense to update ContentType on existing list in case we want to add/refresh a ContentType even if users should not choose
if (existingList.ContentTypesEnabled|| UpdateContentTypeOnExistingLists)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the new property shouldn't be called UpdateContentTypeOnExistingLists but something like ForceUpdateListContentType or so. UpdateContentTypeOnExistingLists sounds like I have to to always set it to true because otherwise CTs won't be updated. But this is not the case. They are updated, but only if CTs are enabled on the list.
Or what about UpdateContentTypesEvenOnListsWithDisabledContentTypes?

Naming is hard :-/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi- it could be "ForceUpdateListCTWhenManageCTDisabled" - but maybe a better comment with the parameter would be sufficient as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:tracked Triaged and are being investigated further
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants