Subversion Repositories DevTools

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 123
Line 12... Line 12...
12
<!--#include file="common/globals.asp"-->
12
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/formating.asp"-->
13
<!--#include file="common/formating.asp"-->
14
<!--#include file="common/qstr.asp"-->
14
<!--#include file="common/qstr.asp"-->
15
<!--#include file="common/common_subs.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/common_dbedit.asp"-->
16
<!--#include file="common/common_dbedit.asp"-->
-
 
17
<!--#include file="common/common_make_release_subs.asp"-->
17
<%
18
<%
18
'------------ ACCESS CONTROL ------------------
19
'------------ ACCESS CONTROL ------------------
19
%>
20
%>
20
<!--#include file="_access_control_general.asp"-->
21
<!--#include file="_access_control_general.asp"-->
21
<%
22
<%
Line 31... Line 32...
31
parRtag_id = QStrPar("rtag_id")
32
parRtag_id = QStrPar("rtag_id")
32
parRfile = QStrPar("rfile")
33
parRfile = QStrPar("rfile")
33
'----------------------------------------------
34
'----------------------------------------------
34
%>
35
%>
35
<%
36
<%
36
'------------------------------------------------
-
 
37
Sub NotifyInterest(NNpv_id, NNrtag_id)
-
 
38
	On Error Resume Next
-
 
39
	Dim Query_String, rsQry, myMail
-
 
40
	
-
 
41
	Query_String = _
-
 
42
	"	SELECT * FROM PACKAGE_INTEREST PI, PACKAGES PKG, PACKAGE_VERSIONS PV, USERS U,"&_
-
 
43
	"	RELEASE_TAGS RT, PROJECTS PRJ WHERE PKG.PKG_ID = PI.PKG_ID AND "&_
-
 
44
	"	RT.RTAG_ID = "& NNrtag_id &""&_
-
 
45
	"	AND PV.PV_ID = "& NNpv_id &" AND PV.PKG_ID = PKG.PKG_ID AND "&_
-
 
46
	"	PRJ.PROJ_ID = RT.PROJ_ID AND PRJ.PROJ_ID = PI.PROJ_ID AND U.USER_ID = PI.USER_ID" 
-
 
47
	
-
 
48
	Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )	
-
 
49
	
-
 
50
	If rsQry.RecordCount <> "" Then
-
 
51
		While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
-
 
52
			Set myMail=Server.CreateObject("Persits.MailSender")
-
 
53
			myMail.Host = SMTP_HOST
-
 
54
			myMail.Subject="Version "& rsQry("pkg_version") &" of Package "& rsQry("pkg_name") &" in Project " & rsQry("proj_name") &" on Release Branch " & rsQry("rtag_name") &" has been released." 
-
 
55
			myMail.Body = "You have received this email as a result of your interest in this package. If you do not wish to receive further emails then remove your package interest from the notifications area in Release Manager."
-
 
56
			myMail.From=ADMIN_EMAIL
-
 
57
			myMail.AddAddress rsQry("user_email")
-
 
58
		
-
 
59
			myMail.Send
-
 
60
			set myMail=nothing
-
 
61
			rsQry.MoveNext	
-
 
62
		Wend
-
 
63
			
-
 
64
	End If
-
 
65
	
-
 
66
	rsQry.Close()
-
 
67
	set rsQry = nothing
-
 
68
 
-
 
69
 
-
 
70
End Sub
-
 
71
'-------------------------------------------------------
-
 
72
Sub Run_onMakeOfficial ( nPv_id, nRtag_id )
-
 
73
	
-
 
74
	Dim objWSH, proj_id, Qry, sRtagName
-
 
75
	Set objWSH = Server.CreateObject("WScript.Shell")
-
 
76
	
-
 
77
	OraSession.BeginTrans
-
 
78
	OraDatabase.ExecuteSQL " UPDATE package_versions "&_
-
 
79
						   " SET release_notes_info = '"& enum_RELEASE_NOTES_GENERATING &"'"&_
-
 
80
						   " WHERE pv_id = "& nPv_id			 					
-
 
81
	
-
 
82
    OraSession.CommitTrans
-
 
83
	
-
 
84
'Used for getting the package name and package version
-
 
85
OraDatabase.Parameters.Add "RTAG_ID", nRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
86
			
-
 
87
Set Qry = OraDatabase.DbCreateDynaset( "SELECT * FROM RELEASE_TAGS WHERE RTAG_ID = :RTAG_ID", 0 )
-
 
88
			
-
 
89
proj_id = Qry("proj_id")
-
 
90
sRtagName = UCase( Qry("rtag_name") )
-
 
91
 
-
 
92
Qry.Close()
-
 
93
Set Qry = Nothing
-
 
94
 
-
 
95
OraDatabase.Parameters.Remove "RTAG_ID"
-
 
96
 
-
 
97
'If proj_id = 281 Or proj_id = 221 Then
-
 
98
'	objWSH.Run   "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER_STEP &"\on_Make_Official.wsf //job:GetComponents //job:GenerateReleaseNotes //job:PostRun "&_
-
 
99
'                 "/pv_id:"& nPv_id , _
-
 
100
'                 0, False
-
 
101
'Else	
-
 
102
	objWSH.Run   "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:GetComponents //job:GenerateReleaseNotes //job:PostRun "&_
-
 
103
                 "/pv_id:"& nPv_id & " /proj_id:"& proj_id &" /rtag_name:"""&sRtagName&"", _
-
 
104
                 0, False
-
 
105
'End If				 
-
 
106
	Set objWSH = nothing
-
 
107
	
-
 
108
End Sub
-
 
109
%>
-
 
110
<%
-
 
111
'---------------------------------- MAIN LINE ----------------------------------------
37
'---------------------------------- MAIN LINE ----------------------------------------
112
 
38
 
113
' REQUREMENTS CHECK
39
' REQUREMENTS CHECK
114
Call Run_onMakeOfficial ( parPv_id, parRtag_id )
40
Call PUBLIC_Run_onMakeOfficial ( parRtag_id, parPv_id )
115
 
41
 
116
Call NotifyInterest(parPv_id, parRtag_id)
42
Call PUBLIC_NotifyInterestManualBuild ( parRtag_id, parPv_id )
117
 
43
 
118
'Return Page
44
'Return Page
119
If parRfile = "" Or parRfile = "_generate_release_notes.asp" Then
45
If parRfile = "" Or parRfile = "_generate_release_notes.asp" Then
120
    Response.Redirect ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
46
    Response.Redirect ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
121
Else
47
Else
122
    Response.Redirect ( parRfile &"?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
48
    Response.Redirect ( parRfile &"?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
123
End If
49
End If
124
	
50
 
125
%>
51
%>
126
 
52
 
127
 
53
 
128
<!-- DESTRUCTOR ------->
54
<!-- DESTRUCTOR ------->
129
<!--#include file="common/destructor.asp"-->
55
<!--#include file="common/destructor.asp"-->