Hi,
we would like to find all projects with (certain) attributes.
We can find find all members with certain attributes via
si viewproject --fields=memberarchive,attributes --filter=attribute:<attrname>
but unfortunately, this does not work on project attributes.
We can list a project (with its attributes) via
si projectinfo --attributes
but projectinfo has no --fields and no --filter parameter and does not work recursive (for subprojects), so there is always only one project listed.
This is even more important for projects than for members because member attributes can be shown in columns, but project attributes always have to be selected for a single project via project information. This makes it really hard to locate project attributes for many projects.
Solved! Go to Solution.
If you have a filter that matches no member then only the subprojects are printed.
This example would fail to print only subprojects if there really was a member named
"NONEXISTENTMEMBERNAME " within the project (tree).
So "NONEXISTENTMEMBERNAME" is just placeholder for a file filter that never matches.
In the meantime, we contacted PTC support who told us that this is actually not possible.
So I added an idea:
Well at least there is a tricky way to generate a somehow parseable subprojects list, which could be processed further with 'si projectinfo -S ....' commands.
D:\PtcTest>si viewproject --recurse --fields=name --filter=file:NONEXISTENTMEMBERNAME > subprojects.txt
Regards Juergen
Thanks for the hint - I did'nt know about the NONEXISTENTMEMBERNAME file filter to get the project.pj before.
Is this documented somewhere?
Does this work for newer Integrity versions (without sandbox project.pj files), too?
Anyhow, this might be a solution although it requires a lot of scripting.
If you have a filter that matches no member then only the subprojects are printed.
This example would fail to print only subprojects if there really was a member named
"NONEXISTENTMEMBERNAME " within the project (tree).
So "NONEXISTENTMEMBERNAME" is just placeholder for a file filter that never matches.
Ah, okay, now I understand.
Thanks!
Just noticed that indentation is needed here to correctly reflect the picture
D:\PtcTest>si viewproject --recurse --fields=indent,name --filter=file:NONEXISTENTMEMBERNAME > subprojects.txt
Just an additional challenge for parsing 🙂