Subversion Repositories DevTools

Rev

Rev 4955 | Rev 5952 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'================================================================
4
'		 	   		Update Reason For This Version - Dependencies
5
'               --- PROCESS FORM ---
6
'================================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
11
Response.Expires = 0	' always load the page, dont store
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 )
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
 
50
 
51
	'If pkgInfoHash.Item("base_view_id") = cstr(enumBASE_VIEW_PRODUCTS) Then
52
 
53
	 'If pkgInfoHash.Item("comments") = "" or isnull(pkgInfoHash.Item("comments")) Then
54
 
55
 
56
 
57
  	 	 If (rsQry("last_pv_id") = "") Then
58
	  			OraDatabase.Parameters.Add "OLD_PV_ID", 	0, 	ORAPARM_INPUT, ORATYPE_NUMBER 
59
	 	 Else
60
	  			OraDatabase.Parameters.Add "OLD_PV_ID", 	rsQry("last_pv_id"), 	ORAPARM_INPUT, ORATYPE_NUMBER 
61
	 	 End If
62
 
63
	  Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery ( "diff_dependencies.sql" ), cint(0))
64
	  Dim style, icon
65
	  While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
66
 
67
		  Select Case CInt(rsTemp("status"))
68
			Case enumDB_NUM_DIFF_UPDATED
69
			  outputString = outputString & "[UPDATED] " & rsTemp("pkg_name") &" to "& rsTemp("pkg_version") &" ("& rsTemp("previous_version") &")"& VBNewLine
70
 
71
		    Case enumDB_NUM_DIFF_NEW
72
			  outputString = outputString & "[NEW] " & rsTemp("pkg_name") &" "& rsTemp("pkg_version") & VBNewLine
73
 
74
			Case enumDB_NUM_DIFF_REMOVED
75
			  outputString = outputString & "[REMOVED] " & rsTemp("pkg_name") &" "& rsTemp("pkg_version") & VBNewLine
76
 
77
		  End Select
78
 
79
	  	  rsTemp.MoveNext
80
	  WEnd
81
 
82
 
83
		rsQry.Edit
84
		rsQry.Fields("comments").Value = outputString 
85
		rsQry.Update
86
 
87
		rsTemp.Close
88
		Set rsTemp = nothing
89
 
90
		OraDatabase.Parameters.Remove "PV_ID"
91
		OraDatabase.Parameters.Remove "OLD_PV_ID"
92
 
93
 
94
	 'End If
95
	'END IF
96
 
97
	rsQry.Close
98
	Set rsQry = Nothing
99
 
100
	OraDatabase.Parameters.Remove "PV_ID"
101
 
102
End Sub
103
 
104
'-----------------------------------------------------------------------------------------------------------------------------
105
%>
106
<%
107
'-----------------------  MAIN LINE  ---------------------------
108
'--- Process submition ---
109
 
110
If (parPv_id <> "") Then
111
	' All mandatory parameters FOUND
112
 
113
	Call fillCommentsWithDifferences ( parPv_id )
114
 
115
	Response.Redirect("fixed_issues.asp?hidenv=true&pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id"))
116
Else
117
	Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
4955 dpurdie 118
	Response.write QSTR_FullQuery 
119 ghuddy 119
End If
120
%>
121
 
122
<!-- DESTRUCTOR ------->
123
<!--#include file="common/destructor.asp"-->