| Line 33... |
Line 33... |
| 33 |
' is to ensure that the release level metrics are up-to-date when a user expands the project link on the Release Metrics. The
|
33 |
' is to ensure that the release level metrics are up-to-date when a user expands the project link on the Release Metrics. The
|
| 34 |
' SQL queries and database PK_RMAPI update_release_metrics function have been updated to fix errors in the original solution
|
34 |
' SQL queries and database PK_RMAPI update_release_metrics function have been updated to fix errors in the original solution
|
| 35 |
' but we would have to wait for the build tool to build at least one package in each release in each project before the
|
35 |
' but we would have to wait for the build tool to build at least one package in each release in each project before the
|
| 36 |
' release level metrics would be correct. So, instead, we force the re-computation of those metrics now. It doesn't take long
|
36 |
' release level metrics would be correct. So, instead, we force the re-computation of those metrics now. It doesn't take long
|
| 37 |
' even on a large project like Stockholm, so it is no big deal.
|
37 |
' even on a large project like Stockholm, so it is no big deal.
|
| 38 |
Sub UpdateReleaseMetrics
|
38 |
'Sub UpdateReleaseMetrics
|
| 39 |
Dim rsQry
|
39 |
' Dim rsQry
|
| 40 |
Dim rsQuery_String
|
40 |
' Dim rsQuery_String
|
| 41 |
Dim rtagid
|
41 |
' Dim rtagid
|
| 42 |
|
42 |
'
|
| 43 |
On Error Resume Next
|
43 |
' On Error Resume Next
|
| 44 |
|
44 |
'
|
| 45 |
OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
45 |
' OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| 46 |
|
46 |
'
|
| 47 |
rsQuery_String = "SELECT rm.rtag_id"&_
|
47 |
' rsQuery_String = "SELECT rm.rtag_id"&_
|
| 48 |
" FROM projects p,"&_
|
48 |
' " FROM projects p,"&_
|
| 49 |
" release_metrics rm,"&_
|
49 |
' " release_metrics rm,"&_
|
| 50 |
" release_tags rt"&_
|
50 |
' " release_tags rt"&_
|
| 51 |
" WHERE p.proj_id = rt.proj_id"&_
|
51 |
' " WHERE p.proj_id = rt.proj_id"&_
|
| 52 |
" AND rm.rtag_id = rt.rtag_id"&_
|
52 |
' " AND rm.rtag_id = rt.rtag_id"&_
|
| 53 |
" AND p.proj_id = :PROJ_ID"
|
53 |
' " AND p.proj_id = :PROJ_ID"
|
| 54 |
|
54 |
'
|
| 55 |
Set rsQry = OraDatabase.DbCreateDynaset( rsQuery_String, cint(0))
|
55 |
' Set rsQry = OraDatabase.DbCreateDynaset( rsQuery_String, cint(0))
|
| 56 |
|
56 |
'
|
| 57 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
57 |
' While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| 58 |
OraDatabase.Parameters.Add "RTAG_ID", rsQry("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
58 |
' OraDatabase.Parameters.Add "RTAG_ID", rsQry("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| 59 |
|
59 |
'
|
| 60 |
objEH.TryORA ( OraSession )
|
60 |
' objEH.TryORA ( OraSession )
|
| 61 |
|
61 |
'
|
| 62 |
OraDatabase.ExecuteSQL "BEGIN PK_RMAPI.UPDATE_RELEASE_METRICS ( :RTAG_ID ); END;"
|
62 |
' OraDatabase.ExecuteSQL "BEGIN PK_RMAPI.UPDATE_RELEASE_METRICS ( :RTAG_ID ); END;"
|
| 63 |
|
63 |
'
|
| 64 |
objEH.CatchORA ( OraSession )
|
64 |
' objEH.CatchORA ( OraSession )
|
| 65 |
|
65 |
'
|
| 66 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
66 |
' OraDatabase.Parameters.Remove "RTAG_ID"
|
| 67 |
rsQry.MoveNext
|
67 |
' rsQry.MoveNext
|
| 68 |
WEnd
|
68 |
' WEnd
|
| 69 |
|
69 |
'
|
| 70 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
70 |
' OraDatabase.Parameters.Remove "PROJ_ID"
|
| 71 |
|
71 |
'
|
| 72 |
rsQry.Close
|
72 |
' rsQry.Close
|
| 73 |
Set rsQry = nothing
|
73 |
' Set rsQry = nothing
|
| 74 |
End Sub
|
74 |
'End Sub
|
| 75 |
|
75 |
|
| 76 |
'------------------------------------------------------------------------------------------------------------------------
|
76 |
'------------------------------------------------------------------------------------------------------------------------
|
| 77 |
%>
|
77 |
%>
|
| 78 |
<%
|
78 |
<%
|
| 79 |
'------------------------ MAIN LINE ---------------------------------
|
79 |
'------------------------ MAIN LINE ---------------------------------
|
| 80 |
Call UpdateReleaseMetrics
|
80 |
' Call UpdateReleaseMetrics
|
| 81 |
'--------------------------------------------------------------------
|
81 |
'--------------------------------------------------------------------
|
| 82 |
%>
|
82 |
%>
|
| 83 |
<table width="100%" border="0" cellspacing="1" cellpadding="1">
|
83 |
<table width="100%" border="0" cellspacing="1" cellpadding="1">
|
| 84 |
<tr>
|
84 |
<tr>
|
| 85 |
<td background="images/bg_form_lightbluedark.gif">
|
85 |
<td background="images/bg_form_lightbluedark.gif">
|