How to give value to (‘BG_USER_TEMPLATE_06’ and ‘BG_USER_TEMPLATE_03’) using OTA in Macros
Question ID: 108373
0
0

I have used the below code for uploading defects automatically using macros, here I am getting error in environment field and test type field while running. I have given the values which are already populated in ALM eventhough it is not accepting those values.

Dim Bug As BugFactory

Dim Bug1 As Bug

Set BugF = TDConn.BugFactory

Set Bug1 = Bug.Additem(NULL)

Bug1.Field("BG_SUMMARY") = "Testing Purpose"

Bug1.Field("BG_RESPONSIBLE") = "113456"

Bug1.Field("BG_SEVERITY") = "3 – Medium"

Bug1.Field("BG_PRIORITY") = "2 – High"

Bug1.Field("BG_USER_TEMPLATE_07") = "01 – Requirement Testing"

**Bug1.Field("BG_USER_TEMPLATE_06") = "Static Testing" -(Test Type field)

Bug1.Field("BG_USER_TEMPLATE_03") = "ACT4" -(Environment field)**

Bug1.Field("BG_USER_USER_01") = "2 Testing Query"

Bug1.Field("BG_DETECTED_IN_REL") = "Template Release"

Bug1.Post

Marked as spam
Posted by (Questions: 2, Answers: 0)
Asked on May 2, 2018 1:49 pm
162 views
Answers (1)
0
Private answer

Make sure the field is not set to read-only. Try setting the field(s) read only property to false before assigning a value and see if that works. Also, I believe you need to set the Value property equal to the data and not just the field.

Example

Bug1.Field(''BG_SUMMARY'').IsReadOnly = False
Bug1.Field(''BG_SUMMARY'').Value = ''Testing Purpose''

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on July 27, 2018 1:46 pm
EyeOnTesting

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

X
Scroll to Top