ObjVerID property of VaultHistoryItem

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
mmoayyed
Posts: 26
Joined: Tue Feb 26, 2008 12:43 pm

ObjVerID property of VaultHistoryItem

Post by mmoayyed » Thu Dec 17, 2009 6:03 pm

I'd like to ask if it's possible to figure out that history item's version number using the ObjVerID property of VaultHistoryItem.

I have examined the Version property as well, but it doesn't always return the correct value. Sometimes, the value returned seems to be a very large integer, one that I know is not the real version. It seems like it's returning some type of ID. I also realize that by looking at the actual transaction, getting the item version might be possible but that seems to be terribly slow in loop of more than 100,000 items.

I was hoping to find a method that could find the version object by looking at the ObjVerID. (I do have the full path available)

Any suggestions ?

mmoayyed
Posts: 26
Joined: Tue Feb 26, 2008 12:43 pm

Re: ObjVerID property of VaultHistoryItem

Post by mmoayyed » Thu Dec 17, 2009 6:39 pm

if I am not wrong, it seems like the Version property returns the strange id-like number if the history item is added/created [?] otherwise, the version seems to be correct.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: ObjVerID property of VaultHistoryItem

Post by jeremy_sg » Fri Dec 18, 2009 11:57 am

It's been my experience that the version number in Version is always correct.

When you look at the History dialog in the GUI client do the versions seem wrong there?
Subscribe to the Fortress/Vault blog

mmoayyed
Posts: 26
Joined: Tue Feb 26, 2008 12:43 pm

Re: ObjVerID property of VaultHistoryItem

Post by mmoayyed » Fri Dec 18, 2009 1:20 pm

The GUI client displays versions correctly. What I encounter is that based on the history type of the item, if the the type is set to "Added", I would assume the version should be 1 but [and this is not always!] I get back values like 35243, etc. When I examine the actual transaction by way of looking at the TxID and subsequently looking at the Items array, I can see the correct version.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Re: ObjVerID property of VaultHistoryItem

Post by jeremy_sg » Fri Dec 18, 2009 1:24 pm

I see now. What you're seeing is the parent folder history event, and the parent folder version number. "Added" is the folder event that says a new item is now in the folder. Created is the file or folder creation event.
Subscribe to the Fortress/Vault blog

Post Reply