Retrieving full child label list
Moderator: SourceGear
Retrieving full child label list
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 ?
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 ?
Are you making sure to pass true into the bGetRecursive arguemnt of your label query?
Subscribe to the Fortress/Vault blog
Yes, I'm passing "true" to all the parameters.
Here's my code for main label
Here's my code for recursive label
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);
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);
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.
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.
Subscribe to the Fortress/Vault blog
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.
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 ?
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.
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.$/ObjectToGetLabel ( 3 label on it )
$/ObjectToGetLabel/FileWithLabel.txt ( 1 label on it)
$/ObjectToGetLabel/Folder1/Folder2WithLabel ( 2 label on it)
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 ?
An easy question
If I go after that into the "Show labels" of "$/ObjectToGetLabel", it doesn't show the new label on "$/ObjectToGetLabel/FileWithLabel.txt" anywhere.
Right-click on "$/ObjectToGetLabel/FileWithLabel.txt", click on "Label..." and a label name and comment, click "OK". That's it.$/ObjectToGetLabel ( 3 label on it )
$/ObjectToGetLabel/FileWithLabel.txt ( 1 label on it)
$/ObjectToGetLabel/Folder1/Folder2WithLabel ( 2 label on it)
If I go after that into the "Show labels" of "$/ObjectToGetLabel", it doesn't show the new label on "$/ObjectToGetLabel/FileWithLabel.txt" anywhere.
I just did that test with 4.1.2, and it works fine for me (see screenshot)
- Attachments
-
- labels.JPG (27.73 KiB) Viewed 25371 times
Subscribe to the Fortress/Vault blog
Re: Retrieving full child label list
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.
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
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
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
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.
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.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Re: Retrieving full child label list
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?
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?
- Attachments
-
- level1.png (24.94 KiB) Viewed 24415 times
-
- level0.png (26.02 KiB) Viewed 24415 times
Re: Retrieving full child label list
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?
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?
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager
Re: Retrieving full child label list
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?
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?