It's all about the answers!

Ask a question

RPE : Requirement Count in a module RDNG


Guindo Niamkey Jean Frederic (29218) | asked Nov 08 '16, 5:59 a.m.
edited Nov 10 '16, 8:02 p.m. by Donald Nong (14.5k414)
I have a RDNG module with many object. Each Object has an Object Type which can be one of the following ( Information, Heading, Requirement).
How do to count the number of object Requirement in a module?
It's emergency for me

Accepted answer


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Nov 18 '16, 6:12 a.m.
edited Nov 20 '16, 3:00 a.m.
You can check if dataSource/artifact/collaboration/attributes/objectType/name returns "Requirement". If so, increment the variable as shown in the screen shot.

 
Please find modified sample template. You can use the module URI (https://server:9443/rm/publish/modules?resourceURI=_9817413064c54f4f82c57353884b5e84) as data source URI during document generation.
Guindo Niamkey Jean Frederic selected this answer as the correct answer

Comments
Guindo Niamkey Jean Frederic commented Nov 28 '16, 4:51 a.m.

Hi Pilar,
Thank
It's ok

4 other answers



permanent link
Subramanya Prasad Pilar (4.6k16) | answered Nov 08 '16, 6:26 a.m.
edited Nov 08 '16, 6:30 a.m.
You can have a (internal) variable and increment it if object type is requirement.
 

Comments
Guindo Niamkey Jean Frederic commented Nov 08 '16, 6:36 a.m.

Thanks
I try quickly


Guindo Niamkey Jean Frederic commented Nov 10 '16, 12:16 p.m.

Hi Pilar,
I created the internal variable _count,but how to initialize this variable to allows the count of item in module?


Subramanya Prasad Pilar commented Nov 10 '16, 12:28 p.m.


While inserting the variable, you can set the Default value to 0. Also, do not forget to add the condition so that _count is incremented only if it is a requirement.


Guindo Niamkey Jean Frederic commented Nov 11 '16, 11:48 a.m.

Hi Pilar,
I can not count the number of items in the module.
Can you make me a tutorial? please


permanent link
Subramanya Prasad Pilar (4.6k16) | answered Nov 14 '16, 2:32 a.m.
Please find the sample template which prints headings count and requirements count. We have the condition format == "Text" - which will include only Text artifacts. When isHeading == "true", _countHeading is incremented and if isHeading != "true", _countReq is incremented. I might be wrong in understanding the requirement correctly. Please do the  modifications and give a try. You can use the module URI (https://server:9443/rm/publish/modules?resourceURI=_9817413064c54f4f82c57353884b5e84) for document generation.

Comments
Guindo Niamkey Jean Frederic commented Nov 14 '16, 12:49 p.m. | edited unknown

Hi Pilar,
Thank very much for your help
In the module, there is many object as Information,Requirement,feature,Heading,....
And I want only to do a count on the Requirement object
Is there a way to do this?


Subramanya Prasad Pilar commented Nov 15 '16, 2:24 a.m.

Can you provide the sample xml returned for the module url (https://server:port/rm/publish/modules?resourceURI=uuid) ? What is the dataSource/artifact/moduleContext/contextBinding/format value returned for Information object?


Guindo Niamkey Jean Frederic commented Nov 16 '16, 1:11 p.m.

Hi Pilar,
the value returned for the dataSource/artifact/moduleContext/contextBinding/format is "TEXT"


Subramanya Prasad Pilar commented Nov 17 '16, 2:24 a.m.

In the sample template provided, all non-headings are counted as Requirement. But it looks like particular artifact type only should be counted. In DNG, I see these Artifact formats while creating Text artifact. Can you confirm which one is "Requirement object"?




Guindo Niamkey Jean Frederic commented Nov 17 '16, 1:29 p.m.

Hi Pilar,
I didn't understand


Subramanya Prasad Pilar commented Nov 17 '16, 10:54 p.m.

Can you please provide a screen shot that shows how the Requirement object artifact was created in DNG? I can modify the sample template by creating similar artifact in my DNG instance.


Guindo Niamkey Jean Frederic commented Nov 18 '16, 4:31 a.m.

Hi Pilar,
I cann't upload the screenshot, i've an error "sorry, file uploading requires reputation >60"
can you let me your email ?
I will send you on it

showing 5 of 7 show 2 more comments

permanent link
Guindo Niamkey Jean Frederic (29218) | answered Nov 18 '16, 4:01 a.m.
edited Nov 18 '16, 4:26 a.m.
Hi Pilar,
Find below the screenshot
I've an artifact type "Requirement" in each module "requirement Specification"
And I want count the number of artifact type "Requirement" in a module "Requirement Specification"
 

Comments
Guindo Niamkey Jean Frederic commented Nov 18 '16, 5:22 a.m.

Hi Pilar,
I cann't upload the screenshot, i've an error "sorry, file uploading requires reputation >60"
can you let me your email ?
I will send you on it


Guindo Niamkey Jean Frederic commented Nov 18 '16, 12:05 p.m.

Thanks
Are you received my email?


permanent link
Guindo Niamkey Jean Frederic (29218) | answered Nov 24 '16, 11:23 a.m.
Hi Pilar,
I checked and dataSource/artifact/collaboration/attributes/objectType/name returns only the fisrt value in module ie "Heading"
I can not browse the module, I only read the first value in "Heading"
The module is constituted of Heading, Information and Requirement

Comments
Subramanya Prasad Pilar commented Nov 24 '16, 11:50 a.m. | edited Nov 24 '16, 11:50 a.m.

Did you try the modified sample template (DNGModuleSample_SP.dta)? I ran a quick test before uploading it and the report shows the count.


Guindo Niamkey Jean Frederic commented Dec 21 '16, 5:13 a.m.

Hi Pilar,
Thank for your helps
I've some questions additionnals
I've a module with 2000 requirements
When i generate the report with the script inside template,
The waiting timeframe is long
Do you have a way to optimise this?

Your answer


Register or 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.