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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

How to find all projects with attributes?

ssaul
15-Moonstone

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.

ACCEPTED SOLUTION

Accepted Solutions
kthierer
12-Amethyst
(To:ssaul)

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.

View solution in original post

6 REPLIES 6
ssaul
15-Moonstone
(To:ssaul)

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#M1050

kthierer
12-Amethyst
(To:ssaul)

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

ssaul
15-Moonstone
(To:kthierer)

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.

kthierer
12-Amethyst
(To:ssaul)

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.

ssaul
15-Moonstone
(To:kthierer)

Ah, okay, now I understand.

Thanks!

kthierer
12-Amethyst
(To:ssaul)

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 🙂

 

Announcements


Top Tags