Client API problem. Please help.

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
gn1024
Posts: 9
Joined: Mon Sep 28, 2009 6:36 am

Client API problem. Please help.

Post by gn1024 » Thu Dec 03, 2009 9:38 am

Hello,

I am using Vault Client API for Vault Server v3.5.1.4786.

Included command line client, when used with LISTALLTXITEMS command, always returns empty ItemPath1 and ItemPath2 atributes from this line of code:

Code: Select all

_ci.Connection.GetTxDetail(_ci.ActiveRepositoryID, txid, out userid, out userlogin, out comment, out items);
So I can't figure out which folder is the transaction item from.
Is this a bug or there is some other way to get the following information for each transaction:
  • 1. Full item path.
    2. Request type.
    3. Transaction date.
    4. Transaction ID.
    5. Transaction comment.
    6. Item version.
    7. Transaction user.
Thank you in advance!

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

Re: Client API problem. Please help.

Post by jeremy_sg » Thu Dec 03, 2009 11:58 am

I see that the VaultTxDetailHistoryItem has all of the fields that you wanted. Are they all coming back empty? Can you find that transaction in the GUI client? Here's the rest of the code from the 3.5 command line client that deals with printing transaction details.

Code: Select all

				if (items.Length > 0) // and it ALWAYS should be...
				{
					VaultTxDetailHistoryItem hi = items[0];
					_xml.AddPair("UserLogin", hi.UserLogin);
					_xml.AddPair("TxDate", hi.TxDate.ToString());
				}
				_xml.AddPair("comment", comment);

				foreach (VaultTxDetailHistoryItem hi in items)
				{
					_xml.Begin("txitem");
					_xml.AddPair("RequestType", VaultRequestType.GetRequestTypeName(hi.RequestType));
					_xml.AddPair("ID", hi.ID);
					_xml.AddPair("ObjVerID", hi.ObjVerID);
					_xml.AddPair("Version", hi.Version);
					_xml.AddPair("ItemPath1", hi.ItemPath1);
					_xml.AddPair("ItemPath2", hi.ItemPath2);
					_xml.AddPair("Name", hi.Name);
					_xml.AddPair("Comment", hi.Comment);
					_xml.End();
				}
Subscribe to the Fortress/Vault blog

gn1024
Posts: 9
Joined: Mon Sep 28, 2009 6:36 am

Re: Client API problem. Please help.

Post by gn1024 » Thu Dec 03, 2009 5:05 pm

Thanks for your answer.
I am using the same code and ItemPath1 and ItemPath2 are always empty strings.
All other fields of VaultTxDetailHistoryItem are valid values.

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

Re: Client API problem. Please help.

Post by jeremy_sg » Fri Dec 04, 2009 9:34 am

ItemPath1 should have the path you're looking for, but only for transactions that have been checked in after you upgraded to 3.5. Any transactions from before the upgrade will not have a full path.

Do you see the full path when you look at that transaction in the GUI client?
Subscribe to the Fortress/Vault blog

gn1024
Posts: 9
Joined: Mon Sep 28, 2009 6:36 am

Re: Client API problem. Please help.

Post by gn1024 » Sat Dec 05, 2009 3:18 am

How can I see it in GUI client?
Thanks.

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

Re: Client API problem. Please help.

Post by jeremy_sg » Sat Dec 05, 2009 11:20 am

Show History on the file, then right-click the change and choose Details.
Subscribe to the Fortress/Vault blog

gn1024
Posts: 9
Joined: Mon Sep 28, 2009 6:36 am

Re: Client API problem. Please help.

Post by gn1024 » Tue Dec 08, 2009 6:13 am

Thank you very much!
I found when Vault was upgraded to 3.5 and it's all ok with transactions from that time.

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

Re: Client API problem. Please help.

Post by jeremy_sg » Tue Dec 08, 2009 8:39 am

Glad to hear. Thanks.
Subscribe to the Fortress/Vault blog

Post Reply