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