ALM 11.52 – Is there a way to auto generate a requirement name sequence (and populate the ‘requirement name’ field) whenever a new requirement is created?
Question ID: 105142
0
0

I would like to have the ‘requirement name’ field auto populated whenever a new requirement is created.

For example, the first requirement would be ABC-1000, the second requirement would be ABC-1001, and so on.

I am wondering if this is possible.

Marked as spam
Posted by (Questions: 1, Answers: 2)
Asked on October 9, 2013 9:04 pm
44 views
Answers (2)
1
Private answer

Yes you can.
Using the workflow editor :

**Sub Req_New**

*'Add here the code managing the name generation.For example, some code parsing the whole set of reqs, to figure out what is the name of the last reqID, and so, what should be the new one. Then set this new name to 'myvalue' *

The_Generated_Name = myvalue

'then use the generated name here

Req_Fields(''RQ_REQ_NAME'').Value = *The_Generated_Name*

**End Sub**

Marked as spam
Posted by (Questions: 0, Answers: 9)
Answered on October 10, 2013 3:04 pm
0
Private answer

Thanks for the response Max. The part I am struggling with right now is how to figure out the last requirement.

Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on October 10, 2013 3:50 pm
0
use this code : Req_Smaller_Id = -10 Set rFact = TDConnection.ReqFactory Set All_The_Reqs = rFact.NewList('''') For Each Req In All_The_Reqs if Req.ID > Req_Smaller_Id then Req_Smaller_Id = Req.ID end if Next Set the_last_found_req = rFact.item(Req_Smaller_Id) The_Last_Name = the_last_found_req.name add then the code to parse this last name and modify it , and that's done. regards, Maximilien. note : this may cause perf issues if your project owns a LOT of requirements.
( at October 10, 2013 9:42 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top