필터 지우기
필터 지우기

Requirements Toolbox: Enforce uniqueness for custom IDs?

조회 수: 6 (최근 30일)
Adil
Adil 2022년 8월 25일
댓글: Paul Urban 2022년 8월 29일
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