Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting/Provisioning _ModerationStatus for folders #654

Merged
merged 4 commits into from
May 23, 2022

Conversation

magarma
Copy link
Contributor

@magarma magarma commented May 4, 2022

Currently when a document library has enable moderation activated and has approved folders, when exporting them and provisioning a new site from the template the folders keep pending.
Since there is no attribute on the PnP Schema to set that on the Folder, I've done a change to get _ModerationStatus as property only for Folders ( if it's set in the ViewFields export list configuration ) and also to support modify that field if present during the creation of the folder.

magarma added 4 commits May 4, 2022 12:27
Allow to export as property _ModerationStatus if it's indicated in the viewfields query configuration.
Update moderation status in a folder in a different step to other properties because SharePoint doesn't allow to do it at the same time.
Update _ModerationStatus at the end to avoid set the folder pending due to changes on propertybags or security
@magarma magarma changed the title Export/Provisioning _ModerationStatus for folders Exporting/Provisioning _ModerationStatus for folders May 4, 2022
@jansenbe jansenbe self-assigned this May 23, 2022
jansenbe added a commit that referenced this pull request May 23, 2022
@jansenbe jansenbe merged commit 9ff994d into pnp:dev May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants