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

Support document library owner to make change of the file version trim mode #2869

Merged
merged 17 commits into from
Mar 30, 2023

Conversation

msjennywu
Copy link
Contributor

@msjennywu msjennywu commented Mar 6, 2023

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

NA

What is in this Pull Request ?

[FileVersion] Support document library owner to make change of the file version trim mode

  1. Added 2 parameters "EnableAutoExpirationVersionTrim" and "ExpireVersionsAfterDays"
  2. Added logic to update the doc lib trim mode by the values of the 2 new parameters
  3. Updated the Set-PnPList.md file with description of the 2 new parameters and examples

@KoenZomers KoenZomers changed the title Sp file version Support document library owner to make change of the file version trim mode Mar 8, 2023
@KoenZomers
Copy link
Collaborator

Thanks for contributing @msjennywu! I cannot get this compiled on my machine and as you can see, it also doesn't compile in the Git Actions process. Can you elaborate how you got the properties you're using? Perhaps a newer CSOM library version than we're using?

@KoenZomers KoenZomers added the in review PR or issue is currently being reviewed label Mar 9, 2023
@msjennywu
Copy link
Contributor Author

Thanks for contributing @msjennywu! I cannot get this compiled on my machine and as you can see, it also doesn't compile in the Git Actions process. Can you elaborate how you got the properties you're using? Perhaps a newer CSOM library version than we're using?

@msjennywu msjennywu closed this Mar 9, 2023
@msjennywu msjennywu reopened this Mar 9, 2023
@msjennywu
Copy link
Contributor Author

Thanks for contributing @msjennywu! I cannot get this compiled on my machine and as you can see, it also doesn't compile in the Git Actions process. Can you elaborate how you got the properties you're using? Perhaps a newer CSOM library version than we're using?

@KoenZomers Thanks for the review! Yes, it uses new properties which is not in the published library yet. This is my first time to make the change here. I'm trying to send out review and get comments as earlier as possible. Please feel free to let me know if this PR impacts you guys or break anything. Thanks so much!

@KoenZomers
Copy link
Collaborator

Thanks for elaborating. Which CSOM library version did you compile this against and where did you get it from?

@msjennywu
Copy link
Contributor Author

msjennywu commented Mar 10, 2023

Thanks for elaborating. Which CSOM library version did you compile this against and where did you get it from?

I use the "Microsoft.Sharepoint.Client.dll" that built in my local Sharepoint repository. Replaced the one in nuget packages folder.
I renamed the properties that are not in the published dll, they are using the same name as the previous published properties in the new commit.
I think the build will pass now. Please let me know if still any issue. Thanks!

@KoenZomers
Copy link
Collaborator

@msjennywu Its still unclear to me where you got the CSOM library from. I haven't heard yet that Microsoft was working on the functionality you're adding. Can you share more on where you got this from? It still doesn't build here nor in GitHub Actions.

@msjennywu
Copy link
Contributor Author

@msjennywu Its still unclear to me where you got the CSOM library from. I haven't heard yet that Microsoft was working on the functionality you're adding. Can you share more on where you got this from? It still doesn't build here nor in GitHub Actions.

Ah, my previous change is till not published I think. My CSOM change in Sharepoint is in build [16.0.23415.12000], but the published one here https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM is 16.0.23408.12000. Should I close my PR to unblock your building? And open it when my change is published? Please feel free to ping me (jennywu) on MS teams.

@VesaJuvonen
Copy link
Contributor

These changes will be out with the CSOM release planned to get out in 31st of March. Let's double check the situation again then and move forward as needed.

@KoenZomers KoenZomers added the pending CSOM release Waiting for a new CSOM version to be released containing new functionality label Mar 23, 2023
@KoenZomers
Copy link
Collaborator

Works now with the newly released CSOM library. Thanks @msjennywu for your contribution!

@KoenZomers KoenZomers merged commit f2fe362 into pnp:dev Mar 30, 2023
@jackpoz
Copy link
Contributor

jackpoz commented Apr 3, 2023

I was very curious about this PR mentioned in the latest release notes. I couldn't find any documentation from CSOM about it but then SPO answered me when I tried to change these properties:

Invoke-PnPQuery: The requested operation is part of a feature that is in private preview and will be available when the feature becomes generally available (GA).

Cool feature, can't wait for it to be GA 🚀

@KoenZomers
Copy link
Collaborator

Interesting feature indeed! More on this will be released in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review PR or issue is currently being reviewed pending CSOM release Waiting for a new CSOM version to be released containing new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants