| 183 |
brianf |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
|
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
|
|
8 |
' Change Owner
|
|
|
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 |
<!--#include file="common/formating.asp"-->
|
|
|
18 |
<%
|
|
|
19 |
'------------ ACCESS CONTROL ------------------
|
|
|
20 |
%>
|
|
|
21 |
<!--#include file="_access_control_login.asp"-->
|
|
|
22 |
<!--#include file="_access_control_general.asp"-->
|
|
|
23 |
<!--#include file="_access_control_project.asp"-->
|
|
|
24 |
<%
|
|
|
25 |
'------------ Variable Definition -------------
|
|
|
26 |
Dim parPv_id
|
|
|
27 |
Dim parPPv_id ' pv_id of parent
|
|
|
28 |
'Dim parRtag_id
|
|
|
29 |
Dim parRfile
|
|
|
30 |
Dim parView_id
|
|
|
31 |
Dim parBase_view_id
|
|
|
32 |
Dim bPreventSubmit
|
|
|
33 |
'------------ Constants Declaration -----------
|
|
|
34 |
'------------ Constants Declaration -----------
|
|
|
35 |
Const imgPkgLocked = "<img src='images/i_locked.gif' width='7' height='10' hspace='4' align='absmiddle'>"
|
|
|
36 |
Const imgPkgLockSpacer = "<img src='images/spacer.gif' width='7' height='10' hspace='4' align='absmiddle'>"
|
|
|
37 |
'------------ Variable Init -------------------
|
|
|
38 |
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
|
|
|
39 |
parPv_id = QStrPar("pv_id")
|
|
|
40 |
parPPv_id = QStrPar("ppv_id")
|
|
|
41 |
parRtag_id = QStrPar("rtag_id")
|
|
|
42 |
parRfile = Request("rfile")
|
|
|
43 |
parView_id = QStrPar("view_id")
|
|
|
44 |
parBase_view_id = QStrPar("base_view_id")
|
|
|
45 |
bPreventSubmit = false
|
|
|
46 |
'----------------------------------------------
|
|
|
47 |
%>
|
|
|
48 |
<%
|
|
|
49 |
Sub Get_Pkg_Information ( NNpv_id)
|
|
|
50 |
Dim rsTemp, Query_String
|
|
|
51 |
|
|
|
52 |
Query_String = _
|
| 185 |
brianf |
53 |
" SELECT pkg.pkg_id, pkg.pkg_name, pv.pkg_version, pv.dlocked,pv.modified_stamp,um.full_name as modifier,pv.created_stamp,uc.full_name as creator"&_
|
| 183 |
brianf |
54 |
" FROM packages pkg, package_versions pv, users um, users uc"&_
|
|
|
55 |
" WHERE pkg.pkg_id = pv.pkg_id"&_
|
|
|
56 |
" AND pv.modifier_id = um.user_id (+)" &_
|
|
|
57 |
" AND pv.creator_id = uc.user_id (+)" &_
|
|
|
58 |
" AND pv.pv_id = "& NNpv_id
|
|
|
59 |
|
|
|
60 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
61 |
|
|
|
62 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
| 185 |
brianf |
63 |
pkgInfoHash.Add "pkg_id", (rsTemp.Fields("pkg_id"))
|
| 183 |
brianf |
64 |
pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))
|
|
|
65 |
pkgInfoHash.Add "pkg_version", (rsTemp.Fields("pkg_version"))
|
|
|
66 |
pkgInfoHash.Add "dlocked", (rsTemp.Fields("dlocked"))
|
|
|
67 |
pkgInfoHash.Add "modified_stamp", (rsTemp.Fields("modified_stamp"))
|
|
|
68 |
pkgInfoHash.Add "modifier", (rsTemp.Fields("modifier"))
|
|
|
69 |
pkgInfoHash.Add "created_stamp", (rsTemp.Fields("created_stamp"))
|
|
|
70 |
pkgInfoHash.Add "creator", (rsTemp.Fields("creator"))
|
|
|
71 |
End If
|
|
|
72 |
|
|
|
73 |
rsTemp.Close
|
|
|
74 |
Set rsTemp = nothing
|
|
|
75 |
End Sub
|
|
|
76 |
|
|
|
77 |
'----------------------------------------------
|
|
|
78 |
Sub Add_Missing_Dependency(RtagId, pvId, viewId)
|
|
|
79 |
|
|
|
80 |
OraDatabase.Parameters.Add "RTAG_ID", RtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
81 |
OraDatabase.Parameters.Add "PV_ID", pvId, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
82 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
83 |
OraDatabase.Parameters.Add "VIEW_ID", viewId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
84 |
|
|
|
85 |
objEH.TryORA ( OraSession )
|
|
|
86 |
|
|
|
87 |
' check if the package already exists in a pending or wip state
|
|
|
88 |
If PackageExists(RtagId, pvId, "planned") Then
|
|
|
89 |
Call RaiseMsg ( enum_WMSG_ERROR, "Package " & pkgInfoHash.Item ("pkg_name") & " " & pkgInfoHash.Item ("pkg_version") & " already exists in a pending state")
|
|
|
90 |
ElseIf PackageExists(RtagId, pvId, "work_in_progress") Then
|
|
|
91 |
Call RaiseMsg ( enum_WMSG_ERROR, "Package " & pkgInfoHash.Item ("pkg_name") & " " & pkgInfoHash.Item ("pkg_version") & " already exists as a WIP")
|
|
|
92 |
End If
|
|
|
93 |
|
|
|
94 |
OraDatabase.ExecuteSQL _
|
|
|
95 |
"BEGIN PK_PLANNED.REMOVE_PACKAGE ( :PV_ID, :RTAG_ID, :USER_ID ); END;"
|
|
|
96 |
|
|
|
97 |
If Err.Number = 0 Then
|
|
|
98 |
OraDatabase.ExecuteSQL _
|
|
|
99 |
"BEGIN PK_RELEASE.ADD_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_ID, :USER_ID ); END;"
|
|
|
100 |
End If
|
|
|
101 |
|
|
|
102 |
objEH.CatchORA ( OraSession )
|
|
|
103 |
|
|
|
104 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
105 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
106 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
107 |
OraDatabase.Parameters.Remove "VIEW_ID"
|
|
|
108 |
End Sub
|
|
|
109 |
|
| 185 |
brianf |
110 |
Function Release_Groups ( SSrtag_id, SSpkg_id )
|
| 183 |
brianf |
111 |
Release_Groups = _
|
| 185 |
brianf |
112 |
"SELECT vi.view_id, vi.view_name, bv.hint"&_
|
|
|
113 |
" FROM views vi,"&_
|
|
|
114 |
" ("&_
|
|
|
115 |
" SELECT DISTINCT rc.BASE_VIEW_ID, '> ' AS hint"&_
|
|
|
116 |
" FROM release_content rc,"&_
|
|
|
117 |
" package_versions pv"&_
|
|
|
118 |
" WHERE rc.pv_id = pv.pv_id"&_
|
|
|
119 |
" AND pv.pkg_id IN (" & SSpkg_id & ")"&_
|
|
|
120 |
" ) bv "&_
|
|
|
121 |
"WHERE"&_
|
|
|
122 |
" UPPER(vi.base_view) = 'Y'"&_
|
|
|
123 |
" AND bv.BASE_VIEW_ID (+) = vi.VIEW_ID "&_
|
|
|
124 |
"ORDER BY vi.view_name ASC"
|
|
|
125 |
|
| 183 |
brianf |
126 |
End Function
|
|
|
127 |
|
|
|
128 |
%>
|
|
|
129 |
<%
|
|
|
130 |
'Process submition
|
|
|
131 |
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then
|
|
|
132 |
Call Add_Missing_Dependency(parRtag_id,parPv_id,parView_id)
|
|
|
133 |
Call OpenInParentWindow ( "dependencies.asp?pv_id="& parPPv_id &"&rtag_id="& parRtag_id )
|
|
|
134 |
Call CloseWindow
|
|
|
135 |
|
|
|
136 |
End If
|
|
|
137 |
%>
|
|
|
138 |
<%
|
|
|
139 |
Call Get_Pkg_Information ( parPv_id)
|
|
|
140 |
%>
|
|
|
141 |
<html>
|
|
|
142 |
<head>
|
|
|
143 |
<title>Release Manager</title>
|
|
|
144 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
145 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
146 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
147 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
148 |
<script language="JavaScript" src="images/tipster.js"></script>
|
|
|
149 |
<script language="JavaScript" src="images/_help_tips.js"></script>
|
|
|
150 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
151 |
</head>
|
|
|
152 |
|
|
|
153 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
|
|
154 |
<form name="addmissingdep" method="post" action="<%=scriptName%>">
|
|
|
155 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
|
|
156 |
<tr>
|
|
|
157 |
<td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_add_deps.gif" width="22" height="25" hspace="5"></td>
|
| 185 |
brianf |
158 |
<td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl"> Add Missing Dependency</td>
|
| 183 |
brianf |
159 |
<td background="images/lbox_bg_blue.gif" align="right" width="50%">
|
|
|
160 |
<input type="submit" name="btn" value="Add" style="width:50" class="form_btn_comp">
|
|
|
161 |
<input type="reset" name="btn" value="Cancel" style="width:50" class="form_btn_comp" onclick="self.close()">
|
|
|
162 |
</td>
|
|
|
163 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
|
|
|
164 |
<img src="images/h_trsp_dot.gif" width="5" height="22">
|
|
|
165 |
</td>
|
|
|
166 |
</tr>
|
|
|
167 |
<tr>
|
|
|
168 |
<td height="100%" width="1%"> </td>
|
|
|
169 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
|
|
170 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
171 |
<tr>
|
|
|
172 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
| 185 |
brianf |
173 |
<td width="1%" nowrap class="form_group" valign="bottom">Details of Dependency that will be Added:</td>
|
| 183 |
brianf |
174 |
<td nowrap width="100%"> </td>
|
|
|
175 |
<td nowrap width="100%"> </td>
|
|
|
176 |
</tr>
|
|
|
177 |
<tr>
|
|
|
178 |
<td width="1%"> </td>
|
|
|
179 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td>
|
|
|
180 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
181 |
<%=imgPkgLockSpacer%>
|
|
|
182 |
<%=pkgInfoHash.Item("pkg_name")%>
|
|
|
183 |
</td>
|
|
|
184 |
</tr>
|
|
|
185 |
<tr>
|
|
|
186 |
<td width="1%"> </td>
|
|
|
187 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Version</td>
|
|
|
188 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
189 |
<%If pkgInfoHash.Item("dlocked") = "Y" Then%><%=imgPkgLocked%><%Else%><%=imgPkgLockSpacer%><%End If%>
|
|
|
190 |
<%=pkgInfoHash.Item("pkg_version")%>
|
|
|
191 |
</td>
|
|
|
192 |
</tr>
|
|
|
193 |
<tr>
|
|
|
194 |
<td width="1%"> </td>
|
|
|
195 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Last Modified</td>
|
|
|
196 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
197 |
<%=imgPkgLockSpacer%>
|
|
|
198 |
<%=EuroDateTime(pkgInfoHash.Item ("modified_stamp")) & " by " & pkgInfoHash.Item ("modifier")%>
|
|
|
199 |
</td>
|
|
|
200 |
</tr>
|
|
|
201 |
<tr>
|
|
|
202 |
<td width="1%"> </td>
|
|
|
203 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Created</td>
|
|
|
204 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
|
|
205 |
<%=imgPkgLockSpacer%>
|
|
|
206 |
<%=EuroDateTime(pkgInfoHash.Item ("created_stamp")) & " by " & pkgInfoHash.Item ("creator")%>
|
|
|
207 |
</td>
|
|
|
208 |
</tr>
|
|
|
209 |
<tr>
|
|
|
210 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
| 185 |
brianf |
211 |
<td width="1%" nowrap class="form_group" valign="bottom">Select Destination View</td>
|
| 183 |
brianf |
212 |
<td nowrap width="100%"> </td>
|
|
|
213 |
</tr>
|
|
|
214 |
<tr>
|
|
|
215 |
<td width="1%"> </td>
|
| 185 |
brianf |
216 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif" valign=top>Base View</td>
|
| 183 |
brianf |
217 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif">
|
| 185 |
brianf |
218 |
<table border=0 cellpadding=0 cellspacing=0 class="rep_small">
|
|
|
219 |
<tr>
|
|
|
220 |
<td>
|
|
|
221 |
<select name="view_id" class="form_item">
|
|
|
222 |
<option></option>
|
| 183 |
brianf |
223 |
<%
|
|
|
224 |
Dim iDefault_View_id: iDefault_View_id = -1
|
|
|
225 |
If Not IsNull(parBase_view_id) Then iDefault_View_id = parBase_view_id
|
|
|
226 |
Dim rsRelGroups
|
| 185 |
brianf |
227 |
Dim bSelected: bSelected=False
|
|
|
228 |
Set rsRelGroups = OraDatabase.DbCreateDynaset( Release_Groups( parRtag_id,pkgInfoHash.Item ("pkg_id")), cint(0))
|
| 183 |
brianf |
229 |
While ((NOT rsRelGroups.BOF) AND (NOT rsRelGroups.EOF))
|
| 185 |
brianf |
230 |
If (NOT IsNull(rsRelGroups("hint"))) AND (NOT bSelected) Then
|
|
|
231 |
Response.write "<option selected value='"& rsRelGroups("view_id") &"'>"& rsRelGroups("hint") & rsRelGroups("view_name") &"</option>"
|
|
|
232 |
bSelected=True
|
|
|
233 |
Else
|
|
|
234 |
Response.write "<option value='"& rsRelGroups("view_id") &"'>"& rsRelGroups("hint") & rsRelGroups("view_name") &"</option>"
|
|
|
235 |
End If
|
| 183 |
brianf |
236 |
rsRelGroups.MoveNext
|
|
|
237 |
WEnd
|
|
|
238 |
rsRelGroups.Close
|
|
|
239 |
set rsRelGroups = nothing
|
|
|
240 |
%>
|
| 185 |
brianf |
241 |
</select>
|
|
|
242 |
</td>
|
|
|
243 |
</tr>
|
|
|
244 |
<tr>
|
|
|
245 |
<td>
|
|
|
246 |
NOTE: '>' is a suggestion of where to place this dependency.
|
|
|
247 |
It denotes views where it has been placed in other releases.
|
|
|
248 |
</td>
|
|
|
249 |
</tr>
|
|
|
250 |
</table>
|
| 183 |
brianf |
251 |
</td>
|
|
|
252 |
</tr>
|
|
|
253 |
<tr>
|
|
|
254 |
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
|
|
|
255 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
|
|
256 |
<input type="hidden" name="ppv_id" value="<%=parPPv_id%>">
|
|
|
257 |
<input type="hidden" name="rfile" value="<%=parRfile%>">
|
|
|
258 |
<input type="hidden" name="action" value="true">
|
|
|
259 |
</tr>
|
|
|
260 |
</table>
|
|
|
261 |
</td>
|
|
|
262 |
</tr>
|
|
|
263 |
<tr>
|
|
|
264 |
<td height="100%" width="1%"> </td>
|
|
|
265 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
|
|
266 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
267 |
<tr>
|
|
|
268 |
<td width="1%" wrap class="form_group" valign="bottom">
|
|
|
269 |
WARNING:<br>
|
|
|
270 |
The destination release may not satisfy any or all the dependencies that come with
|
|
|
271 |
this dependency you are about to add. It is your responsibility to rectify this in the
|
|
|
272 |
destination release.
|
|
|
273 |
</td>
|
|
|
274 |
</tr>
|
|
|
275 |
</table>
|
|
|
276 |
</td>
|
|
|
277 |
</tr>
|
|
|
278 |
<tr>
|
|
|
279 |
<td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
|
|
280 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
|
|
281 |
</tr>
|
|
|
282 |
</table>
|
|
|
283 |
</form>
|
|
|
284 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
285 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
286 |
<!----------------------------------------------------->
|
|
|
287 |
</body>
|
|
|
288 |
</html>
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
<!-- DESTRUCTOR ------->
|
|
|
292 |
<!--#include file="common/destructor.asp"-->
|