Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Counting the Number of Folders present in a project area in RRC

Hi,

I just wanted to check if there is any easier way to count the number of folders present in a project area in RRC rather than manual counting.

We are doing a performance benchmarking for a patch recently received from IBM support where only 100 folders are visible in the Project Area. If there are more than 100 folders, the folders disappear. Post applying this patch, we are not seeing the problem. However, we want to give out a number (of folders) for project areas in production environments.

0 votes

Comments

 Hi Yash,


Just submitted a question asking for this very patch. Would you mind give us enough infos to get the patch, you mentioned applying to cure the over 100 folders disappearance, from IBM.

Thanks in advance Yash.

 Don Yang gave me the infos: Hotfix request 274074: Missing subfolders defect 71478 for v4.0.3 RRC


Will be submitting a PMR foor it. Thx regardless.

Yes. PMR will be the way to go. Support should be able to find this patch in their system and provide it to you.



2 answers

Permanent link
You can also use the SPARQL query below to count the number of folders in a given RM project area.  The steps for accessing the SPARQL Query editor vary between 4.x and 5.0.

4.x:  Go to http{s}://<server>:<port>/rm/rmadin -> Advanced Properties -> set com.ibm.rdm.fronting.server.debug.enabled to "true" and click "Update Property" to set the value

Then go back to rm/rmadmin -> SPARQL Query

5.0:  Go to http{s}://<server>:<port>/rm/admin -> Debug -> SPARQL Query

Enter the query below, making sure to change the server URL to match your server URL.

PREFIX dc: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rm: <http://www.ibm.com/xmlns/rdm/rdf/>
PREFIX nav: <http://com.ibm.rdm/navigation#>
PREFIX jfs: <http://jazz.net/xmlns/foundation/1.0/>
SELECT ?Folder
WHERE {
    ?Folder dc:isPartOf <https://<server>:<port>/rm/folders> .
}
LIMIT 1

Just select the "pre-count" option and select your project from the dropdown, and run the query.  Your result will be the count of folders in the project you selected.

In the screenshot below, I've run the query against a project with 5 folders (well really 6, because of the root folder), so the result returned from the query is 6.  Hope it helps,


2 votes

Comments

My query was formatted poorly by the forum, so please refer to the screenshot attached for the appropriate query to run.

Thanks Benjamin...let me try this and get back to you with my results.

Benjamin,

I tried to run the below query on my server. However, the query is not returning any results. I am not sure why.

QUERY:
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rm: <http://www.ibm.com/xmlns/rdm/rdf/>
PREFIX nav: <http://com.ibm.rdm/navigation#>
PREFIX jfs: <http://jazz.net/xmlns/foundation/1.0/>

SELECT ?Folder
WHERE {
    ?Folder dc:isPartOf <https://wegsfes19803ptclm2.accenture.com:443/rm/folders> .
}

The query looks right.  Did you add the LIMIT 1 and check the pre-count option to return the total?  Or did you get an error?

Hi Benjamin,

Yes I did and did check the precount option to return the total. When I run the query, it runs into a page not found.

Is the server you're running the query against server-renamed? if so, you may need to include the pre-rename URL as the [host] in the dc:isPartOf statement of the query.

Hi Michael,

No the server is not server-renamed.

showing 5 of 7 show 2 more comments

Permanent link
Hi Yash

I think writing a utility to query the folder structure via OSLC, and count the number of folders, will be the fastest way.  Follow the samples from https://jazz.net/library/article/1197 (search for Exploring the project folder structure by using the folder query capability). 

1 vote

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,023

Question asked: Jun 11 '14, 12:23 a.m.

Question was seen: 4,911 times

Last updated: Jun 23 '14, 4:08 a.m.

Confirmation Cancel Confirm