Results 1 to 3 of 3
  1. #1

    Report How a Defect change

    Hi everybody
    Exist anyway to know, how many times a defect id has changed of status and when it happens?
    In History of Defect Details I can check it but i need to downloado to excel using excel reports.

    Thanks for your help

    Fabian Ramirez
    QA Manager

  2. #2

    Re: Report How a Defect change

    You mean, you need to export the details from the defect history table for a defect into an excel sheet..??

    you would have to use OTA for this.

    Below is a script whihc will retrive the defect information and store into an excel.
    You would have to write similar code to work with the defect history table.

    'Retreive Defect properties

    Dim td
    Dim bfact
    Dim bList
    Dim Sev(10000)
    Dim Id(10000)
    Dim openDate(10000)
    Dim closeDate(10000)

    'Connect to QC

    Set td=createobject("TDApiOle80.TDConnection.1")
    td.InitConnectionEx "http://"
    td.ConnectProjectEx "Domain", "Project", "UID", "PWD"

    'Retrieve all defects and display the summary of the defects.

    Set bfact = td.BugFactory
    Set bList = bfact.NewList("")
    i = 0
    For Each Bug In bList
    intSev = Bug.Field("BG_SEVERITY")
    If intSev = "4-Tolerable" Then
    Id(i) = Bug.Field("BG_BUG_ID")
    Sev(i) = Bug.Field("BG_SEVERITY")
    openDate(i) = Bug.Field("BG_DETECTION_DATE")
    closeDate(i) = Bug.Field("BG_CLOSING_DATE")
    i = i + 1
    End If

    Dim mydb, objXL
    Set objXL = CreateObject("Excel.Application")
    objXL.Visible = TRUE
    objXL.Columns(1).ColumnWidth = 25
    objXL.Columns(2).ColumnWidth = 25
    objXL.Columns(3).ColumnWidth = 45
    objXL.Columns(4).ColumnWidth = 45
    objXL.Cells(1, 1).Value = "Defect ID"
    objXL.Cells(1, 2).Value = "Defect Severity"
    objXL.Cells(1, 3).Value = "Defect Detection Date"
    objXL.Cells(1, 4).Value = "Defect Closing Date"

    'Format Cells
    objXL.Selection.Font.Bold = True
    objXL.Selection.Interior.ColorIndex = 1
    objXL.Selection.Interior.Pattern = 1
    objXL.Selection.Font.ColorIndex = 2
    objXL.Application.Visible = True
    r = 2
    For z = 0 to i
    For x = 1 to 4
    Select Case x
    Case 1
    objXL.Cells(r, 1).Value = Id(z)
    Case 2
    objXL.Cells(r, x).Value = Sev(z)
    Case 3
    objXL.Cells(r, x).Value = openDate(z)
    Case 4
    objXL.Cells(r, x).Value = closeDate(z)
    End Select
    r = r + 1

    objXL.ActiveWorkbook.SaveAs("C:\Defect_Report.xls" )
    Set objXL = Nothing
    Set bList = Nothing
    Set bfact = Nothing
    Set td = Nothing
    -- Here to Learn and share ---

  3. #3

    Re: Report How a Defect change

    Can th ecode be run from the Excel VB script editor or not?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:39 PM.

Copyright BetaSoft Inc.