Super Contributor.
Super Contributor.

Automatically update a custom list item values with Feature IDs

in ALM, I need to add items in a list called Feature_List through script.

Requirement name of type Feature in ALM is stored as Feature ID_Feature Description (example: F1234: Feature description).

I need to generate an automatic script, which will read first 5 digit from all requirement names of type Feature (like F1234) and add as an item value in Feature list (a separate list in Test Lab that will hold all active Feature IDs in ALM).

Can anyone help on this.

1 Reply
Super Contributor.
Super Contributor.

I am using below code to fetch all Features that are available in Requirements module

Sub FetchFeatures
' code to fetch a list of Features
Set RFactory = TDConnection.ReqFactory
Set RFilter = RFactory.Filter

RFilter.Filter("RQ_TYPE_ID") = 113

Set FeatureList = RFilter.NewList
FeatureCount = FeatureList.Count

msgbox "Feature Count :" & FeatureCount

Redim FeatureAdd(FeatureCount)
For i = 1 To FeatureCount
Set Feature1 = FeatureList.item(i)
'msgbox "Test: " & Test1.Name
FeatureAdd(i) = Feature1.Name
'msgbox "Feature: " & Feature1.Name
Set Feature1 = Nothing

end Sub

This block is working as expected.

But I need to add 2 conditions in the result - the Feature name which gets saved as Feature1.Name

I need to fetch only requirements within "Requirements/Business Process Structure" folder.  

I tried to add a filter condition as below which contains the absolute path of that particular folder.

'RFilter.Filter("RQ_REQ_PATH") = "AAAAAI"

But it fetches 0. Whereas the above code fetches 500 Feature names.

Can you please let me know which filter condition I could use so that all features (requirements) within that folder gets selected.

Also, I need to save only first 5 Characters of all Feature names which stars with a character 'F'.

Can you please let me know how can I achieve this.

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.