| 5590 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 5357 |
dpurdie |
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' Import Release
|
|
|
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/qstr.asp"-->
|
|
|
14 |
<!--#include file="common/common_subs.asp"-->
|
|
|
15 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
16 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
17 |
<%
|
|
|
18 |
'------------ ACCESS CONTROL ------------------
|
|
|
19 |
%>
|
|
|
20 |
<!--#include file="_access_control_login.asp"-->
|
|
|
21 |
<!--#include file="_access_control_general.asp"-->
|
|
|
22 |
<!--#include file="_access_control_project.asp"-->
|
|
|
23 |
<%
|
|
|
24 |
'------------ Variable Definition -------------
|
|
|
25 |
Dim parFRproj_id
|
|
|
26 |
Dim parFRrtag_id
|
|
|
27 |
Dim parToRtag_id
|
| 5590 |
dpurdie |
28 |
Dim parFromRtag_id
|
|
|
29 |
Dim sMessage
|
| 5357 |
dpurdie |
30 |
'------------ Constants Declaration -----------
|
|
|
31 |
'------------ Variable Init -------------------
|
|
|
32 |
parFRproj_id = QStrPar("FRproj_id")
|
|
|
33 |
parFRrtag_id = QStrPar("FRrtag_id")
|
|
|
34 |
parToRtag_id = QStrPar("ToRtag_id")
|
| 5590 |
dpurdie |
35 |
parFromRtag_id = QStrPar("FromRtag_id")
|
|
|
36 |
sMessage = NULL
|
| 5357 |
dpurdie |
37 |
If parFRproj_id = "" Then parFRproj_id = "-1"
|
|
|
38 |
If parFRrtag_id = "" Then parFRrtag_id = "-1"
|
|
|
39 |
'----------------------------------------------
|
|
|
40 |
%>
|
|
|
41 |
<%
|
|
|
42 |
Sub Get_Projects ( NNproj_id )
|
|
|
43 |
Dim rsTemp, Query_String, tempLINK
|
|
|
44 |
Query_String = _
|
|
|
45 |
"SELECT * FROM projects ORDER BY proj_name ASC"
|
|
|
46 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
47 |
|
| 5590 |
dpurdie |
48 |
Response.write "<select name='FRproj_id' onChange=""MM_showProgressBar();MM_jumpMenu('window',this,0)"" class='form_item'>"
|
| 5357 |
dpurdie |
49 |
Response.write "<option value=''>Select Project</option>"
|
|
|
50 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
51 |
tempLINK = scriptName &"?FRproj_id="& rsTemp.Fields("proj_id") &"&FRrtag_id=&ToRtag_id="& parToRtag_id &"&"& objPMod.ComposeURL()
|
|
|
52 |
|
|
|
53 |
If NNproj_id = Cstr(rsTemp.Fields("proj_id")) Then
|
|
|
54 |
Response.write "<option value='"& tempLINK &"' selected>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
|
|
|
55 |
Else
|
|
|
56 |
Response.write "<option value='"& tempLINK &"'>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
|
|
|
57 |
End If
|
|
|
58 |
rsTemp.MoveNext
|
|
|
59 |
WEnd
|
|
|
60 |
Response.write "</select>"
|
|
|
61 |
|
|
|
62 |
rsTemp.Close
|
|
|
63 |
Set rsTemp = nothing
|
|
|
64 |
End Sub
|
|
|
65 |
|
|
|
66 |
Sub Get_Release_Labels ( NNproj_id, NNrtag_id )
|
|
|
67 |
Dim rsTemp, Query_String, tempLINK
|
|
|
68 |
Query_String = _
|
|
|
69 |
"SELECT rtag_id, rtag_name FROM release_tags WHERE proj_id = "& NNproj_id &" ORDER BY rtag_id ASC"
|
|
|
70 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
71 |
|
| 5590 |
dpurdie |
72 |
Response.write "<select name='FRrtag_id' onChange=""MM_showProgressBar();MM_jumpMenu('window',this,0)"" class='form_item'>"
|
| 5357 |
dpurdie |
73 |
If NNproj_id <> "-1" Then
|
|
|
74 |
Response.write "<option value=''>Select Release Label</option>"
|
|
|
75 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
76 |
tempLINK = scriptName &"?FRrtag_id="& rsTemp.Fields("rtag_id") &"&FRproj_id="& NNproj_id &"&ToRtag_id="& parToRtag_id &"&"& objPMod.ComposeURL()
|
|
|
77 |
|
|
|
78 |
If NNrtag_id = Cstr(rsTemp.Fields("rtag_id")) Then
|
|
|
79 |
Response.write "<option value='"& tempLINK &"' selected>"& (rsTemp.Fields("rtag_name")) &"</option>"
|
|
|
80 |
Else
|
|
|
81 |
Response.write "<option value='"& tempLINK &"'>"& (rsTemp.Fields("rtag_name")) &"</option>"
|
|
|
82 |
End If
|
|
|
83 |
rsTemp.MoveNext
|
|
|
84 |
WEnd
|
|
|
85 |
End If
|
|
|
86 |
Response.write "</select>"
|
|
|
87 |
|
|
|
88 |
rsTemp.Close
|
|
|
89 |
Set rsTemp = nothing
|
|
|
90 |
End Sub
|
| 5590 |
dpurdie |
91 |
|
|
|
92 |
Function Import_Release ( NNFromRtag_id, NNToRtag_id )
|
|
|
93 |
|
|
|
94 |
OraDatabase.Parameters.Add "FROMRTAG_ID", NNFromRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
95 |
OraDatabase.Parameters.Add "TORTAG_ID", NNToRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
96 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
97 |
|
|
|
98 |
sMessage = NNFromRtag_id &":"& NNToRtag_id
|
|
|
99 |
|
|
|
100 |
objEH.ErrorRedirect = FALSE
|
|
|
101 |
objEH.TryORA ( OraSession )
|
|
|
102 |
On Error Resume Next
|
|
|
103 |
|
|
|
104 |
' Remove old Work in Progress Contents
|
| 6750 |
dpurdie |
105 |
OraDatabase.ExecuteSQL "BEGIN PK_RELEASE.IMPORT_RELEASE_CONTENTS (:FROMRTAG_ID, :TORTAG_ID, :USER_ID); END;"
|
|
|
106 |
|
|
|
107 |
OraDatabase.Parameters.Remove "FROMRTAG_ID"
|
|
|
108 |
OraDatabase.Parameters.Remove "TORTAG_ID"
|
|
|
109 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 5590 |
dpurdie |
110 |
|
|
|
111 |
objEH.CatchORA ( OraSession )
|
|
|
112 |
If objEH.Finally Then
|
|
|
113 |
Call OpenInParentWindow ("dependencies.asp?rtag_id=" & NNToRtag_id)
|
|
|
114 |
Call CloseWindow()
|
|
|
115 |
End If
|
|
|
116 |
|
|
|
117 |
End Function
|
|
|
118 |
|
| 5357 |
dpurdie |
119 |
%>
|
|
|
120 |
<%
|
|
|
121 |
'Process submition
|
|
|
122 |
If CBool(QStrPar("action")) Then
|
| 5590 |
dpurdie |
123 |
If NOT objAccessControl.UserLogedIn Then
|
|
|
124 |
sMessage = "User is no longer logged in"
|
|
|
125 |
ElseIf NOT( (parFromRtag_id <> "") AND (parToRtag_id <> "")) Then
|
|
|
126 |
sMessage = "Internal: Mandatory parameters are missing"
|
|
|
127 |
Else
|
|
|
128 |
Call Import_Release ( parFromRtag_id, parToRtag_id )
|
|
|
129 |
parFRproj_id = "-1"
|
|
|
130 |
parFRrtag_id = "-1"
|
|
|
131 |
End If
|
| 5357 |
dpurdie |
132 |
End If
|
|
|
133 |
%>
|
|
|
134 |
<html>
|
|
|
135 |
<head>
|
|
|
136 |
<title>Release Manager</title>
|
|
|
137 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
138 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
139 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6579 |
dpurdie |
140 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
141 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
142 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
| 5357 |
dpurdie |
143 |
</head>
|
|
|
144 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
| 7288 |
dpurdie |
145 |
<div id='ProgressBar' class='vixSpinner' style='visibility:hidden;'></div>
|
| 5590 |
dpurdie |
146 |
<form class="form_tight" name="importrel" method="post" action="<%=scriptName%>">
|
|
|
147 |
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
|
|
148 |
<tr>
|
|
|
149 |
<td colspan="2" class="body_txt">
|
|
|
150 |
Select the source Project and Release.
|
|
|
151 |
<br>All packages from the selected Release will be imported into this Release.
|
| 6750 |
dpurdie |
152 |
<br>Note: The current set of packages will be deleted.
|
| 5590 |
dpurdie |
153 |
<p>
|
|
|
154 |
</td>
|
| 5357 |
dpurdie |
155 |
</tr>
|
|
|
156 |
<tr>
|
|
|
157 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
| 5590 |
dpurdie |
158 |
<!-- LOCAL MESSAGES ++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
159 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
|
|
160 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
161 |
<!--#include file="messages/_msg_inline.asp"-->
|
| 5357 |
dpurdie |
162 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
163 |
<tr>
|
|
|
164 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Project</td>
|
|
|
165 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
166 |
<%Call Get_Projects ( parFRproj_id )%>
|
|
|
167 |
</td>
|
|
|
168 |
</tr>
|
|
|
169 |
<tr>
|
|
|
170 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Release
|
|
|
171 |
Name </td>
|
|
|
172 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
173 |
<%Call Get_Release_Labels ( parFRproj_id, parFRrtag_id )%>
|
|
|
174 |
<input type="hidden" name="ToRtag_id" value="<%=parToRtag_id%>">
|
|
|
175 |
<input type="hidden" name="FromRtag_id" value="<%=parFRrtag_id%>">
|
|
|
176 |
<input type="hidden" name="rtag_id" value="<%=Request("rtag_id")%>">
|
|
|
177 |
<input type="hidden" name="action" value="true">
|
|
|
178 |
</td>
|
|
|
179 |
</tr>
|
|
|
180 |
</table>
|
|
|
181 |
</td>
|
|
|
182 |
</tr>
|
|
|
183 |
<tr>
|
| 7288 |
dpurdie |
184 |
<td align="right" colspan=2>
|
| 5590 |
dpurdie |
185 |
<input type="submit" name="btn" value="Import" class="form_btn_comp" onClick="MM_validateForm('FRproj_id','Project','R','FRrtag_id','Release Name','R');return document.MM_returnValue">
|
|
|
186 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
|
|
|
187 |
</td>
|
| 5357 |
dpurdie |
188 |
</tr>
|
|
|
189 |
</table>
|
|
|
190 |
</form>
|
|
|
191 |
</body>
|
|
|
192 |
</html>
|
|
|
193 |
<!-- DESTRUCTOR ------->
|
| 119 |
ghuddy |
194 |
<!--#include file="common/destructor.asp"-->
|