Custom Attributes

Attribute Types

You can configure custom attributes suiting your workflow - for instance requirement type, status, acceptance, priority, allocation to system components, etc.

Custom attributes definition is shared by all objects in the document. If you need to have different custom attributes for different object types, e.g. requirements and tests, then you can separate the requirements and tests to different documents.

ReqView defines 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 - XHTML string

Attribute type influences how the attribute values is formatted in the Requirements Table and which editor is used, for instance following picture illustrates editor for date type:

CustomAttributesEditors.png

For more information how to display and edit custom attributes see documentation section Edit Custom Attributes.

Internal Attributes

ReqView defines 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 - if the object is a copy then ID of the origin object (string)

Primitive Attributes

You can define custom primitive attributes in the following JSON format:

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

JavaScript

where:

  • attributeName - unique custom attribute name, e.g. “acceptance”
  • type - one of attribute following types: “int”, “bool”, “string”, “date”, “real” or “xhtml”
  • name - optional long attribute name displayed in column heading, e.g. “Acceptance Criteria”
  • readOnly - optional flag set to true if user should be prevented from changing the attribute value; each attribute is by default editable

Enumeration Attributes

You can define custom enumeration attributes in the following JSON format:

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

JavaScript

with following additional properties comparing to the primitive attributes:

  • values - array of allowed enumeration values; each value shall have 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 (e.g. used for list of system components affected by each requirement)

Attributes Definition Editor

You can create and update custom attributes definition in Document Attributes dialog opened from Document > Custom Attributes menu:

DocumentAttributesDialog.png

In order to not lose data, it is recommended to create a backup copy of the project before renaming or removing custom attributes because it will result in dropping attribute values from the current requirements document. Similarly, changing attribute type will result in conversion of attribute values stored in the document.

After changing custom attributes definition press Check button to verify the definition. If definition verification succeeds then you can press OK button to confirm the changes otherwise you need to correct reported errors first. After hitting OK button, the document columns should be restructured according the new definition.

Examples

Requirement Status

You can define requirement status as a single value enumeration attribute, e.g.:

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

JSON

Requirement Priority

You can define requirement priority as a single value enumeration attribute, e.g.:

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

You can define requirement allocation to sub-systems, components or projects as a multi value enumeration attribute, e.g.:

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

You can define requirement effort estimation (MD or story points) as an integer attribute, e.g.:

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

JSON

Responsible Person

You can define requirement responsible person as a string attribute, e.g.:

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

JSON

Deadline

You can define requirement deadline as a date attribute, e.g.:

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

JSON

Acceptance Criteria

You can define requirement acceptance criteria with a rich text description of the acceptance test as a xhtml attribute, e.g.:

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

JSON

  Download PDF



Updated for version 2.5.0