Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi all
I want to know a command on how to retrieve all labels of a particular project.
I tried the following command, but it is displaying the labels for the elements present inside that project.
si viewproject --project=/src/somethingproject.pj --fields=labels > labels.txt
i want to get the labels from project level.
can anyone please provide suggestion or do i need to use any filters ??
Solved! Go to Solution.
Hi
you shall use si viewprojecthistory instead of si viewproject
Example here: si viewprojecthistory --project=$MKS.pj --fields=labels,revision --rfilter=labeled
Kind regards.
Thierry
Hi
you shall use si viewprojecthistory instead of si viewproject
Example here: si viewprojecthistory --project=$MKS.pj --fields=labels,revision --rfilter=labeled
Kind regards.
Thierry
For those who want to parse or import the output from Thierrys tip
it might be interresting to know that the fileds are separated by a TAB character.
(BTW: the command also outputs 2 empy lines, which is not that ideal for parsing)
Something offtopic
In my efforts finding a method for a easy parseable format for the information where my (sub)sandbox points to
i stumbled over viewprojecthistory which outputs only the server location if the filter has no matches:
c:\sand\prj1>si viewprojecthistory -S project.pj --rfilter=labeled:A_LABEL_THAT_WILL_NEVER_EXIST
This will output
d:/my/server/project/path/project.pj |
Thierry, do you know a better more elegant way?