0

I' reading out the versions of my List with the following code:

string fileUrl = "/sites/dev1/MyTool/Lists/TicketsList/1_.000";
FileVersionCollection fileVersionCollection;
File file = clientcontext.Web.GetFileByServerRelativeUrl(fileUrl);
fileVersionCollection = file.Versions;
clientcontext.Load(file);
clientcontext.Load(fileVersionCollection);
clientcontext.ExecuteQuery();

This works fine and I get a FileVersionCollection object back.

Is it possible to get the information about the changes as you can see in screenshot?

I want to get little reports, e.g.

  • How long was ticket XYZ in status "New"
  • Who changed this?
  • ...

enter image description here

D. Müller
  • 3,336
  • 4
  • 36
  • 84

1 Answers1

1

Is it Office365 SharePoint instance, because I see that you use CSOM.

I had similar task, but to migrate all the item versions. I also could not find such a functionality provided by the APIs for Office365. You cannot even get the full item metadata for particular version. I had to expose the /_vti_bin/Lists.asmx to get the version items. More on this here: http://sharepoint.bg/post/How-to-get-list-item-field-versions-data-in-Office365-SharePoint-Online.aspx

However as from what I remember getting the version 2.0 of the item will give you all the item metadata, not the diff with the changes, but not 100% sure. At least you will have all version information and you can implement some code to compare versions and get the required differences.

It is not very fast in terms of performance, but it is something.

Velin Georgiev
  • 2,359
  • 1
  • 15
  • 21