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