| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'================================================================
|
| 5952 |
dpurdie |
4 |
' Update Reason For This Version - Dependencies
|
| 119 |
ghuddy |
5 |
' --- PROCESS FORM ---
|
|
|
6 |
'================================================================
|
|
|
7 |
%>
|
|
|
8 |
<%
|
|
|
9 |
Option explicit
|
|
|
10 |
' Good idea to set when using redirect
|
| 5952 |
dpurdie |
11 |
Response.Expires = 0 ' always load the page, dont store
|
| 119 |
ghuddy |
12 |
%>
|
|
|
13 |
<!--#include file="common/conf.asp"-->
|
|
|
14 |
<!--#include file="common/globals.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/qstr.asp"-->
|
|
|
17 |
<!--#include file="common/common_subs.asp"-->
|
|
|
18 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
19 |
|
|
|
20 |
<%
|
|
|
21 |
' Set rfile parameter. This is a return page after Login
|
|
|
22 |
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
|
|
|
23 |
'------------ ACCESS CONTROL ------------------
|
|
|
24 |
%>
|
|
|
25 |
<!--#include file="_access_control_login.asp"-->
|
|
|
26 |
<!--#include file="_access_control_general.asp"-->
|
|
|
27 |
<!--#include file="_access_control_project.asp"-->
|
|
|
28 |
<%
|
|
|
29 |
'------------ Variable Definition -------------
|
|
|
30 |
Dim parPv_id
|
|
|
31 |
'------------ Constants Declaration -----------
|
|
|
32 |
'------------ Variable Init -------------------
|
|
|
33 |
parPv_id = QStrPar("pv_id")
|
|
|
34 |
'----------------------------------------------
|
|
|
35 |
%>
|
|
|
36 |
<%
|
|
|
37 |
|
|
|
38 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
39 |
Sub fillCommentsWithDifferences ( parPv_id )
|
| 5952 |
dpurdie |
40 |
DIM outputString
|
|
|
41 |
DIM rsTemp, rsQry, query
|
|
|
42 |
|
|
|
43 |
|
|
|
44 |
query = "SELECT * FROM PACKAGE_VERSIONS WHERE PV_ID = :PV_ID "
|
|
|
45 |
OraDatabase.Parameters.Add "PV_ID",parPv_Id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
46 |
|
|
|
47 |
Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
|
|
|
48 |
|
|
|
49 |
'If pkgInfoHash.Item("base_view_id") = cstr(enumBASE_VIEW_PRODUCTS) Then
|
|
|
50 |
'If pkgInfoHash.Item("comments") = "" or isnull(pkgInfoHash.Item("comments")) Then
|
|
|
51 |
|
|
|
52 |
If (rsQry("last_pv_id") = "") Then
|
|
|
53 |
OraDatabase.Parameters.Add "OLD_PV_ID", 0, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
54 |
Else
|
|
|
55 |
OraDatabase.Parameters.Add "OLD_PV_ID", rsQry("last_pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
56 |
End If
|
| 119 |
ghuddy |
57 |
|
| 5952 |
dpurdie |
58 |
Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery ( "diff_dependencies.sql" ), cint(0))
|
|
|
59 |
Dim style, icon
|
|
|
60 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| 119 |
ghuddy |
61 |
|
| 5952 |
dpurdie |
62 |
Select Case CInt(rsTemp("status"))
|
|
|
63 |
Case enumDB_NUM_DIFF_UPDATED
|
|
|
64 |
outputString = outputString & "[UPDATED] " & rsTemp("pkg_name") &" to "& rsTemp("pkg_version") &" ("& rsTemp("previous_version") &")"& VBNewLine
|
|
|
65 |
|
|
|
66 |
Case enumDB_NUM_DIFF_NEW
|
|
|
67 |
outputString = outputString & "[NEW] " & rsTemp("pkg_name") &" "& rsTemp("pkg_version") & VBNewLine
|
|
|
68 |
|
|
|
69 |
Case enumDB_NUM_DIFF_REMOVED
|
|
|
70 |
outputString = outputString & "[REMOVED] " & rsTemp("pkg_name") &" "& rsTemp("pkg_version") & VBNewLine
|
|
|
71 |
|
|
|
72 |
End Select
|
| 119 |
ghuddy |
73 |
|
| 5952 |
dpurdie |
74 |
rsTemp.MoveNext
|
|
|
75 |
WEnd
|
|
|
76 |
|
|
|
77 |
rsQry.Edit
|
|
|
78 |
rsQry.Fields("comments").Value = outputString
|
|
|
79 |
rsQry.Update
|
| 119 |
ghuddy |
80 |
|
| 5952 |
dpurdie |
81 |
rsTemp.Close
|
|
|
82 |
Set rsTemp = nothing
|
|
|
83 |
|
|
|
84 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
85 |
OraDatabase.Parameters.Remove "OLD_PV_ID"
|
|
|
86 |
|
|
|
87 |
'End If
|
|
|
88 |
'END IF
|
|
|
89 |
|
|
|
90 |
rsQry.Close
|
|
|
91 |
Set rsQry = Nothing
|
| 119 |
ghuddy |
92 |
End Sub
|
|
|
93 |
|
|
|
94 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
95 |
%>
|
|
|
96 |
<%
|
|
|
97 |
'----------------------- MAIN LINE ---------------------------
|
|
|
98 |
'--- Process submition ---
|
|
|
99 |
|
|
|
100 |
If (parPv_id <> "") Then
|
| 5952 |
dpurdie |
101 |
' All mandatory parameters FOUND
|
|
|
102 |
|
|
|
103 |
Call fillCommentsWithDifferences ( parPv_id )
|
|
|
104 |
|
|
|
105 |
Response.Redirect("fixed_issues.asp?hidenv=true&pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id"))
|
| 119 |
ghuddy |
106 |
Else
|
| 5952 |
dpurdie |
107 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
|
|
108 |
Response.write QSTR_FullQuery
|
| 119 |
ghuddy |
109 |
End If
|
|
|
110 |
%>
|
|
|
111 |
|
|
|
112 |
<!-- DESTRUCTOR ------->
|
|
|
113 |
<!--#include file="common/destructor.asp"-->
|