How to enter value in BG_DETECTED_IN_RCYC (and BG_DETECTED_IN_REL) using OTA in UFT?
Question ID: 107817
1
0

I tried to create defect from UFT and everything worked fine except the detected in release field, I am not able to enter value in it, tried both BG_DETECTED_IN_RCYC and BG_DETECTED_IN_REL.

Set QCConnection = QCUtil.QCConnection
Set BugFact = QCConnection.BugFactory
Set NewBug = BugFact.AddItem(Null)

NewBug.Summary = "Automated Defect – "&Environment.value("Stack_Name") &Environment("pDpi_Env_Var") & "-" & Environment.Value("AppType") & " " & strSummary
NewBug.Field("BG_DETECTION_DATE") = Date
NewBug.Status = "New"
NewBug.Field("BG_DESCRIPTION") = strDescription
NewBug.Field("BG_DEV_COMMENTS") = strComments
NewBug.Field("BG_PRIORITY") = "1-Critical"
NewBug.AssignedTo = "user6523"
NewBug.Field("BG_SEVERITY") = "1-Critical"

‘ NewBug.Field("BG_DETECTED_IN_REL") = "2017-06-18"
‘ NewBug.Field("BG_DETECTED_IN_RCYC") = "2017-06-18"
‘ NewBug.Field("BG_DETECTED_IN_RCYC").Value.Name = "2017-06-18"’CurrentRelease

NewBug.Field("BG_USER_01") = "4699135141"
NewBug.Field("BG_USER_02") = Platform’ Platform
NewBug.Field("BG_USER_03") = FuncArea ‘ Functional Area
NewBug.Field("BG_USER_04") = Environment.value("Stack_Name") & "-" & ucase(Environment("pDpi_Env_Var"))’TEST03-AZ
NewBug.Field("BG_USER_05") = "Checkout"’TestPhase
NewBug.Field("BG_USER_09") = "rnaidu"
NewBug.Field("BG_USER_14") = "BAU Testing"

Everything works except the detected in release field??

Marked as spam
Posted by (Questions: 424, Answers: 91)
Asked on July 31, 2017 3:37 am
171 views
Answers (1)
1
Private answer

The problem is that BG_DETECTED_IN_REL is the release id in the database (a key to the RELEASES table) but it is returned as a Release object in OTA. Same goes for BG_DETECTED_IN_RCYC is the cycle id in RELEASE_CYCLES. Both fields act as Objects to where simply trying to insert names of the Releases/Cycles in a script won't work.

Similar to QCConnection.BugFactory, try using QCConnection.ReleaseFactory and/or QCConnection.CycleFactory to set the value.

Example:

SET objCycFac = QCConnection.CycleFactory
SET objRCyc = objCycFac.item(1022)
NewBug.Field(''BG_DETECTED_IN_RCYC'') = objRCyc
SET objCycFac = nothing
SET objRCyc = nothing

Marked as spam
Posted by (Questions: 0, Answers: 771)
Answered on July 31, 2017 1:19 pm
0
Hey, that works! Thanks!!
( at July 31, 2017 1:20 pm)
EyeOnTesting

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

X
Scroll to Top