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:

CustomAttributesEditors.png

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
  • parentID of the parent section (string)
  • childID of the first child (string)
  • prevSiblingID of the previous sibling in the document tree hierarchy (string)
  • nextSiblingID of the next sibling in the document tree hierarchy (string)
  • originID 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>
},
...
}

JavaScript

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 > Template 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>
},
...
}

JavaScript

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:

DocumentAttributesDialog.png

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" }
]
}
}

JSON

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" }
]
}
}

JSON

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
}
}

JSON

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"
}
}

JSON

Responsible Person

You can define requirement responsible person as a string attribute:

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

JSON

Deadline

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

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

JSON

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"
}
}

JSON

Template Instructions

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

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

JSON

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

  Download PDF



Updated for version 2.7.0