Page 1 of 2

Retrieving full child label list

Posted: Mon Jul 14, 2008 9:21 am
by Aestros
Need your help again with label.

I'm able to get the current label of an object from "GetLabelQueryItems_Main" and "GetLabelQueryItems_Recursive". It's working great to know the label of the current object.

But, is there a way to get all the child label of that object ?

Here's an example of what I'm looking for :
$/ObjectToGetLabel ( 3 label on it )
$/ObjectToGetLabel/FileWithLabel.txt ( 1 label on it)
$/ObjectToGetLabel/Folder1/Folder2WithLabel ( 2 label on it)

When I use your function on "$/ObjectToGetLabel", it will always return only the 3 ones of "$/ObjectToGetLabel". But I'm looking for 6 labels ( 3 + 1 + 2 ). So can I get all the child label from one of your functions ?

Posted: Mon Jul 14, 2008 10:09 am
by jeremy_sg
Are you making sure to pass true into the bGetRecursive arguemnt of your label query?

Posted: Mon Jul 14, 2008 11:23 am
by Aestros
Yes, I'm passing "true" to all the parameters.

Here's my code for main label

Code: Select all

VaultLib.VaultLabelItemX[] labelList;

int rowFromInherit;
int rowFromRecursive;
string strQueryToken;

Client.BeginLabelQuery(itemPath, itemID, true, true, true, true, 0, out rowFromInherit, out rowFromRecursive,out strQueryToken);
Client.GetlabelQueryItems_Main(strQueryToken,0,rowFromInherit,out LabelList);
Client.EndLabelQuery(strQueryToken);
Here's my code for recursive label

Code: Select all

VaultLib.VaultLabelItemX[] labelList;

int rowFromInherit;
int rowFromRecursive;
string strQueryToken;

Client.BeginLabelQuery(itemPath, itemID, true, true, true, true, 0, out rowFromInherit, out rowFromRecursive,out strQueryToken);
Client.GetlabelQueryItems_Recursive(strQueryToken, 0, rowFromRecursive, out LabelList);
Client.EndLabelQuery(strQueryToken);

Posted: Mon Jul 14, 2008 12:59 pm
by jeremy_sg
Comments:

1. You should be able to do both queries at once. Just call both Client.GetlabelQueryItems_Main and GetlabelQueryItems_Recursive one after the other.

2. The set you want is actually the ones returned fromGetlabelQueryItems_Recursive. You've now seen enough of our label query workings to understand how all of the parameters map to the controls in the Show Labels dialog. If you can get the Show Labels dialog to show you what you want, then you should be able to get those same results from the API.

Keep asking questions, as I'm pretty sure we can get you what you want.

Posted: Mon Jul 14, 2008 1:30 pm
by Aestros
Thanks for #1, I'll do the same operation in the same token.

For #2, it's the problem, your "Show Labels dialog" in your client program doesn't show child label too.

If I use the same example as before.
$/ObjectToGetLabel ( 3 label on it )
$/ObjectToGetLabel/FileWithLabel.txt ( 1 label on it)
$/ObjectToGetLabel/Folder1/Folder2WithLabel ( 2 label on it)
When I click on "Show labels..." and go for "Recursive Labels" tab, it shows only the 3 Label of "$/ObjectToGetLabel" and not the child one.
Even if I change the filter to "Files only", it will not show the label on "FileWithLabel.txt" even if the file is directly into the current folder I'm looking at. Checking / unchecking "Act recursively" is not changing the result too.

I'm working with Vault Client (4.1.1).
So if you say I can get what your client is showing to me, is this mean I can't get child label from API ?

Posted: Mon Jul 14, 2008 1:45 pm
by jeremy_sg
If it's not showing up, how was the child label applied?

Posted: Mon Jul 14, 2008 1:55 pm
by Aestros
An easy question :)
$/ObjectToGetLabel ( 3 label on it )
$/ObjectToGetLabel/FileWithLabel.txt ( 1 label on it)
$/ObjectToGetLabel/Folder1/Folder2WithLabel ( 2 label on it)
Right-click on "$/ObjectToGetLabel/FileWithLabel.txt", click on "Label..." and a label name and comment, click "OK". That's it.
If I go after that into the "Show labels" of "$/ObjectToGetLabel", it doesn't show the new label on "$/ObjectToGetLabel/FileWithLabel.txt" anywhere.

Posted: Mon Jul 14, 2008 4:06 pm
by jeremy_sg
I just did that test with 4.1.2, and it works fine for me (see screenshot)

Posted: Tue Jul 15, 2008 6:33 am
by Aestros
Ok. I'll try with 4.1.2 and I'll give you a feedback

Re: Retrieving full child label list

Posted: Thu Aug 14, 2008 7:06 am
by Aestros
Problem solved !

My company installed Vault 4.1.2 ( was at 4.1.1 ) and the "Show Labels" Dialog is now showing the recursive labels correctly.

Re: Retrieving full child label list

Posted: Fri Jun 10, 2011 4:16 am
by humphry
Has this been changed in the meanwhile?
I am not able to see labels of children in the show labels dialog.
The screenshot above shows labels of children when the checkbox is enabled.
The checkbox does not have any effect on the result.
If I use show labels on one of the child folders I do see labels (at that sublevel).

Information about server and client:
Version Check: This Vault client is version 5.0.4.18845
Version Check: Your Vault server is version 5.0.4.18845

Re: Retrieving full child label list

Posted: Fri Jun 10, 2011 7:55 am
by lbauer
You should be able to see child or recursive labels.

I'd suggest we schedule a remote assist session where I can take a closer look. Contact support at sourcegear.com, Attn: Linda. We'll set something up. Please include a link to this forum post.

Re: Retrieving full child label list

Posted: Fri Jun 10, 2011 8:10 am
by humphry
Here are two screenshots. Level0.png shows the dialog on the childlevel.
Level1.png shows the parent level. As you can see Level1.png does not show the label of the sublevel.
I can confirm that the same happens at other developer's machines.

Server problem?

Re: Retrieving full child label list

Posted: Fri Jun 10, 2011 11:17 am
by lbauer
I installed a copy of Vault 5.0.4 and was not able to reproduce this in that version, either. It may be something related to your database or environment.

Has the recursive label view ever worked properly?

Can you reproduce this with any new label, or labels on just certain parts of the tree?

Is your database an import from VSS?

Re: Retrieving full child label list

Posted: Tue Jun 14, 2011 12:09 pm
by humphry
I've never seen it working before.
It's not related to a part of the tree. Tried several places.
We did not migrate to Vault from VSS (or something else).

Any ideas?