Custom Attributes

Attribute Types

Configure custom attributes to suit your workflow. For example, you can customize requirements type, status, acceptance, priority, allocation to system components, etc.

Note: Custom attribute definitions are shared by all objects in the document. If you need to have different custom attributes for different object types (for example, requirements and tests), separate the requirements and tests to different documents.

ReqView defines the following types of document object attributes:

  • int — integer number
  • bool — boolean value
  • string — string value
  • date — date stored as ISO 8601 string
  • real — floating point number
  • enum — single enumeration value or multiple enumerations values
  • xhtml — rich text in XHTML format

The type of an attribute determines how the attribute value is formatted in the Requirements Table and which editor is used. For example, the following image shows editor for date type:

For more information about how to display and edit custom attributes, see Edit Custom Attributes.

Internal Attributes

ReqView defines the following internal attributes of document objects:

  • id — unique object identifier (string)
  • heading — section heading (string)
  • text — text description (xhtml)
  • discussion — array of comments
  • history — array of changes
  • section — section number (string)
  • level — the internal object level in the document tree structure (int)
  • deleted — flag set to true if the object is marked as deleted (bool)
  • dirty — flag set to true if the object was modified
  • parent — ID of the parent section (string)
  • child — ID of the first child (string)
  • prevSibling — ID of the previous sibling in the document tree hierarchy (string)
  • nextSibling — ID of the next sibling in the document tree hierarchy (string)
  • origin — ID of the origin object if the current object is a copy (string)

Primitive Attributes

Define custom primitive attributes using the following JSON format:

{
<attributeId>: {
"type": <string>,
"name": <string>,
"readOnly": <bool>,
"help": <bool>
},
...
}

where:

  • attributeId — unique custom attribute ID, for example "acceptance"
  • type — one of the following attribute types: int, bool, string, date, real or xhtml
  • name — optional long attribute name displayed in the column header, for example "Acceptance Criteria"
  • readOnly — optional flag set to true if the user should be prevented from changing the attribute value; each attribute is by default editable
  • help — optional flag which can be set to true to display the attribute value in the Instructions right pane or set to false (default) to enable modification of the attribute value; this flag is valid only for attributes of xhtml type, see Examples > Instructions for an example.

Enumeration Attributes

Define custom enumeration attributes using the following JSON format:

{
<attributeId>: {
"type": <string>,
"name": <string>,
"values" : [
{ "key": <string>, "label": <string>, "default": <bool> },
...
],
"readOnly": <bool>
"multiValued": <bool>
},
...
}

with the following additional properties compared to the primitive attributes:

  • values — array of allowed enumeration values; each value has a unique string key; optionally it can have a text label, and a flag default denoting if the value should be used as default
  • multiValued — optional flag set to true if the enumerated attribute can have multiple enumeration values (for example, used for list of system components affected by each requirement)

Attributes Definition Editor

Create and update the custom attributes definition in the Document Attributes dialog. Click Document and select Custom Attributes:

Tip: In order to not lose data, we recommend you create a backup copy of the project before renaming or removing custom attributes as it will drop attributes values from the current requirements document. Similarly, changing the attributes type will result in conversion of the attribute values stored in the document.

After changing the custom attributes definition, click Check to verify the definition. If definition verification succeeds, click OK to confirm the changes. The document columns are restructured according the new definition.

If definition verification fails, you must correct reported errors and repeat the procedure.

Examples

Requirement Status

The following sample shows how to define requirement status as a single value enumeration attribute:

{
"status": {
"name": "Status",
"type": "enum",
"values": [
{ "key": "Unknown" },
{ "key": "Draft" },
{ "key": "Accepted" },
{ "key": "Rejected" },
{ "key": "Implemented" },
{ "key": "Verified" }
]
}
}

Requirement Priority

The following sample shows how to define requirement priority as a single value enumeration attribute:

{
"priority": {
"name": "Priority",
"type": "enum",
"values": [
{ "key": "-", "label": "Unassigned", "default": true },
{ "key": "1", "label": "Low" },
{ "key": "2", "label": "Medium" },
{ "key": "3", "label": "High" }
]
}
}

Allocation to Components

The following sample shows how to define requirement allocation to sub-systems, components, or projects as a multi-value enumeration attribute:

{
"components": {
"name": "Components",
"type": "enum",
"values": [
{ "key": "Desktop", "label": "ReqView Desktop" },
{ "key": "Mobile", "label": "ReqView Mobile" },
{ "key": "Synchronizer", "label": "ReqView Synchronizer" },
{ "key": "Server", "label": "ReqView Server" },
{ "key": "Support", "label": "Support" }
],
"multiValued": true
}
}

Effort Estimation

The following sample shows how to define requirement effort estimation (MD or story points) as an integer attribute:

{
"effort": {
"name": "Effort [MD]",
"type": "int"
}
}

Responsible Person

You can define requirement responsible person as a string attribute:

{
"responsible": {
"name": "Responsible User",
"type": "string"
}
}

Deadline

The following sample shows how to define requirement deadline as a date attribute:

{
"deadline": {
"name": "Deadline",
"type": "date"
}
}

Acceptance Criteria

The following sample shows how to define requirement acceptance criteria with a rich text description of the acceptance test:

{
"acceptance": {
"name": "Acceptance Criteria",
"type": "xhtml"
}
}

Instructions

The following sample shows how to define read-only instructions displayed in the Instructions right pane:

{
"instructions": {
"name": "Instructions",
"type": "xhtml",
"help": true
}
}

If instructions attribute is set for the selected document object then the Instructions pane shows its value. Otherwise, the Instructions pane shows the value of instructions attribute from the nearest parent section that has this attribute set.

That way, instructions set for top-level sections are shown for all their descendants, but they can be still overridden by instructions specific to a particular subsection or requirement.

Note: You can set the help flag of the instructions attribute to false to display the Instructions column in the Requirements Table and modify the instructions text.

  Download PDF

Updated for version 2.9.0