Highlighted
Ivan Trampedach Super Contributor.
Super Contributor.
846 views

Update Requirement name using API

Jump to solution

Hi,

Thanks for your interest in my topic 🙂

My customer has, made some correction in the requirement name, and we have >500 requirements not all need to be updated.

Doing that via GUI, will take forever.

I plan to make an extract to excel with req id and name and make a compare and end up with a list of req id that need to be renamed and the new name.

I can't use the official excel add-ins, because it will create a new requirement.

I have been looking at the OTA guide, but can't see how to rename.

If you have the key to solve my problem, and would like to share, I will send you some god vibration


Regards
Ivan S Trampedach
Using ALM 12.53
Tags (2)
0 Likes
1 Solution

Accepted Solutions
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Update Requirement name using API

Jump to solution

You can make a simple script to update the requirements.

Setting the name is nothing special. For example:

Set myReq = TDConnection.ReqFactory.Item(reqId)
myReq.Name = aNewPrefix & myReq.Name 
myReq.Post

If you have version control activated for the project you will need to include code for checking out and in the requirements.

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
5 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Update Requirement name using API

Jump to solution

You can make a simple script to update the requirements.

Setting the name is nothing special. For example:

Set myReq = TDConnection.ReqFactory.Item(reqId)
myReq.Name = aNewPrefix & myReq.Name 
myReq.Post

If you have version control activated for the project you will need to include code for checking out and in the requirements.

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Ivan Trampedach Super Contributor.
Super Contributor.

Re: Update Requirement name using API

Jump to solution

You saved my day !

I send positive thoughts in you way.


Regards
Ivan S Trampedach
Using ALM 12.53
Ivan Trampedach Super Contributor.
Super Contributor.

Re: Update Requirement name using API

Jump to solution

 Give me a finger and......I will try no to take the whole hand..

Only a few fields are visible when using the  ReqFactory Item with a req id.

I can see a lot more when usnig the propertie Fields.

Can information from a userdefined field be updated in the way, and how ?


Regards
Ivan S Trampedach
Using ALM 12.53
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: Update Requirement name using API

Jump to solution

Sure. For example

TDConnection.ReqFactory.Item(anId).Field("RQ_USER_01") = aValue
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Ivan Trampedach Super Contributor.
Super Contributor.

Re: Update Requirement name using API

Jump to solution

Smoothly and with style!

Thank you.


Regards
Ivan S Trampedach
Using ALM 12.53
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.