Can we copy the Target Release Field in Workflow?
Question ID: 105953
0
0

We are trying to synchronize the Target Release Field in ALM in a one way requirements sync to TFS from ALM. The problem is that the Target Release Field is a Multi Value Select and we cannot sync it to a string field in TFS. Is there anyway that we can create a placeholder field that can hold the values as a string so that we can send the values via the ALM synchronizer to TFS?

Marked as spam
Posted by (Questions: 100, Answers: 5)
Asked on February 24, 2015 3:45 pm
67 views
Answers (1)
1
Private answer

You could create a user field in ALM of type string and then in ALM workflow populate that field with the value of the Target Release Field. The Multi Value select list is a collection and it has to be treated differently than a regular list, you must pull out the values and re organize the values into a string. Then synchronize the user field (String) with TFS instead of the regular Target Release field. In the example code below I create a user field ''RQ_USER_01'' of type string to hold the value. If you have many values in your Target Release Field you may want to use a memo field for this. This is really only useful for a one way sync for this particular field from ALM to the other endpoint, this could also be used for Req Pro, and other endpoints.....

Sub Req_FieldChange(FieldName)
On Error Resume Next

If FieldName = ''RQ_TARGET_REL'' then
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=False
Req_Fields.Field(''RQ_USER_01'').Value=''''
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=TRUE
Set Req = TDConnection.ReqFactory.item(Req_Fields.field(''RQ_REQ_ID'').Value)
Set TargetRelease = req.Field(''RQ_TARGET_REL'')
For Each r in TargetRelease
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=False
Req_Fields.Field(''RQ_USER_01'').Value = Req_Fields.Field(''RQ_USER_01'').Value + r.name + '';''
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=TRUE
Next
Set Req = Nothing
Set TargetRelease = Nothing
Set TDConnection = Nothing
Set ReqFactory = Nothing
Set Item = Nothing
End If

On Error GoTo 0
End Sub

Sub Req_MoveTo
On Error Resume Next
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=False
Req_Fields.Field(''RQ_USER_01'').Value=''''
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=TRUE
Set Req = TDConnection.ReqFactory.item(Req_Fields.field(''RQ_REQ_ID'').Value)
Set TargetRelease = req.Field(''RQ_TARGET_REL'')
For Each r in TargetRelease
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=False
Req_Fields.Field(''RQ_USER_01'').Value = Req_Fields.Field(''RQ_USER_01'').Value + r.name + '';''
Req_Fields.Field(''RQ_USER_01'').IsReadOnly=TRUE
Next
Set Req = Nothing
Set TargetRelease = Nothing
Set TDConnection = Nothing
Set ReqFactory = Nothing
Set Item = Nothing
On Error GoTo 0
End Sub

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on February 24, 2015 3:50 pm
0
Works Great, Thanks!!!
( at February 27, 2015 4:37 pm)
EyeOnTesting

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

X
Scroll to Top