Requirements Toolbox: Enforce uniqueness for custom IDs?

13 次查看(过去 30 天)
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?

采纳的回答

Artem
Artem 2022-8-29
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 个评论
Paul Urban
Paul Urban 2022-8-29
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.

请先登录,再进行评论。

更多回答(0 个)

标签

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by