% option explicit
Response.Buffer = TRUE
Dim AuthUser,pos,FileSys,InStream,BugID,Conn,Comm,RS
Dim FldArray,i,FldLinks,dTitle,Desc,fCreate,st,wi,c,fSt
Dim mx,mxc,fn,fname,ColTot,ibase,inext,ff,fbase,coln,colh,ColNb
Response.Expires = 0
rem get user name
AuthUser = Request.ServerVariables("AUTH_USER")
pos=instr(1,AuthUser,"\")
if pos>0 then
AuthUser = mid(AuthUser,pos+1)
end if
%>
<%
rem add content of cached file for possible values of checked fields
IncludeItemCache
if Request.QueryString("BugID") = "" then
BugID = Session("BugID")
else
BugID = Request.QueryString("BugID")
end if
Response.Write "[Bug " & BugID & " - Windows NT Bugs]"
Set Conn = Server.CreateObject("ADODB.Connection")
Set Comm = Server.CreateObject("ADODB.Command")
Set RS = Server.CreateObject("ADODB.Recordset")
Conn.Open Session("DSN")
Set Comm.ActiveConnection = Conn
RS.CursorType = adOpenStatic
Set RS.Source = Comm
FldArray = Application("fld" & Application("dbCache")(Session("DBSOURCE")))
Dim fdict
Set fdict = CreateObject("Scripting.Dictionary")
rem generates list of mandatory fields
Response.Write ""
rem check for links ( related bugs, file attachments ) associated with this bug
Dim LinkType(10)
mx = UBound(LinkType)
for i = 0 to mx
LinkType(i) = "loff"
next
if BugID<>"CREATE" then
Comm.CommandText = "Select Type from links where BugID=" & BugID
RS.Open
if NOT RS.EOF then
FldLinks = RS.GetRows()
mx = UBound(FldLinks,2)
mxc = UBound(LinkType)
for i = 0 to mx
if FldLinks(0,i) < mxc then
LinkType( FldLinks(0,i) ) = "lon"
end if
next
end if
RS.Close
end if
coln = Array("Status","Opened","Resolved","Closed","Project")
colh = Array(200,200,200,200,200)
ColNb = Array(8,9,6,4,16)
ColTot = ColNb(0)+ColNb(1)+ColNb(2)+ColNb(3)+ColNb(4)
fname = "Status,AssignedTo,IssueType,Severity,Priority,Accessibility,ChangedDate,ChangedBy,"
fname = fname & "OpenedDate,OpenedBy,OpenedRev,Source,SourceID,BetaID,HowFound,Lang,LangSup,"
fname = fname & "ResolvedDate,ResolvedBy,Resolution,FixedRev,Cause,CodeChange,"
fname = fname & "ClosedDate,ClosedBy,KBArticle,SR,"
fname = fname & "Component,SubComp,Owner,Processor,NumCPU,Software,Urgency,Regression,ShowStop,SubStatus,CustPri,TrackingNumber,VendorNm,CCList,IsPerf,Class,Title,Description"
if BugID <> "CREATE" then
Comm.CommandText = "Select " & fname & " from bugs where BugID=" & BugID
fname = fname & ","
Set RS.Source = Comm
RS.CursorType = adOpenStatic
RS.Open
dTitle = RS(ColTot)
Desc = Rs(ColTot+1)
fCreate = FALSE
else
fname = fname & ","
dTitle = ""
Desc = ""
fCreate = TRUE
end if
Response.Write ""
Response.Write "