RRDI and RRC - Count links
4 answers
I have stored the details here
Appears we're both trying to kill the same bird:-)
I took a shot at this but my head's done in so I'm hoping someone from the RRDI/RM team can help.
Here's what I did so far.
For example, all Actors linked/Not Linked to Use Case Diagrams. I've been able to get something working :
and the corresponding data :
All good so far and I was almost happy. Except I changed the queries to use selectable parameters so the user can choose what type of requirement is linked/not linked to some other type. Then trouble. If I select Actor Linked/Not Linked to Feature I get:
with data :
Which *seems* correct except that 2 actors are missing ("Financial Business Manager" and "Registered User"). In other words, I would expect that no matter what type of "target" requirements I select, the total number of source requirements remains 13.
I've tried all sorts of options but no success. The XML for the report is here.
Basically I have a query that has:
[Business View].[Requirement].[Requirement ID]
[Business View].[Requirement].[Name]
[Business View].[Requirement].[Requirement Type] with Filter [Requirement Type] in ?ReqType?
[Business View].[Requirement Related Requirements].[Name]
[Business View].[Requirement Related Requirements].[Requirement Type] with Filter [Link Type] in ('Link') or [Link Type] is null
[Business View].[Requirement Related Requirements].[Link Type] with Filter [Requirement Type2] in ?TargetType? or [Requirement Type2] is null
A data item [Linkage] which is
A data item ID_Count which isIF ( [Link Type]='Link') THEN( 'Linked' )ELSE('Not Linked' )
The Chart has its measure set to ID_Count and Series set to Linkage.count( distinct [Requirement ID])
Comments
Ok, the problem is getting a distinct count of :
Requirements of type "Actor" with a link of type "Link" to Requirements of type "Feature"
vs
Requirements of type "Actor" with no links at allĀ + Requirements of type "Actor" with a link of type "Link" to a Requirement of any type.
The problem arises where an Actor with a link of type "Link" is linked to both a Requirements of type "Feature" and Requirement of any type.
What i think needs to happen is the count has to iterate (for loop ??) through at all links to/from the source requirement
If the requirements has any links to Feature then count it as linked
otherwise count it as not linked
If the requirement has no links count it as not linked
Not quite sure how to do this as yet
Hope this makes some sense?
Query for all requirements of type actor
Query for all Trace To requirements (or Requirements related Requirements with Link Type=Link) of type Use Case Diagram
Join the two queries and count all requirements of type actor and count those with/without links
I've tried this but I can't get the right data and can't work out what to Join on, and the implicit Join as above doesn't quite do it.
Comments
folks,
I have run across a behavior of RRDI [which i consider a defect] related to counting artifacts of type requirement [it may apply to other types as well].
The behavior is that when RRDI is asked to count the artifacts of type requirement, it counts the number of unique instances of the data warehouse field "requirement ID", rather than the data warehouse field "reference ID". Reference ID is the unique identifier for artifact of type requirement, while "requirement ID" is unique identifier of EACH INSTANCE of the artifact, i.e. if you use the artifact in multiple locations in RM, e.g. module, collection, etc., RRDI returns the count of each time it is used rather than the true unique number of requirements. This behavior causes my reports to return the wrong number [count] for some reports I am running.