| 119 |
ghuddy |
1 |
<%
|
|
|
2 |
'=====================================================
|
| 129 |
ghuddy |
3 |
' COMMON SUBs Part 1
|
| 119 |
ghuddy |
4 |
'=====================================================
|
| 3907 |
dpurdie |
5 |
Dim haveCommonSubs: haveCommonSubs = 1
|
| 119 |
ghuddy |
6 |
%>
|
|
|
7 |
<%
|
|
|
8 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
9 |
Sub CloseWindow
|
|
|
10 |
%>
|
|
|
11 |
<SCRIPT language="JavaScript" type="text/javascript">
|
|
|
12 |
<!--
|
|
|
13 |
self.close();
|
|
|
14 |
//-->
|
|
|
15 |
</SCRIPT>
|
|
|
16 |
<%
|
|
|
17 |
End Sub
|
|
|
18 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
19 |
Sub OpenChildWindow ( SStitle, SSurl, SSH, SSW, BBscroll )
|
| 129 |
ghuddy |
20 |
Dim scrlBar
|
|
|
21 |
If BBscroll Then
|
|
|
22 |
scrlBar = "yes"
|
|
|
23 |
Else
|
|
|
24 |
scrlBar = "no"
|
|
|
25 |
End If
|
| 119 |
ghuddy |
26 |
%>
|
| 129 |
ghuddy |
27 |
<script language="JavaScript" type="text/javascript">
|
|
|
28 |
<!--
|
|
|
29 |
window.open('<%=SSurl%>','<%=SStitle%>','scrollbars=<%=scrlBar%>,resizable=yes,width=<%=SSW%>,height=<%=SSH%>')
|
|
|
30 |
//-->
|
|
|
31 |
</script>
|
| 119 |
ghuddy |
32 |
<%
|
|
|
33 |
End Sub
|
|
|
34 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
35 |
Sub OpenInParentWindow ( SSurl )
|
|
|
36 |
%>
|
| 129 |
ghuddy |
37 |
<script language="JavaScript" type="text/javascript">
|
|
|
38 |
<!--
|
|
|
39 |
window.opener.document.location='<%=SSurl%>';
|
|
|
40 |
//-->
|
|
|
41 |
</script>
|
| 119 |
ghuddy |
42 |
<%
|
|
|
43 |
End Sub
|
|
|
44 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
45 |
Sub OpenInWindow ( SSurl )
|
| 129 |
ghuddy |
46 |
Response.Redirect ( SSurl )
|
| 119 |
ghuddy |
47 |
End Sub
|
|
|
48 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
49 |
Function GetQuery ( sQryName )
|
| 129 |
ghuddy |
50 |
GetQuery = ReadFile( QUERIES_PATH &"\"& sQryName )
|
| 119 |
ghuddy |
51 |
End Function
|
|
|
52 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
53 |
Sub RaiseMsg ( SSerrFile, SSerrDesc )
|
| 129 |
ghuddy |
54 |
' Usage: enumERROR, parval1 &"|"& parval2 &"|"& parval3 ...
|
|
|
55 |
Session( enum_RELMGR_ERRDESCRIPTION ) = SSerrDesc
|
|
|
56 |
Response.Redirect ("messages/"& SSerrFile )
|
| 119 |
ghuddy |
57 |
End Sub
|
|
|
58 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
59 |
Sub RaiseMsgInParent ( SSerrFile, SSerrDesc )
|
| 129 |
ghuddy |
60 |
Session( enum_RELMGR_ERRDESCRIPTION ) = SSerrDesc
|
|
|
61 |
Call OpenInParentWindow ("messages/"& SSerrFile )
|
| 119 |
ghuddy |
62 |
End Sub
|
|
|
63 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
64 |
Function ReadFile( SSpath )
|
| 129 |
ghuddy |
65 |
Dim filesys, rfile
|
|
|
66 |
Set filesys = CreateObject("Scripting.FileSystemObject")
|
|
|
67 |
Set rfile = filesys.OpenTextFile( SSpath, 1, false)
|
|
|
68 |
ReadFile = rfile.ReadAll
|
|
|
69 |
rfile.close
|
|
|
70 |
Set filesys = nothing
|
| 119 |
ghuddy |
71 |
End Function
|
|
|
72 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
73 |
Function HighlightSubstring ( SSstr, SSsubstr )
|
| 129 |
ghuddy |
74 |
Dim leftSTR, startPos
|
|
|
75 |
startPos = InStr( 1, SSstr, SSsubstr, 1 )
|
| 119 |
ghuddy |
76 |
|
| 129 |
ghuddy |
77 |
If startPos > 0 Then
|
|
|
78 |
leftSTR = Left ( SSstr, startPos - 1 )
|
|
|
79 |
HighlightSubstring = leftSTR &"<SPAN style='background:#ffff99;'>"& Mid( SSstr, startPos, Len(SSsubstr) ) &"</SPAN>"& Right ( SSstr, Len(SSstr) - Len(leftSTR) - Len(SSsubstr) )
|
|
|
80 |
Else
|
|
|
81 |
' Subtring not found
|
|
|
82 |
HighlightSubstring = SSstr
|
|
|
83 |
End If
|
| 119 |
ghuddy |
84 |
|
|
|
85 |
End Function
|
|
|
86 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
87 |
Sub DeleteFile( SSpath )
|
| 129 |
ghuddy |
88 |
Dim filesys
|
|
|
89 |
Set filesys = CreateObject("Scripting.FileSystemObject")
|
|
|
90 |
If filesys.FileExists(SSpath) Then
|
|
|
91 |
filesys.DeleteFile SSpath, TRUE
|
|
|
92 |
End If
|
|
|
93 |
Set filesys = nothing
|
| 119 |
ghuddy |
94 |
End Sub
|
|
|
95 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
96 |
Sub DeleteFolder( SSpath )
|
| 129 |
ghuddy |
97 |
Dim filesys
|
|
|
98 |
Set filesys = CreateObject ("Scripting.FileSystemObject")
|
|
|
99 |
If filesys.FolderExists( SSpath ) Then
|
|
|
100 |
'Set oFolder = filesys.GetFolder( SSpath )
|
|
|
101 |
filesys.DeleteFolder SSpath ,TRUE
|
|
|
102 |
End If
|
| 119 |
ghuddy |
103 |
End Sub
|
|
|
104 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
105 |
Sub Create_Folder ( sCreateIn, sFolderName )
|
| 129 |
ghuddy |
106 |
Dim filesys, currfolder, folcoll, subfol
|
|
|
107 |
Set filesys = CreateObject("Scripting.FileSystemObject")
|
|
|
108 |
If filesys.FolderExists( sCreateIn ) Then
|
|
|
109 |
Set currfolder = filesys.GetFolder( sCreateIn )
|
|
|
110 |
Set folcoll = currfolder.SubFolders
|
|
|
111 |
If NOT filesys.FolderExists( sCreateIn &"\"& sFolderName ) Then
|
|
|
112 |
folcoll.Add( sFolderName )
|
|
|
113 |
End If
|
|
|
114 |
End If
|
| 119 |
ghuddy |
115 |
End Sub
|
|
|
116 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
117 |
Function Folder_Is_Empty ( sPath )
|
| 129 |
ghuddy |
118 |
Dim filesys, oFolder
|
|
|
119 |
Set filesys = CreateObject("Scripting.FileSystemObject")
|
| 119 |
ghuddy |
120 |
|
| 129 |
ghuddy |
121 |
If filesys.FolderExists( sPath ) Then
|
|
|
122 |
Set oFolder = filesys.GetFolder( sPath )
|
|
|
123 |
If ( oFolder.Files.Count + oFolder.SubFolders.Count ) > 0 Then
|
|
|
124 |
Folder_Is_Empty = FALSE
|
|
|
125 |
Else
|
|
|
126 |
Folder_Is_Empty = TRUE
|
|
|
127 |
End If
|
|
|
128 |
Else
|
|
|
129 |
Folder_Is_Empty = TRUE
|
|
|
130 |
End If
|
| 119 |
ghuddy |
131 |
|
|
|
132 |
End Function
|
|
|
133 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
134 |
Sub Destroy_All_Objects
|
| 129 |
ghuddy |
135 |
On Error Resume Next
|
|
|
136 |
set brokenReadyHash = nothing
|
|
|
137 |
set brokenHash = nothing
|
|
|
138 |
set pkgInfoHash = nothing
|
|
|
139 |
set OraDatabase = nothing
|
|
|
140 |
set OraSession = nothing
|
|
|
141 |
set userdetailsHash = nothing
|
| 119 |
ghuddy |
142 |
End Sub
|
|
|
143 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
144 |
Function InStrPipes ( SSstr, SSsubstr )
|
| 129 |
ghuddy |
145 |
If InStr( SSstr, "|"& SSsubstr &"|") > 0 Then
|
|
|
146 |
InStrPipes = true
|
|
|
147 |
Else
|
|
|
148 |
InStrPipes = false
|
|
|
149 |
End If
|
| 119 |
ghuddy |
150 |
End Function
|
|
|
151 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
152 |
Function RemoveFromStrPipes ( SSstr, SSsubstr )
|
| 129 |
ghuddy |
153 |
RemoveFromStrPipes = Replace( SSstr, "|"& SSsubstr &"|", "" )
|
| 119 |
ghuddy |
154 |
End Function
|
|
|
155 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
156 |
Function View_Name_Exists ( SSviewname, NNused_id )
|
| 129 |
ghuddy |
157 |
Dim rsTemp, Query_String
|
|
|
158 |
Query_String = _
|
|
|
159 |
" SELECT view_name"&_
|
|
|
160 |
" FROM views"&_
|
|
|
161 |
" WHERE UPPER(view_name) = UPPER('"& UCase(SSviewname) &"') AND owner_id = "& NNused_id
|
|
|
162 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
163 |
If rsTemp.RecordCount > 0 Then
|
|
|
164 |
View_Name_Exists = TRUE
|
|
|
165 |
Else
|
|
|
166 |
View_Name_Exists = FALSE
|
|
|
167 |
End If
|
|
|
168 |
rsTemp.Close
|
|
|
169 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
170 |
End Function
|
|
|
171 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
172 |
Function User_Name_Exists ( SSusername )
|
| 129 |
ghuddy |
173 |
Dim rsTemp, Query_String
|
|
|
174 |
Query_String = _
|
|
|
175 |
" SELECT user_name"&_
|
|
|
176 |
" FROM users"&_
|
|
|
177 |
" WHERE user_name = '"& SSusername &"'"
|
|
|
178 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
179 |
If rsTemp.RecordCount > 0 Then
|
|
|
180 |
User_Name_Exists = TRUE
|
|
|
181 |
Else
|
|
|
182 |
User_Name_Exists = FALSE
|
|
|
183 |
End If
|
|
|
184 |
rsTemp.Close
|
|
|
185 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
186 |
End Function
|
|
|
187 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
188 |
Function This_View_Owner( NNview_id, NNuser_id )
|
| 129 |
ghuddy |
189 |
Dim rsTemp, Query_String
|
|
|
190 |
Query_String = _
|
|
|
191 |
" SELECT owner_id"&_
|
|
|
192 |
" FROM views"&_
|
|
|
193 |
" WHERE view_id = "& NNview_id
|
|
|
194 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
195 |
If rsTemp.RecordCount > 0 Then
|
|
|
196 |
If CInt(rsTemp.Fields("owner_id")) = CInt(NNuser_id) Then
|
|
|
197 |
This_View_Owner = TRUE
|
|
|
198 |
Else
|
|
|
199 |
This_View_Owner = FALSE
|
|
|
200 |
End If
|
|
|
201 |
Else
|
|
|
202 |
' view not found
|
|
|
203 |
Session("AdditionalParams") = "$ADMINEMAIL$,"& adminEmail
|
|
|
204 |
Response.Redirect("message.asp?msg=400-2")
|
|
|
205 |
End If
|
|
|
206 |
rsTemp.Close
|
|
|
207 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
208 |
End Function
|
|
|
209 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
210 |
Function GetReleaseMode ( NNrtag_id )
|
| 129 |
ghuddy |
211 |
Dim rsTemp, Query_String
|
|
|
212 |
If NNrtag_id = "" Then NNrtag_id = "-1"
|
| 119 |
ghuddy |
213 |
|
| 129 |
ghuddy |
214 |
Query_String = _
|
|
|
215 |
" SELECT official FROM release_tags WHERE rtag_id = "& NNrtag_id
|
| 119 |
ghuddy |
216 |
|
| 129 |
ghuddy |
217 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
218 |
'Response.write "DB"& NNrtag_id
|
|
|
219 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
220 |
GetReleaseMode = rsTemp.Fields("official")
|
| 119 |
ghuddy |
221 |
|
| 129 |
ghuddy |
222 |
End If
|
| 119 |
ghuddy |
223 |
|
| 129 |
ghuddy |
224 |
rsTemp.Close
|
|
|
225 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
226 |
End Function
|
|
|
227 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
228 |
Function Get_Devl_Envorinment
|
| 129 |
ghuddy |
229 |
If Request.Cookies("RELEASEMANAGER_MEMORY")("devl_environment") <> "" Then
|
|
|
230 |
If Request.Cookies("RELEASEMANAGER_MEMORY")("devl_environment") = "clearcase" Then
|
|
|
231 |
Get_Devl_Envorinment = "jats" 'clear case does not have import
|
|
|
232 |
Else
|
|
|
233 |
Get_Devl_Envorinment = Request.Cookies("RELEASEMANAGER_MEMORY")("devl_environment")
|
|
|
234 |
End If
|
|
|
235 |
Else
|
|
|
236 |
Get_Devl_Envorinment = "jats" 'JATS devl environment is set by default
|
|
|
237 |
End If
|
| 119 |
ghuddy |
238 |
End Function
|
|
|
239 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
240 |
Function Get_From_DUAL ( SSclm )
|
| 129 |
ghuddy |
241 |
Dim rsTemp, Query_String, OraSession2, OraDatabase2
|
|
|
242 |
Set OraSession2 = CreateObject("OracleInProcServer.XOraSession")
|
|
|
243 |
Set OraDatabase2 = OraSession2.OpenDatabase( TNS_NAME, DB_AUTHENTICATION, Cint(0))
|
| 119 |
ghuddy |
244 |
|
| 129 |
ghuddy |
245 |
Query_String = _
|
|
|
246 |
" SELECT "& SSclm &" AS result FROM DUAL"
|
|
|
247 |
Set rsTemp = OraDatabase2.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
248 |
|
| 129 |
ghuddy |
249 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
250 |
Get_From_DUAL = (rsTemp.Fields("result"))
|
|
|
251 |
End If
|
| 119 |
ghuddy |
252 |
|
| 129 |
ghuddy |
253 |
rsTemp.Close
|
|
|
254 |
Set rsTemp = nothing
|
|
|
255 |
Set OraDatabase2 = nothing
|
|
|
256 |
Set OraSession2 = nothing
|
| 119 |
ghuddy |
257 |
End Function
|
|
|
258 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
259 |
Function Get_Pkg_Base_View ( NNpv_id, NNrtag_id )
|
| 129 |
ghuddy |
260 |
Dim rsTemp, Query_String
|
| 119 |
ghuddy |
261 |
|
| 129 |
ghuddy |
262 |
If NNrtag_id = "" Then
|
|
|
263 |
Get_Pkg_Base_View = "N/A"
|
|
|
264 |
Exit Function
|
|
|
265 |
End If
|
| 119 |
ghuddy |
266 |
|
| 129 |
ghuddy |
267 |
Query_String = _
|
|
|
268 |
" SELECT vi.view_name"&_
|
|
|
269 |
" FROM release_content rc,"&_
|
|
|
270 |
" views vi"&_
|
|
|
271 |
" WHERE vi.view_id = rc.base_view_id"&_
|
|
|
272 |
" AND rc.rtag_id = "& NNrtag_id &_
|
|
|
273 |
" AND rc.pv_id = "& NNpv_id
|
| 119 |
ghuddy |
274 |
|
| 129 |
ghuddy |
275 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
276 |
|
| 129 |
ghuddy |
277 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
278 |
Get_Pkg_Base_View = UCase(rsTemp.Fields("view_name"))
|
|
|
279 |
Else
|
|
|
280 |
Get_Pkg_Base_View = "N/A"
|
|
|
281 |
End If
|
| 119 |
ghuddy |
282 |
|
| 129 |
ghuddy |
283 |
rsTemp.Close
|
|
|
284 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
285 |
End Function
|
|
|
286 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
287 |
Function Get_Proj_ID ( SSrtag_id )
|
| 129 |
ghuddy |
288 |
Dim rsTemp, Query_String
|
| 119 |
ghuddy |
289 |
|
| 129 |
ghuddy |
290 |
Query_String = _
|
|
|
291 |
" SELECT projects.proj_id"&_
|
|
|
292 |
" FROM projects projects, release_tags rel"&_
|
|
|
293 |
" WHERE projects.proj_id = rel.proj_id"&_
|
|
|
294 |
" AND rel.rtag_id = "& SSrtag_id
|
| 119 |
ghuddy |
295 |
|
| 129 |
ghuddy |
296 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
297 |
|
| 129 |
ghuddy |
298 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
299 |
Get_Proj_ID = (rsTemp.Fields("proj_id"))
|
|
|
300 |
End If
|
| 119 |
ghuddy |
301 |
|
| 129 |
ghuddy |
302 |
rsTemp.Close
|
|
|
303 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
304 |
End Function
|
|
|
305 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
306 |
Function Get_Proj_Name ( NNproj_id )
|
| 129 |
ghuddy |
307 |
Dim rsTemp, Query_String
|
| 119 |
ghuddy |
308 |
|
| 159 |
ghuddy |
309 |
Get_Proj_Name = ""
|
|
|
310 |
|
| 129 |
ghuddy |
311 |
Query_String = _
|
|
|
312 |
" SELECT proj_name "&_
|
|
|
313 |
" FROM projects pr "&_
|
| 119 |
ghuddy |
314 |
" WHERE pr.proj_id = "& NNproj_id
|
|
|
315 |
|
| 129 |
ghuddy |
316 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
317 |
|
| 129 |
ghuddy |
318 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
319 |
Get_Proj_Name = (rsTemp.Fields("proj_name"))
|
|
|
320 |
End If
|
| 119 |
ghuddy |
321 |
|
| 129 |
ghuddy |
322 |
rsTemp.Close
|
|
|
323 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
324 |
End Function
|
|
|
325 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 159 |
ghuddy |
326 |
Function Get_Release_Name ( NNrtag_id )
|
|
|
327 |
Dim rsTemp, Query_String
|
|
|
328 |
|
|
|
329 |
Get_Release_Name = ""
|
|
|
330 |
|
|
|
331 |
Query_String = _
|
|
|
332 |
" SELECT rtag_name "&_
|
|
|
333 |
" FROM release_tags rt "&_
|
|
|
334 |
" WHERE rt.rtag_id = "& NNrtag_id
|
|
|
335 |
|
|
|
336 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
337 |
|
|
|
338 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
339 |
Get_Release_Name = (rsTemp.Fields("rtag_name"))
|
|
|
340 |
End If
|
|
|
341 |
|
|
|
342 |
rsTemp.Close
|
|
|
343 |
Set rsTemp = nothing
|
|
|
344 |
End Function
|
|
|
345 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 119 |
ghuddy |
346 |
Function Get_Base_URL ( NNproj_id )
|
| 129 |
ghuddy |
347 |
Dim rsTemp, Query_String
|
| 119 |
ghuddy |
348 |
|
| 129 |
ghuddy |
349 |
Query_String = _
|
|
|
350 |
" SELECT base_url "&_
|
|
|
351 |
" FROM projects pr "&_
|
| 119 |
ghuddy |
352 |
" WHERE pr.proj_id = "& NNproj_id
|
|
|
353 |
|
| 129 |
ghuddy |
354 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
355 |
|
| 129 |
ghuddy |
356 |
Get_Base_URL = rsTemp("base_url")
|
| 119 |
ghuddy |
357 |
|
| 129 |
ghuddy |
358 |
rsTemp.Close()
|
|
|
359 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
360 |
End Function
|
|
|
361 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
362 |
Function Get_Categories ( NNrtag_id )
|
| 129 |
ghuddy |
363 |
Get_Categories = _
|
|
|
364 |
" SELECT vi.view_id, vi.view_name"&_
|
|
|
365 |
" FROM release_content rel,"&_
|
|
|
366 |
" views vi"&_
|
|
|
367 |
" WHERE rel.base_view_id = vi.view_id"&_
|
|
|
368 |
" AND rtag_id = "& NNrtag_id &_
|
|
|
369 |
" GROUP BY vi.view_id, vi.view_name "&_
|
|
|
370 |
" ORDER BY vi.view_name ASC "
|
| 119 |
ghuddy |
371 |
End Function
|
|
|
372 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
373 |
Function Get_PV_IDs_In_Release ( NNrtag_id )
|
|
|
374 |
Dim rsTemp, Query_String, tempSTR
|
| 129 |
ghuddy |
375 |
tempSTR = "-1"
|
|
|
376 |
Query_String = _
|
|
|
377 |
"SELECT pv_id FROM release_content WHERE rtag_id = "& NNrtag_id
|
| 119 |
ghuddy |
378 |
|
| 129 |
ghuddy |
379 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
380 |
|
| 129 |
ghuddy |
381 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
382 |
tempSTR = tempSTR &","& rsTemp.Fields("pv_id")
|
|
|
383 |
rsTemp.MoveNext
|
|
|
384 |
WEnd
|
|
|
385 |
Get_PV_IDs_In_Release = tempSTR
|
|
|
386 |
rsTemp.Close
|
|
|
387 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
388 |
End Function
|
|
|
389 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
390 |
Sub Get_Pkg_Info ( SSpv_id, NNrtag )
|
| 129 |
ghuddy |
391 |
Dim rsTemp, Query_String
|
|
|
392 |
OraDatabase.Parameters.Add "PV_ID", SSpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
393 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 183 |
brianf |
394 |
OraDatabase.Parameters.Add "RETURN_NUMBER", NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
|
| 119 |
ghuddy |
395 |
|
| 129 |
ghuddy |
396 |
pkgInfoHash.Item ("can_unofficial") = "false"
|
| 119 |
ghuddy |
397 |
|
| 129 |
ghuddy |
398 |
'/* Get Package Details */
|
|
|
399 |
Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("PackageDetails.sql"), cint(0))
|
| 119 |
ghuddy |
400 |
|
| 129 |
ghuddy |
401 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
402 |
pkgInfoHash.Add "pv_id", (rsTemp.Fields("pv_id"))
|
|
|
403 |
pkgInfoHash.Add "pkg_id", (rsTemp.Fields("pkg_id"))
|
|
|
404 |
pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))
|
|
|
405 |
pkgInfoHash.Add "pkg_version", (rsTemp.Fields("pkg_version"))
|
|
|
406 |
pkgInfoHash.Add "v_ext", (rsTemp.Fields("v_ext"))
|
|
|
407 |
pkgInfoHash.Add "comments", (rsTemp.Fields("comments"))
|
| 119 |
ghuddy |
408 |
|
| 129 |
ghuddy |
409 |
pkgInfoHash.Add "modified_stamp", (rsTemp.Fields("modified_stamp"))
|
|
|
410 |
pkgInfoHash.Add "modifier", (rsTemp.Fields("modifier"))
|
|
|
411 |
pkgInfoHash.Add "modifier_id", (rsTemp.Fields("modifier_id"))
|
|
|
412 |
pkgInfoHash.Add "modifier_email", (rsTemp.Fields("modifier_email"))
|
| 119 |
ghuddy |
413 |
|
| 129 |
ghuddy |
414 |
pkgInfoHash.Add "created_stamp", (rsTemp.Fields("created_stamp"))
|
|
|
415 |
pkgInfoHash.Add "creator", (rsTemp.Fields("creator"))
|
|
|
416 |
pkgInfoHash.Add "creator_email", (rsTemp.Fields("creator_email"))
|
| 119 |
ghuddy |
417 |
|
| 129 |
ghuddy |
418 |
pkgInfoHash.Add "owner", (rsTemp.Fields("owner"))
|
|
|
419 |
pkgInfoHash.Add "owner_email", (rsTemp.Fields("owner_email"))
|
| 119 |
ghuddy |
420 |
|
| 129 |
ghuddy |
421 |
pkgInfoHash.Add "dlocked", (rsTemp.Fields("dlocked"))
|
|
|
422 |
pkgInfoHash.Add "proj_id", (rsTemp.Fields("proj_id"))
|
|
|
423 |
pkgInfoHash.Add "rtag_id", (rsTemp.Fields("rtag_id"))
|
|
|
424 |
pkgInfoHash.Add "rtag_name", (rsTemp.Fields("rtag_name"))
|
|
|
425 |
pkgInfoHash.Add "pkg_label", (rsTemp.Fields("pkg_label"))
|
|
|
426 |
pkgInfoHash.Add "src_path", (rsTemp.Fields("src_path"))
|
|
|
427 |
pkgInfoHash.Add "pv_description", (rsTemp.Fields("pv_description"))
|
|
|
428 |
pkgInfoHash.Add "last_pv_id", (rsTemp.Fields("last_pv_id"))
|
|
|
429 |
pkgInfoHash.Add "previous_version", (rsTemp.Fields("previous_version"))
|
|
|
430 |
pkgInfoHash.Add "release_notes_info", (rsTemp.Fields("release_notes_info"))
|
| 119 |
ghuddy |
431 |
|
| 129 |
ghuddy |
432 |
pkgInfoHash.Add "is_patch", (rsTemp.Fields("is_patch"))
|
|
|
433 |
pkgInfoHash.Add "is_obsolete", (rsTemp.Fields("is_obsolete"))
|
|
|
434 |
pkgInfoHash.Add "obsolete_comments", (rsTemp.Fields("obsolete_comments"))
|
| 119 |
ghuddy |
435 |
|
| 129 |
ghuddy |
436 |
pkgInfoHash.Add "build_type", (rsTemp.Fields("build_type"))
|
|
|
437 |
pkgInfoHash.Add "change_type", (rsTemp.Fields("change_type"))
|
|
|
438 |
pkgInfoHash.Add "bs_id", (rsTemp.Fields("bs_id"))
|
|
|
439 |
pkgInfoHash.Add "is_deployable", (rsTemp.Fields("is_deployable"))
|
|
|
440 |
pkgInfoHash.Add "sbom_priority", (rsTemp.Fields("sbom_priority"))
|
|
|
441 |
pkgInfoHash.Add "ripple_field", (rsTemp.Fields("ripple_field"))
|
| 119 |
ghuddy |
442 |
|
| 129 |
ghuddy |
443 |
End If
|
| 119 |
ghuddy |
444 |
|
|
|
445 |
|
| 129 |
ghuddy |
446 |
'-- Find if package is editable in this project
|
|
|
447 |
OraDatabase.ExecuteSQL "BEGIN :RETURN_NUMBER := CAN_EDIT_PKG_IN_PROJECT( :PV_ID, :RTAG_ID ); END;"
|
|
|
448 |
pkgInfoHash.Add "can_edit_in_project", CStr( OraDatabase.Parameters("RETURN_NUMBER").Value )
|
| 119 |
ghuddy |
449 |
|
|
|
450 |
|
| 129 |
ghuddy |
451 |
'/* Get Package Release Details */
|
|
|
452 |
Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("PackageReleaseDetails.sql"), cint(0))
|
| 119 |
ghuddy |
453 |
|
|
|
454 |
|
|
|
455 |
|
| 129 |
ghuddy |
456 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
457 |
pkgInfoHash.Item ("base_view_id") = (rsTemp.Fields("base_view_id"))
|
|
|
458 |
pkgInfoHash.Add "insert_stamp", (rsTemp.Fields("insert_stamp"))
|
|
|
459 |
pkgInfoHash.Add "insertor", (rsTemp.Fields("insertor"))
|
|
|
460 |
pkgInfoHash.Add "insertor_email", (rsTemp.Fields("insertor_email"))
|
|
|
461 |
pkgInfoHash.Item ("pkg_state") = (rsTemp.Fields("pkg_state"))
|
|
|
462 |
pkgInfoHash.Item ("deprecated_state") = (rsTemp.Fields("deprecated_state"))
|
|
|
463 |
pkgInfoHash.Item ("product_state") = (rsTemp.Fields("product_state"))
|
| 119 |
ghuddy |
464 |
|
| 129 |
ghuddy |
465 |
'AND (rsTemp("used_count") = 0) _
|
| 119 |
ghuddy |
466 |
|
| 129 |
ghuddy |
467 |
If (pkgInfoHash.Item ("dlocked") = "Y") _
|
|
|
468 |
AND (pkgInfoHash.Item ("build_type") = "M") _
|
|
|
469 |
AND (CDate( FormatDateTime(pkgInfoHash.Item ("modified_stamp"), 2) ) = Date) _
|
|
|
470 |
AND (pkgInfoHash.Item("can_edit_in_project") = "1" ) _
|
|
|
471 |
Then
|
| 119 |
ghuddy |
472 |
|
| 129 |
ghuddy |
473 |
pkgInfoHash.Item ("can_unofficial") = "true"
|
|
|
474 |
End If
|
| 119 |
ghuddy |
475 |
|
| 129 |
ghuddy |
476 |
Else
|
| 119 |
ghuddy |
477 |
|
| 129 |
ghuddy |
478 |
If (CDate( FormatDateTime(pkgInfoHash.Item ("modified_stamp"), 2) ) = Date) Then
|
|
|
479 |
' Must be not older then a day
|
|
|
480 |
If (pkgInfoHash.Item ("dlocked") = "A") OR NOT IsNull(pkgInfoHash.Item("is_patch")) Then
|
|
|
481 |
pkgInfoHash.Item ("can_unofficial") = "true"
|
| 119 |
ghuddy |
482 |
|
| 129 |
ghuddy |
483 |
End If
|
| 119 |
ghuddy |
484 |
|
| 129 |
ghuddy |
485 |
End If
|
| 119 |
ghuddy |
486 |
|
| 129 |
ghuddy |
487 |
End If
|
| 119 |
ghuddy |
488 |
|
|
|
489 |
|
| 129 |
ghuddy |
490 |
'/* Get Patch Parent */
|
|
|
491 |
If pkgInfoHash.Item ("is_patch") = "Y" Then
|
|
|
492 |
Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("PatchParent.sql"), cint(0))
|
| 119 |
ghuddy |
493 |
|
| 129 |
ghuddy |
494 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
495 |
pkgInfoHash.Add "patch_parent_id", (rsTemp.Fields("pv_id"))
|
|
|
496 |
End If
|
|
|
497 |
End If
|
| 119 |
ghuddy |
498 |
|
| 129 |
ghuddy |
499 |
' DEVI-45275 - Check if version is in the planned table and if so get its planned operation type
|
|
|
500 |
' which denotes whether it is an existing version being added to a release, an existing version
|
|
|
501 |
' being removed from a release, or a new version being prepared for a release.
|
|
|
502 |
Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("PlannedPackageVersionDetails.sql"), cint(0))
|
| 119 |
ghuddy |
503 |
|
| 129 |
ghuddy |
504 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
505 |
pkgInfoHash.Add "planned_operation", (rsTemp.Fields("operation"))
|
|
|
506 |
Else
|
|
|
507 |
pkgInfoHash.Add "planned_operation", " "
|
|
|
508 |
End If
|
| 119 |
ghuddy |
509 |
|
| 129 |
ghuddy |
510 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
511 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
512 |
OraDatabase.Parameters.Remove "RETURN_NUMBER"
|
| 119 |
ghuddy |
513 |
|
|
|
514 |
|
| 1339 |
dpurdie |
515 |
On Error Resume Next
|
| 183 |
brianf |
516 |
' check if package is released
|
| 185 |
brianf |
517 |
If (NNrtag = "") or (IsNull(NNrtag)) Then
|
| 183 |
brianf |
518 |
pkgInfoHash.Add "is_released", False
|
|
|
519 |
Else
|
|
|
520 |
Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT rc.pv_id FROM release_content rc WHERE rc.rtag_id = " & NNrtag & " AND rc.pv_id = " & SSpv_id, cint(0))
|
|
|
521 |
pkgInfoHash.Add "is_released", rsTemp.RecordCount <> 0
|
|
|
522 |
End If
|
|
|
523 |
|
|
|
524 |
pkgInfoHash.Add "is_excluded", False
|
|
|
525 |
pkgInfoHash.Add "has_build_failure", False
|
|
|
526 |
' check if package is excluded from build
|
| 185 |
brianf |
527 |
If Not ((NNrtag = "") or (IsNull(NNrtag))) Then
|
| 183 |
brianf |
528 |
Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT dnr.pv_id,dnr.root_file FROM do_not_ripple dnr WHERE dnr.rtag_id = " & NNrtag & " AND dnr.pv_id = " & SSpv_id, cint(0))
|
|
|
529 |
If rsTemp.RecordCount <> 0 Then
|
|
|
530 |
pkgInfoHash("is_excluded") = True
|
|
|
531 |
pkgInfoHash("has_build_failure") = Not IsNull(rsTemp("root_file"))
|
|
|
532 |
End If
|
|
|
533 |
End If
|
|
|
534 |
|
| 129 |
ghuddy |
535 |
rsTemp.Close
|
|
|
536 |
Set rsTemp = nothing
|
| 183 |
brianf |
537 |
|
|
|
538 |
|
| 119 |
ghuddy |
539 |
End Sub
|
|
|
540 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
541 |
Sub Get_Pkg_Short_Info( SSparPv_id, SSpkgID, SSpkgName, SSpkgVersion, SSsrc_path, SSpkgDesc, BBdlocked )
|
| 129 |
ghuddy |
542 |
Dim rsTemp, Query_String
|
|
|
543 |
If IsEmpty(SSparPv_id) Then Exit Sub
|
| 119 |
ghuddy |
544 |
|
| 129 |
ghuddy |
545 |
Query_String = _
|
|
|
546 |
" SELECT pkg.pkg_id, pkg.pkg_name, pv.pkg_version, pv.src_path, pv.pv_description, pv.dlocked"&_
|
|
|
547 |
" FROM packages pkg, package_versions pv"&_
|
|
|
548 |
" WHERE pkg.pkg_id = pv.pkg_id AND pv.pv_id ="& SSparPv_id
|
| 119 |
ghuddy |
549 |
|
| 129 |
ghuddy |
550 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
551 |
|
| 129 |
ghuddy |
552 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
553 |
SSpkgID = rsTemp.Fields("pkg_id")
|
|
|
554 |
SSpkgName = rsTemp.Fields("pkg_name")
|
|
|
555 |
SSpkgVersion = rsTemp.Fields("pkg_version")
|
|
|
556 |
SSsrc_path = rsTemp.Fields("src_path")
|
|
|
557 |
SSpkgDesc = rsTemp.Fields("pv_description")
|
|
|
558 |
BBdlocked = rsTemp.Fields("dlocked")
|
|
|
559 |
End If
|
| 119 |
ghuddy |
560 |
|
| 129 |
ghuddy |
561 |
rsTemp.Close
|
|
|
562 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
563 |
End Sub
|
|
|
564 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
565 |
Private Function IsDomainAuthOK( SSusername, SSpassword, SSdomainName )
|
| 129 |
ghuddy |
566 |
Dim objLoginAuth, return, tempSTR
|
|
|
567 |
'Set objWSH = Server.CreateObject("WScript.Shell")
|
|
|
568 |
'On Error Resume Next
|
|
|
569 |
'return = -1
|
|
|
570 |
'return = objWSH.Run("cmd.exe /c perl "& rootPath &"\common\domainauth.pl """&_
|
|
|
571 |
' SSdomainName &""" """& SSusername &""" """& SSpassword &""" "&_
|
|
|
572 |
' "> "& rootPath &"\temp\"& SSusername &".txt", 0, true)
|
| 119 |
ghuddy |
573 |
|
| 129 |
ghuddy |
574 |
Set objLoginAuth = Server.CreateObject("LoginAdmin.ImpersonateUser")
|
| 119 |
ghuddy |
575 |
|
| 129 |
ghuddy |
576 |
return = -1
|
|
|
577 |
return = objLoginAuth.AuthenticateUser ( SSusername, SSpassword, SSdomainName )
|
| 119 |
ghuddy |
578 |
|
| 129 |
ghuddy |
579 |
'Response.write "LOGIN"& SSusername &"-"& SSpassword &"-"& SSdomainName &"-"& return
|
| 119 |
ghuddy |
580 |
|
| 129 |
ghuddy |
581 |
If (return = 0) OR (return = 1385) Then
|
|
|
582 |
' From MSDN System Error Codes
|
|
|
583 |
' 0 - The operation completed successfully.
|
|
|
584 |
' 1326 - Logon failure: unknown user name or bad password.
|
|
|
585 |
' 1385 - Logon failure: the user has not been granted the requested logon type at this computer.
|
|
|
586 |
' 1909 - The referenced account is currently locked out and may not be used to log on.
|
| 119 |
ghuddy |
587 |
|
| 129 |
ghuddy |
588 |
'Login ok
|
|
|
589 |
IsDomainAuthOK = True
|
|
|
590 |
Else
|
|
|
591 |
IsDomainAuthOK = False
|
|
|
592 |
End If
|
| 119 |
ghuddy |
593 |
|
| 129 |
ghuddy |
594 |
Set objLoginAuth = Nothing
|
| 119 |
ghuddy |
595 |
End Function
|
|
|
596 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
597 |
Function ReadUserPreferences ( SSitem )
|
| 129 |
ghuddy |
598 |
'ReadUserPreferences = Request.Cookies("RELEASEMANAGER_USER_PREFERENCES")( SSitem )
|
|
|
599 |
ReadUserPreferences = "0"
|
| 119 |
ghuddy |
600 |
End Function
|
|
|
601 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
602 |
Function Requred_Parameters_String ( SScurrent, SSstr )
|
| 129 |
ghuddy |
603 |
'returns "&par1=val1&&parn=valn&" must use & as it will not be used on parameter name or value
|
|
|
604 |
Dim tempARR, parameter, tempSTR
|
|
|
605 |
tempARR = Split( SSstr, "," )
|
|
|
606 |
tempSTR = SScurrent
|
| 119 |
ghuddy |
607 |
|
| 129 |
ghuddy |
608 |
For Each parameter In tempARR
|
|
|
609 |
tempSTR = tempSTR &"&"& parameter &"="& QStrPar( parameter ) &"&"
|
|
|
610 |
Next
|
| 119 |
ghuddy |
611 |
|
| 129 |
ghuddy |
612 |
Requred_Parameters_String = tempSTR
|
| 119 |
ghuddy |
613 |
End Function
|
|
|
614 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
615 |
Function Quick_Help ( SStipname )
|
| 129 |
ghuddy |
616 |
Quick_Help = "<a href='javascript:;' onMouseOver=""formTips.show('"& SStipname &"')"" onMouseOut=""formTips.hide()""><img src='images/i_help.gif' width='12' height='12' hspace='2' align='absmiddle' border='0' ></a>"
|
| 119 |
ghuddy |
617 |
End Function
|
|
|
618 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
619 |
Function LogError ( SSlog, SSstr )
|
| 129 |
ghuddy |
620 |
'|errstr1||errstr2||errstr3|...
|
|
|
621 |
LogError = SSlog &"|"& SSstr &"|"
|
| 119 |
ghuddy |
622 |
End Function
|
|
|
623 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
624 |
Sub Send_Email ( SSfromName, SSfrom, SSto, SSsubject, SSbody, oAttachments )
|
| 129 |
ghuddy |
625 |
Dim Mail, Keys, Key, canSend
|
| 3900 |
dpurdie |
626 |
'Response.write "<pre>Send_Email:" & SSfromName & " : "& SSfrom &" : "& SSto &" : "& SSsubject &" : "& SSbody
|
| 119 |
ghuddy |
627 |
|
| 129 |
ghuddy |
628 |
canSend = FALSE
|
|
|
629 |
Set Mail = Server.CreateObject("Persits.MailSender")
|
| 3900 |
dpurdie |
630 |
Mail.Host = MAIL_SERVER
|
| 129 |
ghuddy |
631 |
Mail.From = SSfrom
|
|
|
632 |
Mail.FromName = SSfromName
|
| 119 |
ghuddy |
633 |
|
| 129 |
ghuddy |
634 |
' Send TO:
|
|
|
635 |
If IsObject( SSto ) Then
|
|
|
636 |
Keys = SSto.Keys
|
|
|
637 |
For Each Key In Keys
|
|
|
638 |
Mail.AddAddress Key, SSto.Item( Key )
|
|
|
639 |
Next
|
| 119 |
ghuddy |
640 |
|
| 129 |
ghuddy |
641 |
If SSto.Count > 0 Then canSend = TRUE
|
|
|
642 |
Else
|
| 119 |
ghuddy |
643 |
|
| 129 |
ghuddy |
644 |
Mail.AddAddress SSto
|
|
|
645 |
If SSto <> "" Then canSend = TRUE
|
|
|
646 |
End If
|
| 119 |
ghuddy |
647 |
|
| 129 |
ghuddy |
648 |
Mail.Subject = SSsubject
|
|
|
649 |
Mail.IsHTML = True
|
|
|
650 |
Mail.Body = SSbody
|
| 119 |
ghuddy |
651 |
|
| 129 |
ghuddy |
652 |
' Add Attachments DDDDDDD Sash, It appears as if AddEmbededImage is premium functionality that costs money, can we just do a normal add attachment?
|
| 3900 |
dpurdie |
653 |
If IsObject( oAttachments ) Then
|
|
|
654 |
Keys = oAttachments.Keys
|
|
|
655 |
For Each Key In Keys
|
| 129 |
ghuddy |
656 |
' Mail.AddEmbeddedImage rootPath & Key, oAttachments.Item( Key )
|
| 3900 |
dpurdie |
657 |
Mail.AddAttachment oAttachments.Item( Key )
|
|
|
658 |
Next
|
|
|
659 |
Else
|
|
|
660 |
Mail.AddAttachment oAttachments
|
|
|
661 |
End If
|
| 119 |
ghuddy |
662 |
|
| 129 |
ghuddy |
663 |
On Error Resume Next
|
|
|
664 |
If canSend Then Mail.Send ' send message
|
| 119 |
ghuddy |
665 |
|
|
|
666 |
End Sub
|
|
|
667 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
668 |
Sub Iterate_UP_the_tree ( NNrtag_id, HHstart_with, HHresult )
|
| 129 |
ghuddy |
669 |
Dim rsTemp, Query_String
|
|
|
670 |
Dim seekPKGs, seekNOTpkgs
|
| 119 |
ghuddy |
671 |
|
| 129 |
ghuddy |
672 |
seekPKGs = Join(HHstart_with.Keys, ",")
|
|
|
673 |
If seekPKGs = "" Then seekPKGs = "-1"
|
|
|
674 |
seekNOTpkgs = "-1"
|
| 119 |
ghuddy |
675 |
|
| 129 |
ghuddy |
676 |
Do While seekPKGs <> "-1"
|
|
|
677 |
Query_String = _
|
|
|
678 |
" SELECT DISTINCT dep.pkg_id"&_
|
|
|
679 |
" FROM package_dependencies dep, release_content rel"&_
|
|
|
680 |
" WHERE rel.pv_id = dep.pv_id"&_
|
|
|
681 |
" AND rel.rtag_id = "& NNrtag_id &_
|
|
|
682 |
" AND dpkg_id IN ( "& seekPKGs &" ) "&_
|
|
|
683 |
" AND pkg_id NOT IN ( "& seekNOTpkgs &" )"
|
|
|
684 |
'" AND dep.dpv_id NOT IN ( SELECT iw.iw_id FROM ignore_warnings iw WHERE iw.rtag_id = "& NNrtag_id &" )"
|
|
|
685 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
686 |
|
| 129 |
ghuddy |
687 |
If rsTemp.RecordCount < 1 Then Exit Do
|
| 119 |
ghuddy |
688 |
|
| 129 |
ghuddy |
689 |
seekPKGs = "-1"
|
|
|
690 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
691 |
If NOT HHresult.Exists(Cstr(rsTemp.Fields("pkg_id"))) Then HHresult.Add Cstr(rsTemp.Fields("pkg_id")), ""
|
|
|
692 |
seekPKGs = seekPKGs &","& rsTemp.Fields("pkg_id")
|
|
|
693 |
rsTemp.MoveNext
|
|
|
694 |
WEnd
|
| 119 |
ghuddy |
695 |
|
| 129 |
ghuddy |
696 |
seekNOTpkgs = seekNOTpkgs &","& seekPKGs
|
|
|
697 |
Loop
|
| 119 |
ghuddy |
698 |
|
|
|
699 |
End Sub
|
|
|
700 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 129 |
ghuddy |
701 |
Sub Iterate_DOWN_the_tree ( NNrtag_id, HHstart_with, HHresult )
|
|
|
702 |
Dim rsTemp, Query_String
|
|
|
703 |
Dim seekPKGs, seekNOTpkgs
|
| 119 |
ghuddy |
704 |
|
| 129 |
ghuddy |
705 |
seekPKGs = Join(HHstart_with.Keys, ",")
|
|
|
706 |
If seekPKGs = "" Then seekPKGs = "-1"
|
|
|
707 |
seekNOTpkgs = "-1"
|
| 119 |
ghuddy |
708 |
|
| 129 |
ghuddy |
709 |
Do While seekPKGs <> "-1"
|
|
|
710 |
Query_String = _
|
|
|
711 |
" SELECT DISTINCT dep.dpkg_id"&_
|
|
|
712 |
" FROM package_dependencies dep, release_content rel"&_
|
|
|
713 |
" WHERE rel.pv_id = dep.pv_id"&_
|
|
|
714 |
" AND rel.rtag_id = "& NNrtag_id &_
|
|
|
715 |
" AND pkg_id IN ( "& seekPKGs &" ) "&_
|
|
|
716 |
" AND dpkg_id NOT IN ( "& seekNOTpkgs &" )"
|
|
|
717 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
718 |
|
| 129 |
ghuddy |
719 |
If rsTemp.RecordCount < 1 Then Exit Do
|
| 119 |
ghuddy |
720 |
|
| 129 |
ghuddy |
721 |
seekPKGs = "-1"
|
|
|
722 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
|
|
723 |
If NOT HHresult.Exists(Cstr(rsTemp.Fields("dpkg_id"))) Then HHresult.Add Cstr(rsTemp.Fields("dpkg_id")), ""
|
|
|
724 |
seekPKGs = seekPKGs &","& rsTemp.Fields("dpkg_id")
|
|
|
725 |
rsTemp.MoveNext
|
|
|
726 |
WEnd
|
| 119 |
ghuddy |
727 |
|
| 129 |
ghuddy |
728 |
seekNOTpkgs = seekNOTpkgs &","& seekPKGs
|
|
|
729 |
Loop
|
| 119 |
ghuddy |
730 |
|
|
|
731 |
End Sub
|
|
|
732 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
733 |
Class TempSession
|
| 129 |
ghuddy |
734 |
Function Value ()
|
|
|
735 |
Value = Session("RELEASEMANAGER_temp")
|
|
|
736 |
End Function
|
| 119 |
ghuddy |
737 |
|
| 129 |
ghuddy |
738 |
Sub Add ( SSstr )
|
|
|
739 |
Session("RELEASEMANAGER_temp") = Session("RELEASEMANAGER_temp") & SSstr
|
|
|
740 |
End Sub
|
| 119 |
ghuddy |
741 |
|
| 129 |
ghuddy |
742 |
Sub Clean ()
|
|
|
743 |
Session("RELEASEMANAGER_temp") = NULL
|
|
|
744 |
End Sub
|
| 119 |
ghuddy |
745 |
End Class
|
|
|
746 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
747 |
Sub DisplayInfo ( SSmsg, SSwidth )
|
| 129 |
ghuddy |
748 |
Dim msg
|
|
|
749 |
If SSmsg = "" Then Exit Sub
|
| 119 |
ghuddy |
750 |
|
| 129 |
ghuddy |
751 |
Select Case UCase( SSmsg )
|
|
|
752 |
Case "ISSUES_IMPORTED"
|
|
|
753 |
msg = "Import is complete. <br>Click on Close button if you are finished."
|
|
|
754 |
Case "MAKE_OFFICIAL_WARNING"
|
|
|
755 |
msg = "Note that making a package official will prevent any further change to it."
|
|
|
756 |
Case "APPLY_LABEL_TO_ALL_WARNING"
|
|
|
757 |
msg = "This will overwrite any existing labels on selected packages."
|
|
|
758 |
Case "BLANK_LABEL_WARNING"
|
|
|
759 |
msg = "Some dependencies in the export list above, do not have a label!"
|
|
|
760 |
Case "PERSONAL_VIEW_NOT_SETUP"
|
|
|
761 |
msg = "<span class='err_alert'><b>Your View is not setup!</b></span><span class='sublbox_txt'><br><br>Either set your view using My Account > Views menu<br><br>OR<br><br>switch to Base view (Full view) by clicking on <img src='images/abtn_personal_view.gif' width='25' height='25' border='0'> icon above.</span>"
|
|
|
762 |
Case "EMPTY_RELEASE_CONTENTS"
|
|
|
763 |
msg = "<span class='err_alert'><b>Release content is empty!</b></span><span class='sublbox_txt'><br><br>Use + button to add packages to a release.</span>"
|
|
|
764 |
Case "PKG_NAME_REQUIRED"
|
|
|
765 |
msg = "<span class='err_alert'><b>Package Name required!</b></span><span class='sublbox_txt'><br>You are required to select at least one package name.</span>"
|
|
|
766 |
Case "ADD_PATCH_WARNING"
|
|
|
767 |
msg = "Note that patches cannot be used in your build dependencies."
|
|
|
768 |
Case "NEW_PATCH_AVAILABLE"
|
|
|
769 |
msg = "<b>New Patch is Required</b><br>One or more Build Dependencies have been patched.<br>Please click Add button to create patch for this package."
|
| 119 |
ghuddy |
770 |
|
| 129 |
ghuddy |
771 |
Case "GENERATE_RELEASE_NOTES"
|
| 167 |
brianf |
772 |
msg = "<a href='_generate_release_notes.asp?rfile=&pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked'>Click here</a> to generate full release notes."
|
| 129 |
ghuddy |
773 |
Case "NOT_FOUND_IN_PKG_ARCHIVE_RELEASE_NOTES"
|
| 3866 |
dpurdie |
774 |
msg = "<b>This package is not found in dpkg_archive!</b><br>Release notes are not generated.<br><a href='_generate_release_notes.asp?rfile="& scriptName &"&pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked'>Click here</a> to try again."
|
| 129 |
ghuddy |
775 |
Case "FAILED_GENERATING_RELEASE_NOTES"
|
|
|
776 |
msg = "<span class='err_alert'><b>Failed generating release notes!</b></span><br>Please contact the <a href='mailto:"& adminEmail&"' class='txt_linked'>Administrator</a>"
|
|
|
777 |
Case "GENERATING_RELEASE_NOTES"
|
|
|
778 |
msg = "<b>Generating release notes...</b><br>It may take a minute. Please try refreshing this page a bit later."
|
|
|
779 |
Case "NO_PREVIOUS_VERSION_RELEASE_NOTES"
|
|
|
780 |
msg = "<b>Previous Version is Unknown</b>!<br>Please specify previous version by clicking on 'Show Details...' above.<br>Release notes are not generated."
|
| 119 |
ghuddy |
781 |
|
| 129 |
ghuddy |
782 |
Case "PACKAGE_FOUND_IN_OTHER_LOCATIONS"
|
|
|
783 |
msg = "This package is also found in other locations."
|
|
|
784 |
Case "DOC_NUMBER_NOTFOUND"
|
|
|
785 |
msg = "<span class='err_alert'>Document number "& Request("doc_num") &" does not correspond to any document!</span>"
|
|
|
786 |
Case "DOC_NUMBER_FOUND"
|
|
|
787 |
msg = "Document found. Click "Import" to link the document."
|
|
|
788 |
Case "UNIT_TEST_NOT_DONE"
|
|
|
789 |
msg = "<b>Unit test is Not Done!</b><br><a href='javascript:;' onClick=""MM_openBrWindow('_wform_reason_for_unit_test_not_done.asp?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") &"','ReasonForNotDone','resizable=yes,width=400,height=250')"" class='txt_linked'>Click here</a> to supply/edit reason."
|
|
|
790 |
Case "PACKAGE_NOT_PART_OF_RELEASE"
|
|
|
791 |
msg = "<b>Package is Not Part of This Release Anymore!</b><br>This package cannot be found in the list on the left-hand side.<br>You can use 'lookup:' on the left-hand side to find the package inside this release. "
|
| 119 |
ghuddy |
792 |
|
| 129 |
ghuddy |
793 |
Case "NOT_FOUND_IN_PKG_ARCHIVE_FILE_GENERATE"
|
| 3866 |
dpurdie |
794 |
msg = "<b>This package is not found in dpkg_archive!</b><br>Files and folders are not captured.<br><a href='_generate_files_and_folders.asp?rfile="& scriptName &"&pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked' onClick=""ProgressBar.style.visibility='visible';"">Click here</a> to try again."
|
| 129 |
ghuddy |
795 |
Case "GENERATE_FILES_AND_FOLDERS"
|
|
|
796 |
msg = "<b>Files and folders not found.</b><br><a href='_generate_files_and_folders.asp?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") &"' class='txt_linked' onClick=""ProgressBar.style.visibility='visible';"">Click here</a> to try capture them."
|
|
|
797 |
Case "NO_PRODUCT_FILES_CAPTURED"
|
|
|
798 |
msg = "<b>Files and Folders not found for this product!</b><br>Capture of product components can only be done during the build time."
|
| 119 |
ghuddy |
799 |
|
| 129 |
ghuddy |
800 |
Case "MASS REF REFERENCE"
|
|
|
801 |
msg = "<span class='err_alert'><b>New Version can only be created in the Release's associated MASS REF: <a href=""dependencies.asp?pv_id="& pkgInfoHash.Item("pv_id") &"&rtag_id="& AssocMASSREFValue &""">"& pkgInfoHash.Item("pkg_name") &" "& pkgInfoHash.Item("pkg_version") &"</a></b></span>"
|
| 119 |
ghuddy |
802 |
|
| 129 |
ghuddy |
803 |
Case "REPEAT_SCHEDULE_NOT_SELECTED"
|
|
|
804 |
msg = "<span class='err_alert'><b>YOU MUST SELECT A VALUE FOR REPEAT SCHEDULED DOWNTIME</b></span>"
|
| 119 |
ghuddy |
805 |
|
| 129 |
ghuddy |
806 |
Case "PKG_NAME_INVALID"
|
|
|
807 |
msg = "<span class='err_alert'><b>Package Name Invalid!</b></span><span class='sublbox_txt'><br>This package name is invalid. Package names must only consist of alpha-numeric characters, underscores and dashes (A-Z 0-9 _ -), and cannot include spaces or any other symbols.</span>"
|
| 119 |
ghuddy |
808 |
|
| 129 |
ghuddy |
809 |
Case "PKG_NAME_EXISTS"
|
|
|
810 |
msg = "<span class='err_alert'><b>Package Name Already Exists!</b></span><span class='sublbox_txt'><br>This package name already exists, please try again.</span>"
|
| 119 |
ghuddy |
811 |
|
| 129 |
ghuddy |
812 |
End Select
|
| 119 |
ghuddy |
813 |
%>
|
|
|
814 |
<table width="<%=SSwidth%>" border="0" cellspacing="0" cellpadding="1">
|
|
|
815 |
<tr>
|
|
|
816 |
<td background="images/bg_bage_dark.gif">
|
| 129 |
ghuddy |
817 |
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
| 119 |
ghuddy |
818 |
<tr>
|
|
|
819 |
<td width="1%" valign="top" background="images/bg_help.gif"><img src="images/i_qhelp.gif" width="16" height="16"></td>
|
|
|
820 |
<td width="100%" background="images/bg_help.gif" class="form_txt"><%=msg%></td>
|
|
|
821 |
</tr>
|
|
|
822 |
</table></td>
|
|
|
823 |
</tr>
|
|
|
824 |
</table>
|
|
|
825 |
<br>
|
|
|
826 |
<%
|
|
|
827 |
|
|
|
828 |
End Sub
|
|
|
829 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
830 |
Sub Messenger ( sMessage, nMessageType, sWidth )
|
| 129 |
ghuddy |
831 |
Dim msgTemplate, Img
|
| 119 |
ghuddy |
832 |
|
| 129 |
ghuddy |
833 |
If (sMessage = "") OR IsNull(sMessage) Then Exit Sub
|
| 119 |
ghuddy |
834 |
|
| 129 |
ghuddy |
835 |
Select Case CStr(nMessageType)
|
|
|
836 |
Case "1"
|
|
|
837 |
Img = "s_critical.gif"
|
|
|
838 |
Case "2"
|
|
|
839 |
Img = "s_warning.gif"
|
|
|
840 |
Case "3"
|
|
|
841 |
Img = "s_note.gif"
|
|
|
842 |
Case Else
|
|
|
843 |
Img = nMessageType
|
|
|
844 |
End Select
|
| 119 |
ghuddy |
845 |
|
|
|
846 |
|
| 129 |
ghuddy |
847 |
msgTemplate = ReadFile( APP_ROOT &"\scripts\message_style.html" )
|
|
|
848 |
msgTemplate = Replace( msgTemplate, "%WIDTH%", sWidth )
|
|
|
849 |
msgTemplate = Replace( msgTemplate, "%IMAGE%", Img )
|
|
|
850 |
msgTemplate = Replace( msgTemplate, "%MESSAGE%", sMessage )
|
| 119 |
ghuddy |
851 |
|
| 129 |
ghuddy |
852 |
Response.write msgTemplate
|
| 119 |
ghuddy |
853 |
End Sub
|
|
|
854 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 129 |
ghuddy |
855 |
Function Default_Label ( SSpv_id, SSbuild_type, SSpkg_name, SSpkg_version, SSv_ext )
|
| 3873 |
dpurdie |
856 |
If SSbuild_type = "A" Then
|
|
|
857 |
Default_Label = UCase(SSpkg_name & "." & SSpv_id & SSv_ext & ".WIP")
|
|
|
858 |
Else
|
|
|
859 |
Default_Label = SSpkg_name &"_"& SSpkg_version
|
|
|
860 |
End If
|
| 119 |
ghuddy |
861 |
End Function
|
|
|
862 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
863 |
Function Format_Version ( SSpkg_version, SSv_ext )
|
| 129 |
ghuddy |
864 |
Dim tempArr, tempVersion, patchArr, seg, myVersion
|
|
|
865 |
myVersion = SSpkg_version
|
| 119 |
ghuddy |
866 |
|
| 129 |
ghuddy |
867 |
If NOT IsNull(SSv_ext) Then
|
|
|
868 |
myVersion = Left ( myVersion, Len(myVersion) - Len(SSv_ext) )
|
|
|
869 |
End If
|
| 119 |
ghuddy |
870 |
|
| 129 |
ghuddy |
871 |
tempArr = Split (myVersion, ".")
|
|
|
872 |
For Each seg In tempArr
|
|
|
873 |
If Len(seg) < 2 Then
|
|
|
874 |
' single digit number
|
|
|
875 |
tempVersion = tempVersion &"0"& seg
|
| 119 |
ghuddy |
876 |
|
| 129 |
ghuddy |
877 |
Else
|
|
|
878 |
seg = Replace(seg, "_", "-") ' make sure that there is no _ in segment
|
|
|
879 |
If InStr( seg, "-" ) > 0 Then
|
|
|
880 |
' patch version supplied
|
|
|
881 |
patchArr = Split(seg, "-")
|
|
|
882 |
If Len(patchArr(0)) < 2 Then
|
|
|
883 |
' single digit number
|
|
|
884 |
tempVersion = tempVersion &"0"& patchArr(0) &"_0"& patchArr(1)
|
|
|
885 |
Else
|
|
|
886 |
' double digit number
|
|
|
887 |
tempVersion = tempVersion & patchArr(0) &"_0"& patchArr(1)
|
|
|
888 |
End If
|
| 119 |
ghuddy |
889 |
|
| 129 |
ghuddy |
890 |
Else
|
|
|
891 |
' double digit no patch
|
|
|
892 |
tempVersion = tempVersion & seg
|
|
|
893 |
End If
|
| 119 |
ghuddy |
894 |
|
| 129 |
ghuddy |
895 |
End If
|
| 119 |
ghuddy |
896 |
|
| 129 |
ghuddy |
897 |
Next
|
| 119 |
ghuddy |
898 |
|
| 129 |
ghuddy |
899 |
Format_Version = tempVersion
|
| 119 |
ghuddy |
900 |
End Function
|
|
|
901 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
902 |
Function DefineStateIcon ( NNpkg_state, CCdlocked, sIgnoreWarnings, cIsPatchIgnore, cBuildType, bForEnvironment )
|
|
|
903 |
|
| 129 |
ghuddy |
904 |
If NOT IsNull(sIgnoreWarnings) Then
|
|
|
905 |
'-- Ignore Warning is on
|
|
|
906 |
If IsNull(cIsPatchIgnore) Then
|
|
|
907 |
DefineStateIcon = enum_imgIgnoring
|
|
|
908 |
Else
|
|
|
909 |
DefineStateIcon = enum_imgPatchIgnoring
|
|
|
910 |
End If
|
| 119 |
ghuddy |
911 |
|
| 129 |
ghuddy |
912 |
Else
|
|
|
913 |
Select Case CInt( NNpkg_state )
|
|
|
914 |
Case enumPKG_STATE_OK
|
| 183 |
brianf |
915 |
If (CCdlocked = "N") OR (CCdlocked = "R") Then
|
| 129 |
ghuddy |
916 |
DefineStateIcon = enum_imgBuilding
|
| 183 |
brianf |
917 |
ElseIf (CCdlocked = "P") Then
|
|
|
918 |
DefineStateIcon = enum_imgPending
|
| 129 |
ghuddy |
919 |
Else
|
|
|
920 |
DefineStateIcon = enum_imgBlank
|
|
|
921 |
End If
|
| 119 |
ghuddy |
922 |
|
| 129 |
ghuddy |
923 |
Case enumPKG_STATE_MAJOR
|
|
|
924 |
DefineStateIcon = enum_imgCritical
|
| 119 |
ghuddy |
925 |
|
| 129 |
ghuddy |
926 |
Case enumPKG_STATE_MINOR
|
|
|
927 |
DefineStateIcon = enum_imgWarning
|
| 119 |
ghuddy |
928 |
|
| 129 |
ghuddy |
929 |
Case enumPKG_STATE_MAJOR_READY
|
|
|
930 |
DefineStateIcon = enum_imgCReady
|
| 119 |
ghuddy |
931 |
|
| 129 |
ghuddy |
932 |
Case enumPKG_STATE_MINOR_READY
|
|
|
933 |
DefineStateIcon = enum_imgWReady
|
| 119 |
ghuddy |
934 |
|
| 129 |
ghuddy |
935 |
Case enumPKG_NOT_FOUND
|
|
|
936 |
DefineStateIcon = enum_imgNotFound
|
| 119 |
ghuddy |
937 |
|
| 129 |
ghuddy |
938 |
Case enumPKG_STATE_NEW_PATCH
|
|
|
939 |
DefineStateIcon = enum_imgPatchAvailable
|
| 119 |
ghuddy |
940 |
|
| 129 |
ghuddy |
941 |
Case enumPKG_STATE_DEPRECATED
|
|
|
942 |
DefineStateIcon = enum_imgDeprecated
|
| 119 |
ghuddy |
943 |
|
| 129 |
ghuddy |
944 |
Case enumPKG_STATE_DEPRECATED_DEPENDENT
|
|
|
945 |
DefineStateIcon = enum_imgDeprecatedDependent
|
| 119 |
ghuddy |
946 |
|
| 129 |
ghuddy |
947 |
Case enumPKG_ADVISORY_RIPPLE
|
|
|
948 |
DefineStateIcon = enum_imgAR
|
| 119 |
ghuddy |
949 |
|
| 129 |
ghuddy |
950 |
Case enumPKG_ADVISORY_RIPPLE_DEPENDENT
|
|
|
951 |
DefineStateIcon = enum_imgARD
|
| 119 |
ghuddy |
952 |
|
| 131 |
ghuddy |
953 |
Case enumPKG_PEGGED_VERSION
|
|
|
954 |
DefineStateIcon = enum_imgGreenPin
|
| 129 |
ghuddy |
955 |
End Select
|
| 119 |
ghuddy |
956 |
|
| 129 |
ghuddy |
957 |
If (NOT bForEnvironment) AND _
|
|
|
958 |
(cBuildType = "A") AND _
|
|
|
959 |
(CCdlocked <> "Y") AND _
|
|
|
960 |
(DefineStateIcon <> enum_imgBlank) AND _
|
|
|
961 |
(DefineStateIcon <> enum_imgBuilding) AND _
|
|
|
962 |
(DefineStateIcon <> enum_imgNotFound) OR _
|
|
|
963 |
( Request("rtag_id") = "" AND Request("FRrtag_id") = "") _
|
|
|
964 |
Then
|
| 119 |
ghuddy |
965 |
|
| 129 |
ghuddy |
966 |
DefineStateIcon = ""
|
| 119 |
ghuddy |
967 |
|
| 129 |
ghuddy |
968 |
End If
|
| 119 |
ghuddy |
969 |
|
|
|
970 |
|
| 129 |
ghuddy |
971 |
End If
|
| 119 |
ghuddy |
972 |
|
|
|
973 |
|
|
|
974 |
End Function
|
|
|
975 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
976 |
Function DefineStateSmallIcon ( NNpkg_state, CCdlocked )
|
| 129 |
ghuddy |
977 |
Select Case CInt( NNpkg_state )
|
|
|
978 |
Case enumPKG_STATE_OK
|
|
|
979 |
If CCdlocked = "N" Then
|
|
|
980 |
DefineStateSmallIcon = enum_SMALL_imgBuilding
|
|
|
981 |
Else
|
|
|
982 |
DefineStateSmallIcon = enum_SMALL_imgOK
|
|
|
983 |
End If
|
| 119 |
ghuddy |
984 |
|
| 129 |
ghuddy |
985 |
Case enumPKG_STATE_MAJOR
|
|
|
986 |
DefineStateSmallIcon = enum_SMALL_imgCritical
|
| 119 |
ghuddy |
987 |
|
| 129 |
ghuddy |
988 |
Case enumPKG_STATE_MINOR
|
|
|
989 |
DefineStateSmallIcon = enum_SMALL_imgWarning
|
| 119 |
ghuddy |
990 |
|
| 129 |
ghuddy |
991 |
Case enumPKG_STATE_MAJOR_READY
|
|
|
992 |
DefineStateSmallIcon = enum_SMALL_imgCReady
|
| 119 |
ghuddy |
993 |
|
| 129 |
ghuddy |
994 |
Case enumPKG_STATE_MINOR_READY
|
|
|
995 |
DefineStateSmallIcon = enum_SMALL_imgWReady
|
| 119 |
ghuddy |
996 |
|
| 129 |
ghuddy |
997 |
End Select
|
| 119 |
ghuddy |
998 |
End Function
|
|
|
999 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1000 |
Function PatchIcon ( cIsPatch, cIsPatchObsolete )
|
| 129 |
ghuddy |
1001 |
If IsNull(cIsPatch) Then
|
|
|
1002 |
PatchIcon = "<img src='images/rex_images/ext_blank.gif' width='16' height='16' border='0' align='absmiddle'>"
|
|
|
1003 |
Else
|
|
|
1004 |
If IsNull(cIsPatchObsolete) Then
|
|
|
1005 |
PatchIcon = "<img src='images/i_patch_small.gif' width='16' height='16' border='0' align='absmiddle' >"
|
|
|
1006 |
Else
|
|
|
1007 |
PatchIcon = "<img src='images/i_patch_small_obsolete.gif' width='16' height='16' border='0' align='absmiddle' title='Patch is obsolete'>"
|
|
|
1008 |
End If
|
|
|
1009 |
End If
|
| 119 |
ghuddy |
1010 |
End Function
|
|
|
1011 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1012 |
' Function that returns true of false if the item exists in the array
|
|
|
1013 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1014 |
Function inArray(item, aItems)
|
| 129 |
ghuddy |
1015 |
Dim element
|
|
|
1016 |
inArray = false
|
|
|
1017 |
for each element in aItems
|
|
|
1018 |
If element = item Then
|
|
|
1019 |
inArray=true
|
|
|
1020 |
End If
|
|
|
1021 |
next
|
| 119 |
ghuddy |
1022 |
End Function
|
|
|
1023 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1024 |
Function ProgressBar ()
|
| 129 |
ghuddy |
1025 |
ProgressBar = "<DIV name='divProgressBar' id='divProgressBar' style='visibility:hidden;'><img src='icons/i_processing.gif' width='79' height='14'></DIV>"
|
| 119 |
ghuddy |
1026 |
End Function
|
|
|
1027 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1028 |
Function GetCurrentParameters( nProjId, nRtagId, nPvId )
|
| 129 |
ghuddy |
1029 |
Dim rsQry,query
|
| 119 |
ghuddy |
1030 |
|
| 129 |
ghuddy |
1031 |
' Set defaults
|
|
|
1032 |
nProjId = -1
|
|
|
1033 |
nRtagId = -1
|
|
|
1034 |
nPvId = -1
|
| 119 |
ghuddy |
1035 |
|
|
|
1036 |
|
| 129 |
ghuddy |
1037 |
' Get parameters from database
|
|
|
1038 |
OraDatabase.Parameters.Add "ProjId", Request("proj_id"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
1039 |
OraDatabase.Parameters.Add "Rtag_id", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
1040 |
OraDatabase.Parameters.Add "results", NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR
|
| 119 |
ghuddy |
1041 |
|
| 129 |
ghuddy |
1042 |
OraDatabase.ExecuteSQL " BEGIN PK_APP_UTILS.GET_CURRENT_PARAMETERS ( :ProjId, :Rtag_id, :results ); END;"
|
| 119 |
ghuddy |
1043 |
|
| 129 |
ghuddy |
1044 |
Set rsQry = OraDatabase.Parameters("results").Value
|
| 119 |
ghuddy |
1045 |
|
| 129 |
ghuddy |
1046 |
OraDatabase.Parameters.Remove "ProjId"
|
|
|
1047 |
OraDatabase.Parameters.Remove "Rtag_id"
|
|
|
1048 |
OraDatabase.Parameters.Remove "results"
|
| 119 |
ghuddy |
1049 |
|
|
|
1050 |
|
| 129 |
ghuddy |
1051 |
If rsQry.RecordCount > 0 Then
|
| 119 |
ghuddy |
1052 |
|
| 129 |
ghuddy |
1053 |
nProjId = CDbl(rsQry("PROJ_ID"))
|
|
|
1054 |
nRtagId = CDbl(rsQry("RTAG_ID"))
|
| 119 |
ghuddy |
1055 |
|
| 129 |
ghuddy |
1056 |
End If
|
| 119 |
ghuddy |
1057 |
|
| 129 |
ghuddy |
1058 |
rsQry.Close()
|
|
|
1059 |
Set rsQry = nothing
|
| 119 |
ghuddy |
1060 |
|
|
|
1061 |
|
| 129 |
ghuddy |
1062 |
' Set pv_id parameter
|
|
|
1063 |
If Request("pv_id") <> "" Then nPvId = CDbl(Request("pv_id"))
|
| 119 |
ghuddy |
1064 |
|
|
|
1065 |
|
|
|
1066 |
End Function
|
|
|
1067 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1068 |
Function GetEnvName ( nEnvTab )
|
| 129 |
ghuddy |
1069 |
Select Case CInt( nEnvTab )
|
|
|
1070 |
Case enumENVTAB_WORK_IN_PROGRESS
|
|
|
1071 |
GetEnvName = "Work In Progress"
|
| 119 |
ghuddy |
1072 |
|
| 129 |
ghuddy |
1073 |
Case enumENVTAB_PLANNED
|
|
|
1074 |
GetEnvName = "Pending"
|
| 119 |
ghuddy |
1075 |
|
| 129 |
ghuddy |
1076 |
Case enumENVTAB_RELEASED
|
|
|
1077 |
GetEnvName = "Released"
|
| 119 |
ghuddy |
1078 |
|
| 129 |
ghuddy |
1079 |
End Select
|
| 119 |
ghuddy |
1080 |
|
|
|
1081 |
End Function
|
|
|
1082 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1083 |
Function Title (rtagId)
|
|
|
1084 |
|
| 129 |
ghuddy |
1085 |
If rtagId = "" Then
|
|
|
1086 |
Title = "Release Manager"
|
|
|
1087 |
Else
|
|
|
1088 |
Set rsQry = OraDatabase.DbCreateDynaset( "SELECT RT.RTAG_NAME, P.PROJ_NAME FROM PROJECTS P, RELEASE_TAGS RT WHERE RT.PROJ_ID = P.PROJ_ID AND RT.RTAG_ID="& rtagId, ORADYN_DEFAULT )
|
|
|
1089 |
Title = rsQry("proj_name")&">"&rsQry("rtag_name")
|
|
|
1090 |
rsQry.Close()
|
|
|
1091 |
Set rsQry = Nothing
|
|
|
1092 |
End If
|
| 119 |
ghuddy |
1093 |
|
|
|
1094 |
End Function
|
|
|
1095 |
'-------------------------------------------------------------------------------------
|
|
|
1096 |
Function Check_Package_WIP_Already_Exists(NNrtag_id, NNpv_id)
|
| 129 |
ghuddy |
1097 |
Dim Query_String, rsQry
|
| 119 |
ghuddy |
1098 |
|
| 129 |
ghuddy |
1099 |
Query_String = _
|
|
|
1100 |
" SELECT * "&_
|
|
|
1101 |
" FROM planned pl, package_versions pv "&_
|
|
|
1102 |
" WHERE pl.rtag_id = "& NNrtag_id &_
|
|
|
1103 |
" AND pv.pv_id = pl.pv_id "&_
|
|
|
1104 |
" AND pv.dlocked = 'A' "&_
|
|
|
1105 |
" AND pv.pkg_id = (SELECT pkg_id "&_
|
|
|
1106 |
" FROM package_versions "&_
|
|
|
1107 |
" WHERE pv_id = "& NNpv_id &") "&_
|
|
|
1108 |
" AND pv.v_ext = (SELECT v_ext "&_
|
|
|
1109 |
" FROM package_versions "&_
|
|
|
1110 |
" WHERE pv_id = "& NNpv_id &")"
|
| 119 |
ghuddy |
1111 |
|
|
|
1112 |
|
| 129 |
ghuddy |
1113 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String , cint(0) )
|
| 119 |
ghuddy |
1114 |
|
| 129 |
ghuddy |
1115 |
Check_Package_WIP_Already_Exists = rsQry.RecordCount
|
| 119 |
ghuddy |
1116 |
|
| 129 |
ghuddy |
1117 |
rsQry.Close()
|
|
|
1118 |
Set rsQry = Nothing
|
| 119 |
ghuddy |
1119 |
End Function
|
|
|
1120 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1121 |
Function ValidateCodeReviewURL ( sCodeReviewURL )
|
|
|
1122 |
Dim isValid
|
|
|
1123 |
Dim sTempBaseURL
|
|
|
1124 |
Dim httpRegEx
|
| 129 |
ghuddy |
1125 |
Set httpRegEx = new RegExp
|
| 119 |
ghuddy |
1126 |
|
| 129 |
ghuddy |
1127 |
httpRegEx.Pattern = "^https?:\/\/"
|
| 119 |
ghuddy |
1128 |
|
| 129 |
ghuddy |
1129 |
' Removes ending slash from project's base URL for ease of comparison.
|
|
|
1130 |
sTempBaseURL = Left(baseURL, Len(baseURL)-1)
|
|
|
1131 |
' Removes the project's base URL from the URL specified (if it's present).
|
|
|
1132 |
codeReviewURL = Replace(sCodeReviewURL, sTempBaseURL, "")
|
|
|
1133 |
' Removes the slash from the beginning of the resulting URL (if it's present).
|
|
|
1134 |
If InStr(codeReviewURL, "/") = 1 Then
|
|
|
1135 |
codeReviewURL = Replace(codeReviewURL, "/", "", 1, 1)
|
|
|
1136 |
End If
|
| 119 |
ghuddy |
1137 |
|
| 129 |
ghuddy |
1138 |
' If the URL doesn't contain the http:// prefix, assume that it's correct.
|
|
|
1139 |
If NOT httpRegEx.Test(codeReviewURL) AND Len(codeReviewURL) > 0 Then
|
|
|
1140 |
isValid = True
|
|
|
1141 |
Else
|
|
|
1142 |
' If the URL still contains the http:// prefix and is longer than the base
|
|
|
1143 |
' URL, assume that it is an invalid URL because of a differing base URL.
|
|
|
1144 |
If Len(sCodeReviewURL) > Len(baseURL) Then
|
|
|
1145 |
Response.Write("<script type='text/javascript'>alert('Incorrect Base URL\n\nMust start with project\'s base url (" & baseURL &") if full URL specified.')</script>")
|
|
|
1146 |
Else
|
|
|
1147 |
' If the URL still contains the http:// prefix and is shorter than the base
|
|
|
1148 |
' URL, assume that it is incomplete.
|
|
|
1149 |
Response.Write("<script type='text/javascript'>alert('Incomplete Code Review URL')</script>")
|
|
|
1150 |
End If
|
|
|
1151 |
' Otherwise, the URL matches the base URL exactly, which is also invalid.
|
|
|
1152 |
codeReviewURL = sCodeReviewURL
|
|
|
1153 |
isValid = False
|
|
|
1154 |
End If
|
|
|
1155 |
ValidateCodeReviewURL = isValid
|
| 119 |
ghuddy |
1156 |
End Function
|
|
|
1157 |
'----------------------------------------------------------------------------------------------------------------------------------------
|
|
|
1158 |
Function Is_Page_Editable ( cDlocked )
|
| 129 |
ghuddy |
1159 |
' Editable if ( (unlocked OR rejected)
|
|
|
1160 |
' OR ( NOT released/locked AND EditReleaseNotesInPending allowed)
|
|
|
1161 |
' OR (released/locked AND EditNonCriticalInfoForLockedPackage allowed)
|
|
|
1162 |
' )
|
|
|
1163 |
' AND user logged in
|
|
|
1164 |
If (((cDlocked = "N") OR (cDlocked = "R")) OR ((cDlocked <> "Y") AND (objAccessControl.IsActive("EditReleaseNotesInPending"))) OR ((cDlocked = "Y") AND (objAccessControl.IsActive("EditNonCriticalInfoForLockedPackage")))) AND objAccessControl.UserLogedIn Then
|
|
|
1165 |
Is_Page_Editable = TRUE
|
|
|
1166 |
Else
|
|
|
1167 |
Is_Page_Editable = FALSE
|
|
|
1168 |
End If
|
| 119 |
ghuddy |
1169 |
End Function
|
|
|
1170 |
'----------------------------------------------------------------------------------------------------------------------------------------
|
|
|
1171 |
Function Is_Section_Editable ( )
|
| 129 |
ghuddy |
1172 |
If scriptName = "fixed_issues.asp" AND objAccessControl.UserLogedIn Then
|
|
|
1173 |
Is_Section_Editable = TRUE
|
|
|
1174 |
Else
|
|
|
1175 |
Is_Section_Editable = FALSE
|
|
|
1176 |
End If
|
| 119 |
ghuddy |
1177 |
End Function
|
|
|
1178 |
'----------------------------------------------------------------------------------------------------------------------------------------
|
|
|
1179 |
Function Is_Critical_Section_Editable ( cDlocked )
|
| 129 |
ghuddy |
1180 |
' Editable if ( (unlocked OR rejected)
|
|
|
1181 |
' OR ( NOT released/locked AND EditReleaseNotesInPending allowed)
|
|
|
1182 |
' OR (released/locked AND EditCriticalInfoForLockedPackage allowed)
|
|
|
1183 |
' )
|
|
|
1184 |
' AND user logged in
|
|
|
1185 |
If (((cDlocked = "N") OR (cDlocked = "R")) OR ((cDlocked <> "Y") AND (objAccessControl.IsActive("EditReleaseNotesInPending"))) OR ((cDlocked = "Y") AND (objAccessControl.IsActive("EditCriticalInfoForLockedPackage")))) AND objAccessControl.UserLogedIn Then
|
|
|
1186 |
Is_Critical_Section_Editable = TRUE
|
|
|
1187 |
Else
|
|
|
1188 |
Is_Critical_Section_Editable = FALSE
|
|
|
1189 |
End If
|
| 119 |
ghuddy |
1190 |
End Function
|
|
|
1191 |
|
|
|
1192 |
'---------------------------------------------------------------
|
|
|
1193 |
' Function: Codestriker_Command
|
|
|
1194 |
'
|
|
|
1195 |
' Purpose: Forms a codestriker differencing command for use when
|
|
|
1196 |
' preparing codestriker reviews. This will be used mainly
|
|
|
1197 |
' on release notes pages.
|
|
|
1198 |
'
|
|
|
1199 |
' Arguments: old_label : The previous or older label
|
|
|
1200 |
' new_label : The current or newer label
|
|
|
1201 |
'
|
|
|
1202 |
Function Codestriker_Command (oldLabel, new_label)
|
|
|
1203 |
|
| 129 |
ghuddy |
1204 |
If ( IsNull(new_label) ) Then
|
|
|
1205 |
Codestriker_Command = "Label not defined"
|
|
|
1206 |
ElseIf (IsNull(oldLabel) OR oldLabel = "" ) Then
|
|
|
1207 |
Codestriker_Command = "jats CCdiff -new=" & new_label
|
|
|
1208 |
Else
|
|
|
1209 |
Codestriker_Command = "jats CCdiff -old=" & oldLabel & " -new=" & new_label
|
|
|
1210 |
End If
|
| 119 |
ghuddy |
1211 |
End Function
|
|
|
1212 |
|
|
|
1213 |
'---------------------------------------------------------------
|
|
|
1214 |
' Function: getLastNonRippleVersionPVID
|
|
|
1215 |
'
|
|
|
1216 |
' Purpose: returns the last non-ripple version of the package
|
|
|
1217 |
'
|
|
|
1218 |
' Arguments: this_pv_id : string
|
|
|
1219 |
'
|
|
|
1220 |
' Notes: In the past, users used to manually perform ripple builds.
|
|
|
1221 |
' This function does not detect those as ripples. It could be
|
|
|
1222 |
' made to do so but it would not be reliable. For example, it
|
|
|
1223 |
' could check to see if the word "ripple" appears in the
|
|
|
1224 |
' comments field of the record set of the SWL query. That
|
|
|
1225 |
' might catch some of those records, but assumes the user
|
|
|
1226 |
' wrote the wor ripple into the comments (reason for version).
|
|
|
1227 |
'
|
|
|
1228 |
Function getLastNonRippleVersionPVID( this_pv_id )
|
| 129 |
ghuddy |
1229 |
Dim queryResult
|
|
|
1230 |
Dim queryString
|
|
|
1231 |
Dim finalPVID
|
|
|
1232 |
Dim lastPVID
|
| 119 |
ghuddy |
1233 |
|
| 129 |
ghuddy |
1234 |
' default return value in case we never get into the loop
|
|
|
1235 |
finalPVID = this_pv_id
|
| 119 |
ghuddy |
1236 |
|
| 129 |
ghuddy |
1237 |
' Get record for this PVID
|
| 157 |
ghuddy |
1238 |
queryString = "SELECT build_type, last_pv_id FROM package_versions WHERE pv_id = " & this_pv_id
|
| 119 |
ghuddy |
1239 |
|
| 129 |
ghuddy |
1240 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
| 119 |
ghuddy |
1241 |
|
| 129 |
ghuddy |
1242 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
|
| 119 |
ghuddy |
1243 |
|
| 129 |
ghuddy |
1244 |
' If this version is a ripple built version, begin the process of finding its ancestral non-ripple built version
|
|
|
1245 |
If (queryResult("build_type") = "Y") Then
|
| 119 |
ghuddy |
1246 |
|
| 129 |
ghuddy |
1247 |
lastPVID = queryResult("last_pv_id")
|
| 119 |
ghuddy |
1248 |
|
| 129 |
ghuddy |
1249 |
' We know we have some ripple built versions now, so arm the finalPVID for loop control
|
|
|
1250 |
finalPVID = ""
|
| 119 |
ghuddy |
1251 |
|
| 129 |
ghuddy |
1252 |
' Work back through the version history until we hit a record that is not a ripple build version
|
|
|
1253 |
Do While ((NOT queryResult.BOF) AND (NOT queryResult.EOF) AND (NOT IsNull(lastPVID)) AND (finalPVID = ""))
|
| 119 |
ghuddy |
1254 |
|
| 157 |
ghuddy |
1255 |
queryString = "SELECT build_type, last_pv_id FROM package_versions WHERE pv_id = " & lastPVID
|
| 119 |
ghuddy |
1256 |
|
| 129 |
ghuddy |
1257 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
| 119 |
ghuddy |
1258 |
|
| 129 |
ghuddy |
1259 |
' if the package version is a ripple built one, go round the loop again, else trigger a loop exit
|
|
|
1260 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF) AND ( queryResult("build_type") = "Y")) Then
|
|
|
1261 |
lastPVID = queryResult("last_pv_id")
|
|
|
1262 |
Else
|
|
|
1263 |
finalPVID = lastPVID
|
|
|
1264 |
End If
|
|
|
1265 |
Loop
|
|
|
1266 |
End If
|
|
|
1267 |
End If
|
| 119 |
ghuddy |
1268 |
|
| 129 |
ghuddy |
1269 |
queryResult.Close()
|
|
|
1270 |
Set queryResult = nothing
|
| 119 |
ghuddy |
1271 |
|
| 129 |
ghuddy |
1272 |
getLastNonRippleVersionPVID = finalPVID
|
| 119 |
ghuddy |
1273 |
End Function
|
|
|
1274 |
|
| 159 |
ghuddy |
1275 |
Function getLastNonRippleVersionPVIDLimitedByDate( this_pv_id, limitDate )
|
|
|
1276 |
Dim queryResult
|
|
|
1277 |
Dim queryString
|
|
|
1278 |
Dim finalPVID
|
|
|
1279 |
Dim lastPVID
|
|
|
1280 |
|
|
|
1281 |
' default return value in case we never get into the loop
|
|
|
1282 |
finalPVID = this_pv_id
|
|
|
1283 |
|
|
|
1284 |
' Get record for this PVID
|
|
|
1285 |
queryString = "SELECT build_type, last_pv_id FROM package_versions WHERE pv_id = " & this_pv_id
|
|
|
1286 |
|
|
|
1287 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
|
|
1288 |
|
|
|
1289 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
|
|
|
1290 |
|
|
|
1291 |
' If this version is a ripple built version, begin the process of finding its ancestral non-ripple built version
|
|
|
1292 |
If (queryResult("build_type") = "Y") Then
|
|
|
1293 |
|
|
|
1294 |
lastPVID = queryResult("last_pv_id")
|
|
|
1295 |
|
|
|
1296 |
' We know we have some ripple built versions now, so arm the finalPVID for loop control
|
|
|
1297 |
finalPVID = ""
|
|
|
1298 |
|
|
|
1299 |
' Work back through the version history until we hit a record that is not a ripple build version
|
|
|
1300 |
Do While ((NOT queryResult.BOF) AND (NOT queryResult.EOF) AND (NOT IsNull(lastPVID)) AND (finalPVID = ""))
|
|
|
1301 |
|
|
|
1302 |
queryString = "SELECT build_type, last_pv_id FROM package_versions "&_
|
|
|
1303 |
" WHERE pv_id = " & lastPVID &_
|
|
|
1304 |
" AND MODIFIED_STAMP >= TO_DATE('" & limitDate & "','DD/MM/YYYY')"
|
|
|
1305 |
|
|
|
1306 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
|
|
1307 |
|
|
|
1308 |
' if the package version is a ripple built one, go round the loop again, else trigger a loop exit
|
|
|
1309 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF) AND ( queryResult("build_type") = "Y")) Then
|
|
|
1310 |
lastPVID = queryResult("last_pv_id")
|
|
|
1311 |
Else
|
|
|
1312 |
finalPVID = lastPVID
|
|
|
1313 |
End If
|
|
|
1314 |
Loop
|
|
|
1315 |
End If
|
|
|
1316 |
End If
|
|
|
1317 |
|
|
|
1318 |
queryResult.Close()
|
|
|
1319 |
Set queryResult = nothing
|
|
|
1320 |
|
|
|
1321 |
getLastNonRippleVersionPVIDLimitedByDate = finalPVID
|
|
|
1322 |
End Function
|
|
|
1323 |
|
|
|
1324 |
|
| 119 |
ghuddy |
1325 |
'---------------------------------------------------------------
|
|
|
1326 |
' Function: getPreviousVersionPVID
|
|
|
1327 |
'
|
|
|
1328 |
' Purpose: returns the immediate predecssor version of the given
|
|
|
1329 |
' package version
|
|
|
1330 |
'
|
|
|
1331 |
' Arguments: this_pv_id : string
|
|
|
1332 |
'
|
|
|
1333 |
' Notes:
|
|
|
1334 |
'
|
|
|
1335 |
Function getPreviousVersionPVID( this_pv_id )
|
| 129 |
ghuddy |
1336 |
Dim queryResult
|
|
|
1337 |
Dim queryString
|
| 119 |
ghuddy |
1338 |
|
| 129 |
ghuddy |
1339 |
getPreviousVersionPVID = ""
|
| 119 |
ghuddy |
1340 |
|
| 157 |
ghuddy |
1341 |
queryString = "SELECT last_pv_id FROM package_versions WHERE pv_id = " & this_pv_id
|
| 119 |
ghuddy |
1342 |
|
| 129 |
ghuddy |
1343 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
| 119 |
ghuddy |
1344 |
|
| 129 |
ghuddy |
1345 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
|
|
|
1346 |
getPreviousVersionPVID = queryResult("last_pv_id")
|
|
|
1347 |
End If
|
| 119 |
ghuddy |
1348 |
|
| 129 |
ghuddy |
1349 |
queryResult.Close()
|
|
|
1350 |
Set queryResult = nothing
|
| 119 |
ghuddy |
1351 |
|
|
|
1352 |
End Function
|
|
|
1353 |
|
|
|
1354 |
'---------------------------------------------------------------
|
| 129 |
ghuddy |
1355 |
' Function: getLastSignificantPVID
|
|
|
1356 |
'
|
|
|
1357 |
' Purpose: Returns the last significant (man-made) version (PV_ID) that
|
|
|
1358 |
' is a predecessor to the specified pv_id
|
|
|
1359 |
'
|
|
|
1360 |
' Arguments: pv_id : Uniquely identifies this package version
|
|
|
1361 |
' last_pv_id : Uniquely identifies the predecssor of this package version
|
|
|
1362 |
' Notes:
|
|
|
1363 |
'
|
|
|
1364 |
Function getLastSignificantPVID (pv_id, last_pv_id)
|
|
|
1365 |
|
|
|
1366 |
getLastSignificantPVID = ""
|
|
|
1367 |
|
|
|
1368 |
If( (NOT IsNull(last_pv_id)) AND (last_pv_id <> pv_id) ) Then
|
|
|
1369 |
|
|
|
1370 |
' Get the pv_id for the current version, and if necessary, work back through any ripple versions as necessary
|
|
|
1371 |
' to get a non-ripple version ancestor
|
|
|
1372 |
pv_id = getLastNonRippleVersionPVID( pv_id )
|
|
|
1373 |
If (pv_id <> "") Then
|
|
|
1374 |
' get the pv_id of the previous version to the non-ripple version ancestor we just found.
|
|
|
1375 |
' It does not matter if we get a ripple version here. It is good enough to serve the purpose of version diff'ing
|
|
|
1376 |
pv_id = getPreviousVersionPVID( pv_id )
|
|
|
1377 |
If (pv_id <> "") Then
|
|
|
1378 |
getLastSignificantPVID = pv_id
|
|
|
1379 |
End If
|
|
|
1380 |
End If
|
|
|
1381 |
|
|
|
1382 |
End If
|
|
|
1383 |
|
|
|
1384 |
End Function
|
|
|
1385 |
'---------------------------------------------------------------
|
|
|
1386 |
' Function: get_Pkg_Label
|
|
|
1387 |
'
|
|
|
1388 |
' Purpose: Returns the package label for the specified pv_id
|
|
|
1389 |
'
|
|
|
1390 |
' Arguments: pv_id : Uniquely identifies this package version
|
|
|
1391 |
'
|
|
|
1392 |
Function get_Pkg_Label (pv_id)
|
|
|
1393 |
Dim queryResult
|
|
|
1394 |
Dim queryString
|
|
|
1395 |
|
|
|
1396 |
get_Pkg_Label = ""
|
|
|
1397 |
|
|
|
1398 |
' Get the package label from the package versions table
|
|
|
1399 |
queryString = "SELECT pkg_label FROM package_versions WHERE pv_id = " & pv_id
|
|
|
1400 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
|
|
1401 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
|
|
|
1402 |
get_Pkg_Label = queryResult("pkg_label")
|
|
|
1403 |
End If
|
|
|
1404 |
queryResult.Close()
|
|
|
1405 |
Set queryResult = nothing
|
|
|
1406 |
End Function
|
|
|
1407 |
'---------------------------------------------------------------
|
|
|
1408 |
' Function: get_Src_Path
|
|
|
1409 |
'
|
|
|
1410 |
' Purpose: Returns the source path for the specified pv_id
|
|
|
1411 |
'
|
|
|
1412 |
' Arguments: pv_id : Uniquely identifies this package version
|
|
|
1413 |
'
|
|
|
1414 |
Function get_Src_Path (pv_id)
|
|
|
1415 |
Dim queryResult
|
|
|
1416 |
Dim queryString
|
|
|
1417 |
|
|
|
1418 |
get_Src_Path = ""
|
|
|
1419 |
|
|
|
1420 |
' Get the source path from package versions table
|
|
|
1421 |
queryString = "SELECT src_path FROM package_versions WHERE pv_id = " & pv_id
|
|
|
1422 |
Set queryResult = OraDatabase.DbCreateDynaset( queryString, cint(0))
|
|
|
1423 |
If ((NOT queryResult.BOF) AND (NOT queryResult.EOF)) Then
|
|
|
1424 |
get_Src_Path = queryResult("src_path")
|
|
|
1425 |
End If
|
|
|
1426 |
queryResult.Close()
|
|
|
1427 |
Set queryResult = nothing
|
|
|
1428 |
End Function
|
|
|
1429 |
|
|
|
1430 |
'---------------------------------------------------------------
|
| 119 |
ghuddy |
1431 |
' Function: getOldLabel
|
|
|
1432 |
'
|
|
|
1433 |
' Purpose: Returns the previous label; if none then returns empty string
|
|
|
1434 |
'
|
|
|
1435 |
' Since this operation is designed to fulfil the generation of
|
|
|
1436 |
' diff commands, there is no point in considering ripple
|
|
|
1437 |
' versions, since the only differences we find there are in
|
|
|
1438 |
' the build.pl files (for example). So, this function uses
|
|
|
1439 |
' some underlying methods that ignore ripple built versions
|
|
|
1440 |
' therefore concentrating on versions that someone has manually
|
|
|
1441 |
' gone and labelled, presumably because they changed some
|
|
|
1442 |
' source file other than build.pl.
|
|
|
1443 |
'
|
|
|
1444 |
' Arguments: pv_id : Uniquely identifies this package version
|
|
|
1445 |
' last_pv_id : Uniquely identifies the predecssor of this package version
|
|
|
1446 |
' Notes:
|
|
|
1447 |
'
|
|
|
1448 |
Function getOldLabel (pv_id, last_pv_id)
|
| 129 |
ghuddy |
1449 |
Dim lastSignificantPVID
|
| 119 |
ghuddy |
1450 |
|
| 129 |
ghuddy |
1451 |
getOldLabel = ""
|
| 119 |
ghuddy |
1452 |
|
| 129 |
ghuddy |
1453 |
lastSignificantPVID = getLastSignificantPVID(pv_id, last_pv_id)
|
|
|
1454 |
If (lastSignificantPVID <> "") Then
|
|
|
1455 |
getOldLabel = get_Pkg_Label(lastSignificantPVID)
|
|
|
1456 |
End If
|
|
|
1457 |
End Function
|
|
|
1458 |
'---------------------------------------------------------------
|
|
|
1459 |
' Function: getOldSrcPath
|
|
|
1460 |
'
|
|
|
1461 |
' Purpose: Returns the previous src path; if none then returns empty string
|
|
|
1462 |
'
|
|
|
1463 |
' Since this operation is designed to fulfil the generation of
|
|
|
1464 |
' diff commands, there is no point in considering ripple
|
|
|
1465 |
' versions, since the only differences we find there are in
|
|
|
1466 |
' the build.pl files (for example). So, this function uses
|
|
|
1467 |
' some underlying methods that ignore ripple built versions
|
|
|
1468 |
' therefore concentrating on versions that someone has manually
|
|
|
1469 |
' gone and labelled, presumably because they changed some
|
|
|
1470 |
' source file other than build.pl.
|
|
|
1471 |
'
|
|
|
1472 |
' NOTE: With SubVersion, the src_path column in the package_versions
|
|
|
1473 |
' table will be used to hold the Subversion tag. This function
|
|
|
1474 |
' will therefore be used mostly when a package version is
|
|
|
1475 |
' controlled under subversion.
|
|
|
1476 |
'
|
|
|
1477 |
' Arguments: pv_id : Uniquely identifies this package version
|
|
|
1478 |
' last_pv_id : Uniquely identifies the predecssor of this package version
|
|
|
1479 |
' Notes:
|
|
|
1480 |
'
|
|
|
1481 |
Function getOldSrcPath (pv_id, last_pv_id)
|
|
|
1482 |
Dim lastSignificantPVID
|
| 119 |
ghuddy |
1483 |
|
| 129 |
ghuddy |
1484 |
getOldSrcPath = ""
|
| 119 |
ghuddy |
1485 |
|
| 129 |
ghuddy |
1486 |
lastSignificantPVID = getLastSignificantPVID(pv_id, last_pv_id)
|
|
|
1487 |
If (lastSignificantPVID <> "") Then
|
|
|
1488 |
getOldSrcPath = get_Src_Path(lastSignificantPVID)
|
|
|
1489 |
End If
|
|
|
1490 |
End Function
|
|
|
1491 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
1492 |
Sub vcs_info_from_vcs_tag( nVcs_tag, ByRef objDetails )
|
|
|
1493 |
Dim rsTemp, Query_String
|
| 119 |
ghuddy |
1494 |
|
| 129 |
ghuddy |
1495 |
Query_String = " SELECT * FROM vcs_type WHERE tag = '"& nVcs_tag &"'"
|
|
|
1496 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
1497 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
1498 |
objDetails.Item("vcs_type_id") = rsTemp("vcs_type_id")
|
|
|
1499 |
objDetails.Item("vcs_name") = rsTemp("name")
|
|
|
1500 |
objDetails.Item("vcs_tag") = rsTemp("tag")
|
|
|
1501 |
Else
|
| 141 |
ghuddy |
1502 |
Call RaiseMsg(enum_MSG_ERROR, "Database does not contain a record of the VCS tag : " & nVcs_tag )
|
| 129 |
ghuddy |
1503 |
End If
|
|
|
1504 |
rsTemp.Close()
|
|
|
1505 |
set rsTemp = nothing
|
|
|
1506 |
End Sub
|
|
|
1507 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
1508 |
Sub vcs_info_from_vcs_type_id( nVcs_type_id, ByRef objDetails )
|
|
|
1509 |
Dim rsTemp, Query_String
|
|
|
1510 |
|
|
|
1511 |
If NOT IsNull(nVcs_type_id) Then
|
|
|
1512 |
Query_String = " SELECT * FROM vcs_type WHERE vcs_type_id = "& nVcs_type_id
|
|
|
1513 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
1514 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
1515 |
objDetails.Item("vcs_type_id") = rsTemp("vcs_type_id")
|
|
|
1516 |
objDetails.Item("vcs_name") = rsTemp("name")
|
|
|
1517 |
objDetails.Item("vcs_tag") = rsTemp("tag")
|
|
|
1518 |
Else
|
| 141 |
ghuddy |
1519 |
Call RaiseMsg(enum_MSG_ERROR, "Database does not contain a record of the VCS type ID : " & nVcs_type_id )
|
| 129 |
ghuddy |
1520 |
End If
|
|
|
1521 |
rsTemp.Close()
|
|
|
1522 |
set rsTemp = nothing
|
|
|
1523 |
Else
|
| 3610 |
dpurdie |
1524 |
' default to returning Subversion info, assuming it exists in the data
|
|
|
1525 |
Call vcs_info_from_vcs_tag( enum_VCS_SUBVERSION_TAG, objDetails )
|
| 129 |
ghuddy |
1526 |
End If
|
|
|
1527 |
End Sub
|
|
|
1528 |
'----------------------------------------------------------------------------------------------------------------------
|
| 137 |
ghuddy |
1529 |
Sub get_vcs_info_for_package( nPkgLabel, nBuildType, nVcsTypeId, nDLocked, ByRef objDetails )
|
| 129 |
ghuddy |
1530 |
' lots of patch versions exist with N/A as their pkg_label and null as vcs_type_id. These are all uncontrolled
|
|
|
1531 |
' packages published directly into dpkg_archive with no controlled source under clearcase, so we want to treat
|
|
|
1532 |
' them as uncontrolled if possible.
|
| 137 |
ghuddy |
1533 |
If nDLocked = "Y" AND ((nPkgLabel = "N/A") OR IsNull(nPkgLabel)) AND nBuildType = "M" AND IsNull(nVcsTypeId) Then
|
| 129 |
ghuddy |
1534 |
Call vcs_info_from_vcs_tag( enum_VCS_UNCONTROLLED_TAG, objDetails )
|
|
|
1535 |
Else
|
|
|
1536 |
' Otherwise, try and decode the VCS from the package's vcs_type_id entry from the package version table
|
|
|
1537 |
' NOTE: A null vcs_type_id entry will default to ClearCase. That is all we have been using up til now so
|
|
|
1538 |
' it should be safe.
|
|
|
1539 |
Call vcs_info_from_vcs_type_id( nVcsTypeId, objDetails )
|
|
|
1540 |
End If
|
|
|
1541 |
End Sub
|
|
|
1542 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
1543 |
Sub get_vcs_info_for_pv_id( nPv_id, ByRef objDetails )
|
|
|
1544 |
Dim rsTemp, Query_String
|
|
|
1545 |
|
|
|
1546 |
Query_String = _
|
| 137 |
ghuddy |
1547 |
" SELECT pv.pkg_label, pv.build_type, pv.vcs_type_id, pv.dlocked "&_
|
| 129 |
ghuddy |
1548 |
" FROM PACKAGE_VERSIONS pv"&_
|
|
|
1549 |
" WHERE pv.pv_id = "& nPv_id
|
|
|
1550 |
|
|
|
1551 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
1552 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
| 137 |
ghuddy |
1553 |
Call get_vcs_info_for_package( rsTemp("pkg_label"), rsTemp("build_type"), rsTemp("vcs_type_id"), rsTemp("dlocked"), objDetails )
|
| 129 |
ghuddy |
1554 |
Else
|
|
|
1555 |
Call RaiseMsg(enum_MSG_ERROR, "PV_ID (" & nPv_id & ") Not Found")
|
|
|
1556 |
End If
|
|
|
1557 |
rsTemp.Close()
|
|
|
1558 |
set rsTemp = nothing
|
|
|
1559 |
End Sub
|
|
|
1560 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
1561 |
Function get_vcs_tag( nPv_id )
|
|
|
1562 |
Dim tempVcsInfoCollector
|
|
|
1563 |
Set tempVcsInfoCollector = CreateObject("Scripting.Dictionary")
|
|
|
1564 |
|
|
|
1565 |
Call get_vcs_info_for_pv_id( nPv_id, tempVcsInfoCollector )
|
|
|
1566 |
get_vcs_tag = tempVcsInfoCollector.Item("vcs_tag")
|
|
|
1567 |
|
|
|
1568 |
Set tempVcsInfoCollector = nothing
|
| 119 |
ghuddy |
1569 |
End Function
|
| 129 |
ghuddy |
1570 |
'----------------------------------------------------------------------------------------------------------------------
|
| 143 |
ghuddy |
1571 |
Function isInDoNotRippleTable( NNrtag_id, NNpv_id )
|
|
|
1572 |
Dim rsTemp, Query_String
|
| 119 |
ghuddy |
1573 |
|
| 143 |
ghuddy |
1574 |
isInDoNotRippleTable = FALSE
|
|
|
1575 |
|
|
|
1576 |
If NNrtag_id <> "" AND NNpv_id <> "" Then
|
|
|
1577 |
Query_String = " SELECT dnr.pv_id FROM DO_NOT_RIPPLE dnr WHERE dnr.RTAG_ID ="& NNrtag_id &" AND dnr.PV_ID ="& NNpv_id
|
|
|
1578 |
|
|
|
1579 |
Set rsTemp = OraDatabase.DbCreateDynaset(Query_String, cint(0))
|
|
|
1580 |
If rsTemp.RecordCount <> 0 Then
|
|
|
1581 |
isInDoNotRippleTable = TRUE
|
|
|
1582 |
End If
|
|
|
1583 |
rsTemp.Close()
|
|
|
1584 |
set rsTemp = nothing
|
|
|
1585 |
End If
|
|
|
1586 |
End Function
|
| 145 |
ghuddy |
1587 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
1588 |
Function pv_id_exists( nPv_id )
|
|
|
1589 |
Dim rsTemp, Query_String
|
| 143 |
ghuddy |
1590 |
|
| 145 |
ghuddy |
1591 |
If NOT IsNull( nPv_id ) AND nPv_id <> "" Then
|
|
|
1592 |
Query_String = _
|
|
|
1593 |
" SELECT pv.pv_id "&_
|
|
|
1594 |
" FROM PACKAGE_VERSIONS pv"&_
|
|
|
1595 |
" WHERE pv.pv_id = "& nPv_id
|
|
|
1596 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
1597 |
If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
|
|
|
1598 |
pv_id_exists = TRUE
|
|
|
1599 |
Else
|
|
|
1600 |
pv_id_exists = FALSE
|
|
|
1601 |
End If
|
|
|
1602 |
rsTemp.Close()
|
|
|
1603 |
set rsTemp = nothing
|
|
|
1604 |
Else
|
|
|
1605 |
pv_id_exists = FALSE
|
|
|
1606 |
End If
|
|
|
1607 |
End Function
|
|
|
1608 |
'----------------------------------------------------------------------------------------------------------------------
|
|
|
1609 |
Function is_daemon_enabled_release( NNrtag_id, defaultReturnValue )
|
|
|
1610 |
Dim rsTemp, Query_String
|
| 143 |
ghuddy |
1611 |
|
| 145 |
ghuddy |
1612 |
If NOT IsNull( NNrtag_id ) AND NNrtag_id <> "" Then
|
| 143 |
ghuddy |
1613 |
|
| 145 |
ghuddy |
1614 |
Query_String = _
|
|
|
1615 |
" SELECT rc.daemon_hostname "&_
|
|
|
1616 |
" FROM RELEASE_CONFIG rc"&_
|
|
|
1617 |
" WHERE rc.rtag_id = "& NNrtag_id
|
|
|
1618 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
1619 |
|
|
|
1620 |
is_daemon_enabled_release = FALSE
|
|
|
1621 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF) AND (is_daemon_enabled_release = FALSE))
|
|
|
1622 |
If (NOT IsNull(rsTemp("daemon_hostname"))) AND (rsTemp("daemon_hostname") <> "") Then
|
|
|
1623 |
is_daemon_enabled_release = TRUE
|
|
|
1624 |
End If
|
|
|
1625 |
rsTemp.MoveNext
|
|
|
1626 |
WEnd
|
|
|
1627 |
|
|
|
1628 |
rsTemp.Close()
|
|
|
1629 |
set rsTemp = nothing
|
|
|
1630 |
Else
|
|
|
1631 |
is_daemon_enabled_release = defaultReturnValue
|
|
|
1632 |
End If
|
|
|
1633 |
End Function
|
| 147 |
ghuddy |
1634 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
1635 |
' Convert release state into a meaningful string
|
|
|
1636 |
Function Get_Official( nOfficial )
|
|
|
1637 |
If nOfficial = "N" Then
|
|
|
1638 |
Get_Official = "Open"
|
|
|
1639 |
ElseIf nOfficial = "A" Then
|
|
|
1640 |
Get_Official = "Archive"
|
|
|
1641 |
ElseIf nOfficial = "C" Then
|
|
|
1642 |
Get_Official = "CCB"
|
|
|
1643 |
ElseIf nOfficial = "R" Then
|
|
|
1644 |
Get_Official = "Restricted"
|
|
|
1645 |
ElseIf nOfficial = "Y" Then
|
|
|
1646 |
Get_Official = "Closed"
|
|
|
1647 |
Else
|
|
|
1648 |
Get_Official = "?"
|
|
|
1649 |
End If
|
|
|
1650 |
End Function
|
| 151 |
ghuddy |
1651 |
'-----------------------------------------------------------------------------------------------------------------------------
|
|
|
1652 |
Function Get_Pkg_Id_For_Pv_Id ( NNpv_id )
|
|
|
1653 |
Dim rsTemp, Query_String
|
| 145 |
ghuddy |
1654 |
|
| 151 |
ghuddy |
1655 |
Get_Pkg_Id_For_Pv_Id = ""
|
| 145 |
ghuddy |
1656 |
|
| 151 |
ghuddy |
1657 |
If NOT IsNull(NNpv_id) AND NNpv_id <> "" Then
|
|
|
1658 |
Query_String = _
|
|
|
1659 |
"SELECT pkg_id FROM package_versions WHERE pv_id = "& NNpv_id
|
|
|
1660 |
|
|
|
1661 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
1662 |
|
|
|
1663 |
If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
|
|
|
1664 |
Get_Pkg_Id_For_Pv_Id = rsTemp("pkg_id")
|
|
|
1665 |
End If
|
|
|
1666 |
rsTemp.Close
|
|
|
1667 |
Set rsTemp = nothing
|
|
|
1668 |
End If
|
|
|
1669 |
|
|
|
1670 |
End Function
|
|
|
1671 |
|
| 171 |
brianf |
1672 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 161 |
iaugusti |
1673 |
Function iif(bFlag, sTrueStr, sFalseStr)
|
|
|
1674 |
if bFlag then
|
|
|
1675 |
iif = sTrueStr
|
|
|
1676 |
else
|
|
|
1677 |
iif = sFalseStr
|
|
|
1678 |
end if
|
|
|
1679 |
End Function
|
| 151 |
ghuddy |
1680 |
|
| 171 |
brianf |
1681 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
1682 |
' Sets the state of all build daemons of the specified release
|
|
|
1683 |
Sub SetDaemonStates (artag_id,astate)
|
|
|
1684 |
On Error Resume Next
|
|
|
1685 |
OraDatabase.Parameters.Add "RTAG_ID", artag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
1686 |
OraDatabase.Parameters.Add "NSTATE", astate, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
1687 |
|
|
|
1688 |
objEH.TryORA ( OraSession )
|
|
|
1689 |
|
|
|
1690 |
OraDatabase.ExecuteSQL _
|
|
|
1691 |
"BEGIN PK_BUILDAPI.SET_DAEMON_STATES(:RTAG_ID,:NSTATE); END;"
|
|
|
1692 |
|
|
|
1693 |
objEH.CatchORA ( OraSession )
|
|
|
1694 |
|
|
|
1695 |
OraDatabase.Parameters.Remove "RTAG_Id"
|
|
|
1696 |
OraDatabase.Parameters.Remove "NSTATE"
|
|
|
1697 |
End Sub
|
|
|
1698 |
|
| 183 |
brianf |
1699 |
'----------------------------------------------
|
|
|
1700 |
'Returns true if the specified package version exists in the specified table
|
|
|
1701 |
Function PackageExists(RtagId, pvId, stable)
|
|
|
1702 |
Dim rsTemp
|
|
|
1703 |
Dim sqry
|
| 185 |
brianf |
1704 |
If RtagId = "" Then
|
|
|
1705 |
PackageExists = False
|
|
|
1706 |
Else
|
|
|
1707 |
sqry = "SELECT * FROM " & stable & " WHERE rtag_id = " & RtagId & " AND pv_id = " & pvId
|
|
|
1708 |
Set rsTemp = OraDatabase.DbCreateDynaset(sqry,CInt(0))
|
|
|
1709 |
PackageExists = rsTemp.RecordCount > 0
|
|
|
1710 |
rsTemp.Close()
|
|
|
1711 |
Set rsTemp = Nothing
|
|
|
1712 |
End If
|
| 183 |
brianf |
1713 |
End Function
|
|
|
1714 |
|
| 119 |
ghuddy |
1715 |
%>
|