-
Notifications
You must be signed in to change notification settings - Fork 641
Add the possibility to Update ContentTypes assigned on existing Lists #2663
base: dev
Are you sure you want to change the base?
Conversation
…tingLists in order to control if CT shall be updated/added on existing lists.
Thanks @czullu , I've assigned @erwinvanhunen to this PR |
@@ -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) |
There was a problem hiding this comment.
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 :-/
There was a problem hiding this comment.
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.
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.