The Unique ID with Context attribute solution is a Custom attribute that supports the creation of of unique ID values suitable for requirement IDs, etc., in a similar way to Identity attributes. It builds on the use of two custom attributes - one that defines the context and one that defines the ID. The result is an ID that is recognizable for users. This article describes how to create context values and set ID values.
Prerequisites
- An SW Architect has configured the Unique ID with Context - Custom Attribute Solution
Setting Context Values
To create a unique context for the ID series, select an item of a type that is configured to be a context. In the below example, an Architect has assigned the Unique ID Context attribute to the Software component item type so this attribute will display each time an item of that type is selected.
Next, click the attribute editor button to access the Unique ID Context on xxx dialog.
Enter one or more context values to be used, and click OK.
In the above example, "Comp" has been added. When this value is selected when setting an ID, "Comp-" will be prefixed to all ID values set in the series.
Setting Unique ID Values
Once a context value has been created, users can set ID values.
Setting an ID value can only be done in the context of an item of the item type that has a Unique ID Context attribute. In our example above, the Software component item type has this context attribute.
In the above example, if a user opens the "Activation" Design Requirement in a new tab without any context, i.e., outside of a Software component context, they will not be able to set a "Comp" ID.
To set an ID, select an item of the item type where the ID custom attribute is assigned, select a Context, and click OK.
Result
Things to Consider
- Each Unique ID Context counter starts at 1
- Once a unique value has been set, it cannot be changed
If you delete an item with a unique value, the value cannot be reused
If two or more Unique Id Context attribute values share the same value string, all unique IDs based on these will still be unique, sharing a common number series