4

We are interested in fetching component's full version history using core service. We have successfully fetched the component's data but not been able to find revisor name(i.e. user who modified the item last) as revisor is null.

Code snippet:

//Method to fetch component and version info                  
SearchQueryData filter = new SearchQueryData(); 
DateTime date = new DateTime(2015, 03, 30); 
filter.ModifiedAfter = date; 
//returns the list of items changed by date 
IdentifiableObjectData[] data = client.GetSearchResults(filter);

//check the version history of the item no 2 from the list                  
VersionsFilterData versionsFilter = new VersionsFilterData(); 
IdentifiableObjectData[] versionList = client.GetList(data[1].Id, versionsFilter);

//check the username who last modified the component 
var versionInfo = (FullVersionInfo)versionList[2].VersionInfo; 
LinkToUserData revisor = versionInfo.Revisor;

Are we missing any configuration or setting get user information who modified the item last?

7

You are missing the:

VersionsFilterData versionsFilter = new VersionsFilterData();
versionsFilter.IncludeRevisorDescriptionColumn  = true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.