cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find all projects with attributes?

SOLVED
Highlighted
Level 9

How to find all projects with attributes?

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.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to find all projects with attributes?

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.

6 REPLIES 6

Re: How to find all projects with attributes?

In the meantime, we contacted PTC support who told us that this is actually not possible.

So I added an idea:

https://community.ptc.com/t5/Integrity-Ideas/Find-all-projects-with-certain-attributes/idi-p/500766#...

Re: How to find all projects with attributes?

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

Re: How to find all projects with attributes?

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.

Re: How to find all projects with attributes?

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.

Re: How to find all projects with attributes?

Ah, okay, now I understand.

Thanks!

Re: How to find all projects with attributes?

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 Smiley Happy