Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello together,
what I'd like to do is to get the most recent checkpoint number of a project and any of it's subprojects.
Is there any possibility to do so?
What I've tried so far is to display every subproject with si viewproject --filter=attribute:name=project.pj -R and to display the history of a project with si viewprojecthistory --fields=revision, but as I'm new to PTC, i don't know how to combine them.
Thank you in advance.
To get the most recent checkpoint for a project, you can use si projectinfo. The last checkpoint is listed.
For example:
D:/private/IntegrityServers/12.0>si projectinfo -P#/master Project Name: /master/project.pj Repository Location: /master/project.pj Server: abuchanan0l:7120 Configuration Path: #/master Restricted: false Last Checkpoint: 1.15 Last Checkpoint Date: 29-Mar-2019 10:16:37 AM
To get a list of the checkpoints in the subprojects, you can view the project at the last checkpoint with a filter to show only subprojects. For example, using the last checkpoint 1.15 as the build number for the project:
D:/private/IntegrityServers/12.0>si viewproject -P#/master#build=1.15 --recurse --filter=file:onlysubs --fields=indent,name subproject1/project.pj (1.4) one/project.pj (1.4) two/project.pj (1.2) red/project.pj (1.1.1.1) subproject2/project.pj (1.3) blue/project.pj (1.2) test/project.pj (1.11) auto/project.pj (1.3) config/project.pj (1.1) Inputs/project.pj (1.2) new/project.pj (1.2) auto2/project.pj (1.2.2.1) config/project.pj (1.1.2.1) Inputs/project.pj (1.2.2.1) new dir/project.pj (1.7.2.1) auto3/project.pj (1.3)
Note on the filter: Any filter which excludes all members will work. I use "--filter=file:onlysubs" because I find it easy to remember and it's clear what the output will be.