<%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| RequestProjectRelease.asp | '| | '===================================================== %> <% Option explicit ' Good idea to set when using redirect Response.Expires = 0 ' always load the page, dont store %> <% '------------ Variable Definition ------------- Dim rsTemp Dim PageInfoHash Dim Query_String Dim Auto '------------ Constants Declaration ----------- '------------ Variable Init ------------------- Set PageInfoHash = CreateObject("Scripting.Dictionary") '---------------------------------------------- %> <% '------------------------------------------------------------------------------------------------------------------------ ' This code is temporary and can be taken out at some point in the future (eg. 3 months from now. ie. Dec2008). Its purpose ' is to ensure that the release level metrics are up-to-date when a user expands the project link on the Release Metrics. The ' SQL queries and database PK_RMAPI update_release_metrics function have been updated to fix errors in the original solution ' but we would have to wait for the build tool to build at least one package in each release in each project before the ' release level metrics would be correct. So, instead, we force the re-computation of those metrics now. It doesn't take long ' even on a large project like Stockholm, so it is no big deal. Sub UpdateReleaseMetrics Dim rsQry Dim rsQuery_String Dim rtagid On Error Resume Next OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER rsQuery_String = "SELECT rm.rtag_id"&_ " FROM projects p,"&_ " release_metrics rm,"&_ " release_tags rt"&_ " WHERE p.proj_id = rt.proj_id"&_ " AND rm.rtag_id = rt.rtag_id"&_ " AND p.proj_id = :PROJ_ID" Set rsQry = OraDatabase.DbCreateDynaset( rsQuery_String, cint(0)) While (NOT rsQry.BOF) AND (NOT rsQry.EOF) OraDatabase.Parameters.Add "RTAG_ID", rsQry("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER objEH.TryORA ( OraSession ) OraDatabase.ExecuteSQL "BEGIN PK_RMAPI.UPDATE_RELEASE_METRICS ( :RTAG_ID ); END;" objEH.CatchORA ( OraSession ) OraDatabase.Parameters.Remove "RTAG_ID" rsQry.MoveNext WEnd OraDatabase.Parameters.Remove "PROJ_ID" rsQry.Close Set rsQry = nothing End Sub '------------------------------------------------------------------------------------------------------------------------ %> <% '------------------------ MAIN LINE --------------------------------- Call UpdateReleaseMetrics '-------------------------------------------------------------------- %>
<% OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("ReleaseMetrics.sql"), cint(0)) OraDatabase.Parameters.Remove "PROJ_ID" If rsTemp.RecordCount < 1 Then%> <%Else While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Auto=FormatPercent(rsTemp("autobuilt")/rsTemp("total_packages"), 2) %> <%rsTemp.MoveNext WEnd rsTemp.Close Set rsTemp = nothing End If%>
Release Last Autobuild
Completed
Autobuilt Packages Lines Of Code Unit Tested Autotested
 
" style="display:block;"> ', '<%=rsTemp("rtag_id")%>');"> <%=rsTemp("rtag_name")%> " style="display:none;"> ', 'IMG_EXPAND_RTAG_<%=rsTemp("rtag_id")%>', 'IMG_COLLAPSE_RTAG_<%=rsTemp("rtag_id")%>');"> <%=rsTemp("rtag_name")%> <%=rsTemp("last_build_time")%> <%=rsTemp("autobuilt")%>/<%=rsTemp("total_packages")%> (<%=Auto%>) <%=rsTemp("lines_of_code")%> <%=rsTemp("unit_tested")%> <%=rsTemp("autotested")%>
" style="display:none;"><%=enumLOADING%>

<% Call Destroy_All_Objects %>