Requirements Toolbox: Enforce uniqueness for custom IDs?
5 views (last 30 days)
Show older comments
Hi.
Is there a way to enforce that there cannot be two custom IDs which are the same?
For example there could be a requirement with index "1" which has custom ID "req1" and also another requirement with index "2" but with the same custom ID "req1".
And is it possible to create a script or something similar to automatically generate custom IDs according to certain rules?
0 Comments
Accepted Answer
Artem
on 29 Aug 2022
We do not have any built-in mechanism for enforcing uniqueness of Custom ID values. Our links rely on SIDs, and those are automatically unique and incremental. Deleted SIDs will not repeat. Custom IDs are ment for users to specify a friendly labels for their requirements. When enteirng requirements manually, it is user's responsibility to type-in the wanted short label, or may leave blank. When importing requirements from external documents, the values for Custom IDs are sourced from external identifiers which are assumed to be unique in external application.
Hope this answers the question
Artem.
1 Comment
Paul Urban
on 29 Aug 2022
Adding to Artem's comment, to check for duplicate ID's you could do this in a script. One way to automate this could be by adding a script in a callback when doing a Save: https://www.mathworks.com/help/slrequirements/ug/customize-requirement-set-load-and-save-behavior-by-using-callbacks.html Load and save callbacks were added in R2022a.
More Answers (0)
See Also
Categories
Find more on Author Requirements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!