Post

1 follower Follow
0
Avatar

Identifying relationships between requirements of specific types

Hi all!

I have requirements where the type is "Business Requirements" and requirements where the type is "Project Objective." Every top level business requirement should reference a project objective, and I am trying to identify where that is not the case, i.e. where a top level business requirement does NOT reference a project objective . I can easily identify where NO requirements (of any type) are referenced by a top level business requirement (using "Not ReferencedRequirements Exist"). Unfortunately, "exist" does not allow me to qualify the referenced objects, and top level business requirements may also legitimately reference business rules, other business requirements or requirements which are designated as constraints, risks, dependencies or other requirement types.

I want to get this into a specific "exception" list, so that I don't have to go through hundreds of top level requirements to determine if the requirements they reference are really project objectives.

Anyone have a thought as to how this might be done?

Thanks!

Tom

Tom Tomasovic Answered

Please sign in to leave a comment.

5 comments

0
Avatar

Hey Tom,

I think you can get to where you'd like to be by using a variable in a repeat statement. I've attached an sample of how this could look, but read on for an explanation...

Start off with a loop for all of the 'Business Requirements' type of requirements, (re)setting your initial variable value - use a $repeat statement limited to the appropriate type, and $set your variable. I used $$ProjObRef so it reflects some meaning, but it can be anything you like.

Switch the variable (reset it) if there are any referenced 'Project Objective' requirements. I used a $when/$endwhen section instead of nesting another repeat statement for some added template performance (be sure to use an appropriate conditional clause here, too), since we're just looking to see if any references exist and we don't actually need any other info on those requirements.

Next, use an $if statement to check the variable's value, and include keywords for the requirement ID, name, or whatever other requirement properties you'd like (this is the exception list) if the variable hasn't been changed up by the new setting inside the $when/$endwhen.

Tie up the snippet with an $endrepeat, and there you have it. Let us know if you have questions.

A caveat: by having a "top level" business requirement, I'm assuming you mean at the top level of your project. You could limit the scope of your reporting to only include the top level package to report on just that level of requirements. If you instead mean "non-nested" requirements (not including any children in your list), you should add "and IsTopLevel = True" to the first line of the example.

Permanently deleted user 0 votes
Comment actions Permalink
0
Avatar

Jason,

Working pretty well. I've got a small amount of tweaking to do to get it completely clean (I have a $blankValue set, and it seemed to be implemented whenever there were no referenced requirements at all). Overall, I like the concept and I think I will find it very useful.

Thanks!

Tom

Tom Tomasovic 0 votes
Comment actions Permalink
0
Avatar

Jason,

Here's the actual code I have implemented:

$set $$ProjObRef false

New Listing

$repeatRequirementsSortID where Type = ‘Business Requirement’ and IsTopLevel = True and not ID contains ‘BRD’ and ReferencedRequirements Exist

$set $$ProjObRef false

$whenReferencedRequirements where Type = ‘Project Objective’

$set $$ProjObRef true

$endWhenReferencedRequirements

$if $$ProjObRef = false

$ID $Name has no references to project objectives.

$endif

$if $$ProjObRef = true

$ID $Name has references to project objectives.

$endif

$endRepeatRequirements

For some reason, when I run it, I get a list of the requirements which have (and do not have) references to project objectives, but I am also getting a number of rows/records interspersed in the listing which are showing the $BlankPropertyValue. I don't really know how to identify when these items are being generated. I'm playing with it, but do you have any quick insights?

Tom

Tom Tomasovic 0 votes
Comment actions Permalink
0
Avatar

Looks like this one's on us, Tom. There's a problem with $endwhen that's causing your blank property values to be displayed. If you didn't have blank values set - or temporarily reset $BlankPropertyValue to nothing - you'd get an empty line, instead.

I've got this reported & tracked in our internal defect system; the fix should be coming to CC 2013 soon!

Jason

Permanently deleted user 0 votes
Comment actions Permalink
0
Avatar

Shades of my days as a Fortran programer! It ain't pretty, but it's working the way I need:

$set $$ProjObRef false

$repeatRequirementsSortID where Type = ‘Business Requirement’ and IsTopLevel = True and not ID contains ‘BRD’ and ReferencedRequirements Exist

$repeatReferencedRequirements where Type = ‘Project Objective’

$showOnce

$set $$ProjObjRef true

$endShowOnce

$endRepeatReferencedRequirements

$if $$ProjObjRef = true

$ID $Name has references to project objectives

$endif

$if $$ProjObjRef = false

$ID $Name does not have references to project objectives.

$endif

$set $$ProjObjRef false

$endRepeatRequirements

Thanks!

Tom

Tom Tomasovic 0 votes
Comment actions Permalink