Question

How can I create a DOORS attribute “SectionHeading” to display the section number + title that an object falls under?

Example (each line here is a DOORS object):

Section 3.1 XXX Requirements

Req100 System shall do this… (where this object is under Section 3.1 in DOORS)

Section 3.1.1 YYY Sub-requirements

Req234 System shall do this sub-thing…. (where this object is under Section 3.1.1)

Req368 System shall do this other sub-thing… (where this object is also under Section 3.1.1)

Section 3.1.1.1 ZZZ Sub-requirements

Req555 System shall do this sub-thing….(where this object is under Section 3.1.1.1)

Req123 System shall do this other sub-thing… (where this object is under Section 3.1.1.1)

Req580 System shall do this other sub-thing… (where this object is under Section 3.1.1.1)

I want to create an attribute called “SectionHeading” to show:

Req100, SectionHeading: “3.1 XXX Requirements”

Req234, SectionHeading: “3.1.1 YYY Sub-requirements”

Req368, SectionHeading: “3.1.1 YYY Sub-requirements”

Req555, SectionHeading: “3.1.1.1 ZZZ Sub-requirements”

Req123, SectionHeading: “3.1.1.1 ZZZ Sub-requirements”

Req580, SectionHeading: “3.1.1.1 ZZZ Sub-requirements”

I don’t want to create links within a module from an object to its section header (though this would probably give me what I need).

Was it helpful?

Solution

You need to create a DXL attribute and the code should look like this:

Object o = parent(obj)
if(!null o)
{
    obj."NAME_OF_YOUR_ATTRIBUTE" = number(o) " " o."Object Heading" ""
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top