| Line 13... |
Line 13... |
| 13 |
'
|
13 |
'
|
| 14 |
%>
|
14 |
%>
|
| 15 |
<%
|
15 |
<%
|
| 16 |
Dim AutoBuildPermissionDenied
|
16 |
Dim AutoBuildPermissionDenied
|
| 17 |
Dim ManualBuildPermissionDenied
|
17 |
Dim ManualBuildPermissionDenied
|
| - |
|
18 |
Dim RaiseWIPExists
|
| 18 |
|
19 |
|
| 19 |
AutoBuildPermissionDenied = FALSE
|
20 |
AutoBuildPermissionDenied = FALSE
|
| 20 |
ManualBuildPermissionDenied = FALSE
|
21 |
ManualBuildPermissionDenied = FALSE
|
| 21 |
|
22 |
|
| 22 |
|
23 |
|
| Line 76... |
Line 77... |
| 76 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
77 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 77 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
78 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 78 |
|
79 |
|
| 79 |
objEH.TryORA ( OraSession )
|
80 |
objEH.TryORA ( OraSession )
|
| 80 |
|
81 |
|
| 81 |
OraSession.BeginTrans
|
- |
|
| 82 |
|
- |
|
| 83 |
OraDatabase.ExecuteSQL _
|
82 |
OraDatabase.ExecuteSQL _
|
| 84 |
"BEGIN "&_
|
83 |
"BEGIN "&_
|
| 85 |
" PK_ENVIRONMENT.APPROVE_MERGE ( :PV_ID, :RTAG_ID, :USER_ID );"&_
|
84 |
" PK_ENVIRONMENT.APPROVE_MERGE ( :PV_ID, :RTAG_ID, :USER_ID );"&_
|
| 86 |
"END; "
|
85 |
"END; "
|
| 87 |
|
86 |
|
| 88 |
OraSession.CommitTrans
|
- |
|
| 89 |
|
- |
|
| 90 |
objEH.CatchORA ( OraSession )
|
87 |
objEH.CatchORA ( OraSession )
|
| 91 |
|
88 |
|
| 92 |
OraDatabase.Parameters.Remove "PV_ID"
|
89 |
OraDatabase.Parameters.Remove "PV_ID"
|
| 93 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
90 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 94 |
OraDatabase.Parameters.Remove "USER_ID"
|
91 |
OraDatabase.Parameters.Remove "USER_ID"
|
| Line 191... |
Line 188... |
| 191 |
' Currently, this function is called internally as part of the bulk release operation, and from _generate_release_notes.asp,
|
188 |
' Currently, this function is called internally as part of the bulk release operation, and from _generate_release_notes.asp,
|
| 192 |
' loaded by _make_released.asp which in turn is loaded when a user presses the btnMakeReleased action button for manual
|
189 |
' loaded by _make_released.asp which in turn is loaded when a user presses the btnMakeReleased action button for manual
|
| 193 |
' built pending versions. It initiates the execution of the windows script file that performs additional database updates
|
190 |
' built pending versions. It initiates the execution of the windows script file that performs additional database updates
|
| 194 |
' that are needed to make official a package version that has already been built and published into dpkg_archive. This includes
|
191 |
' that are needed to make official a package version that has already been built and published into dpkg_archive. This includes
|
| 195 |
' collecting info on all files that were published to dpkg_archive, and inserting that info into the RELEASED_COMPONENTS table.
|
192 |
' collecting info on all files that were published to dpkg_archive, and inserting that info into the RELEASED_COMPONENTS table.
|
| 196 |
Sub PUBLIC_Run_onMakeOfficial ( nRtag_id, nPv_id )
|
193 |
Function PUBLIC_Run_onMakeOfficial ( nRtag_id, nPv_id )
|
| 197 |
|
194 |
|
| 198 |
Dim objWSH, proj_id, Qry, sRtagName
|
195 |
Dim objWSH, proj_id, Qry, sRtagName
|
| 199 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
- |
|
| 200 |
|
196 |
|
| 201 |
OraSession.BeginTrans
|
197 |
PUBLIC_Run_onMakeOfficial = FALSE
|
| 202 |
OraDatabase.ExecuteSQL " UPDATE package_versions "&_
|
- |
|
| 203 |
" SET release_notes_info = '"& enum_RELEASE_NOTES_GENERATING &"'"&_
|
- |
|
| 204 |
" WHERE pv_id = "& nPv_id
|
- |
|
| 205 |
|
198 |
|
| 206 |
OraSession.CommitTrans
|
199 |
On Error Resume Next
|
| 207 |
|
- |
|
| 208 |
'Used for getting the package name and package version
|
- |
|
| 209 |
OraDatabase.Parameters.Add "RTAG_ID", nRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
- |
|
| 210 |
|
200 |
|
| 211 |
Set Qry = OraDatabase.DbCreateDynaset( "SELECT * FROM RELEASE_TAGS WHERE RTAG_ID = :RTAG_ID", 0 )
|
201 |
objEH.TryORA ( OraSession )
|
| 212 |
|
202 |
|
| 213 |
proj_id = Qry("proj_id")
|
203 |
OraDatabase.ExecuteSQL " UPDATE package_versions "&_
|
| - |
|
204 |
" SET release_notes_info = '"& enum_RELEASE_NOTES_GENERATING &"'"&_
|
| 214 |
sRtagName = UCase( Qry("rtag_name") )
|
205 |
" WHERE pv_id = "& nPv_id
|
| 215 |
|
206 |
|
| 216 |
Qry.Close()
|
- |
|
| 217 |
Set Qry = Nothing
|
207 |
objEH.CatchORA ( OraSession )
|
| 218 |
|
208 |
|
| 219 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
209 |
If objEH.LastOraFailed = FALSE Then
|
| 220 |
|
210 |
|
| - |
|
211 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
| - |
|
212 |
'Used for getting the package name and package version
|
| - |
|
213 |
OraDatabase.Parameters.Add "RTAG_ID", nRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| - |
|
214 |
|
| - |
|
215 |
Set Qry = OraDatabase.DbCreateDynaset( "SELECT * FROM RELEASE_TAGS WHERE RTAG_ID = :RTAG_ID", 0 )
|
| - |
|
216 |
|
| - |
|
217 |
proj_id = Qry("proj_id")
|
| - |
|
218 |
sRtagName = UCase( Qry("rtag_name") )
|
| - |
|
219 |
|
| - |
|
220 |
Qry.Close()
|
| - |
|
221 |
Set Qry = Nothing
|
| - |
|
222 |
|
| - |
|
223 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| - |
|
224 |
|
| 221 |
'If proj_id = 281 Or proj_id = 221 Then
|
225 |
'If proj_id = 281 Or proj_id = 221 Then
|
| 222 |
' objWSH.Run "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER_STEP &"\on_Make_Official.wsf //job:GetComponents //job:GenerateReleaseNotes //job:PostRun "&_
|
226 |
' objWSH.Run "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER_STEP &"\on_Make_Official.wsf //job:GetComponents //job:GenerateReleaseNotes //job:PostRun "&_
|
| 223 |
' "/pv_id:"& nPv_id , _
|
227 |
' "/pv_id:"& nPv_id , _
|
| 224 |
' 0, False
|
228 |
' 0, False
|
| 225 |
'Else
|
229 |
'Else
|
| 226 |
objWSH.Run "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:GetComponents //job:GenerateReleaseNotes //job:PostRun "&_
|
230 |
objWSH.Run "cmd.exe /c cscript.exe //B //NoLogo "& rootPath & SCRIPTS_FOLDER &"\on_Make_Official.wsf //job:GetComponents //job:GenerateReleaseNotes //job:PostRun "&_
|
| 227 |
"/pv_id:"& nPv_id & " /proj_id:"& proj_id &" /rtag_name:"""&sRtagName&"", _
|
231 |
"/pv_id:"& nPv_id & " /proj_id:"& proj_id &" /rtag_name:"""&sRtagName&"", _
|
| 228 |
0, False
|
232 |
0, False
|
| 229 |
'End If
|
233 |
'End If
|
| 230 |
Set objWSH = nothing
|
234 |
Set objWSH = nothing
|
| 231 |
|
235 |
|
| - |
|
236 |
PUBLIC_Run_onMakeOfficial = TRUE
|
| 232 |
End Sub
|
237 |
End If
|
| 233 |
|
238 |
|
| - |
|
239 |
End Function
|
| 234 |
'-----------------------------------------------------------------------------------------------------------------------------
|
240 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 235 |
' This sub is used from _make_released.asp, loaded when a user presses the btnMakeReleased action button, as well as from
|
241 |
' This sub is used from _make_released.asp, loaded when a user presses the btnMakeReleased action button, as well as from
|
| 236 |
' internally within this file as part of the bulk release operation.
|
242 |
' internally within this file as part of the bulk release operation.
|
| 237 |
' This function basically removes the PV_ID entry from the WIP/PLANNED table, and adds it to the RELEASE_CONTENT table.
|
243 |
' This function basically removes the PV_ID entry from the WIP/PLANNED table, and adds it to the RELEASE_CONTENT table.
|
| 238 |
Sub PUBLIC_MakeRelease ( NNrtag_id, NNpv_id )
|
244 |
Function PUBLIC_MakeRelease ( NNrtag_id, NNpv_id )
|
| 239 |
|
245 |
|
| 240 |
On Error Resume Next
|
246 |
On Error Resume Next
|
| 241 |
objEH.ErrorRedirect = TRUE
|
247 |
objEH.ErrorRedirect = TRUE
|
| 242 |
|
248 |
|
| 243 |
OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
249 |
OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 244 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
250 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 245 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
251 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 246 |
|
252 |
|
| 247 |
objEH.TryORA ( OraSession )
|
253 |
objEH.TryORA ( OraSession )
|
| 248 |
|
254 |
|
| 249 |
OraSession.BeginTrans
|
- |
|
| 250 |
|
- |
|
| 251 |
OraDatabase.ExecuteSQL _
|
255 |
OraDatabase.ExecuteSQL _
|
| 252 |
"BEGIN "&_
|
256 |
"BEGIN "&_
|
| 253 |
" PK_ENVIRONMENT.MAKE_RELEASE ( :PV_ID, :RTAG_ID, :USER_ID );"&_
|
257 |
" PK_ENVIRONMENT.MAKE_RELEASE ( :PV_ID, :RTAG_ID, :USER_ID );"&_
|
| 254 |
"END; "
|
258 |
"END; "
|
| 255 |
|
259 |
|
| 256 |
OraSession.CommitTrans
|
- |
|
| 257 |
|
- |
|
| 258 |
objEH.CatchORA ( OraSession )
|
260 |
objEH.CatchORA ( OraSession )
|
| 259 |
|
261 |
|
| 260 |
OraDatabase.Parameters.Remove "PV_ID"
|
262 |
OraDatabase.Parameters.Remove "PV_ID"
|
| 261 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
263 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 262 |
OraDatabase.Parameters.Remove "USER_ID"
|
264 |
OraDatabase.Parameters.Remove "USER_ID"
|
| - |
|
265 |
|
| - |
|
266 |
' return TRUE if operation was successful, else FALSE
|
| - |
|
267 |
If objEH.LastOraFailed Then
|
| - |
|
268 |
PUBLIC_MakeRelease = FALSE
|
| - |
|
269 |
Else
|
| - |
|
270 |
PUBLIC_MakeRelease = TRUE
|
| 263 |
End Sub
|
271 |
End If
|
| - |
|
272 |
|
| - |
|
273 |
End Function
|
| 264 |
|
274 |
|
| 265 |
|
275 |
|
| 266 |
'=============================================================================================================================
|
276 |
'=============================================================================================================================
|
| 267 |
' APPROVING AUTO/MANUAL BUILD PENDING VERSIONS - Used from _make_approved.asp as well as from within this file itself
|
277 |
' APPROVING AUTO/MANUAL BUILD PENDING VERSIONS - Used from _make_approved.asp as well as from within this file itself
|
| 268 |
'
|
278 |
'
|
| Line 359... |
Line 369... |
| 359 |
rsTemp.Close
|
369 |
rsTemp.Close
|
| 360 |
Set rsTemp = nothing
|
370 |
Set rsTemp = nothing
|
| 361 |
|
371 |
|
| 362 |
End Sub
|
372 |
End Sub
|
| 363 |
'-------------------------------------------------------------------------------------
|
373 |
'-------------------------------------------------------------------------------------
|
| 364 |
Sub PRIVATE_SendOwnerEmail (NNrtag_id, NNpv_id, EmailBody)
|
- |
|
| 365 |
Dim myMail, rsQry, EmailAutoBuild, comments, release, package
|
- |
|
| 366 |
|
- |
|
| 367 |
EmailAutoBuild = ReadFile( rootPath & "queries\EmailAutoBuild.sql" )
|
- |
|
| 368 |
EmailAutoBuild = Replace( EmailAutoBuild, ":PV_ID", NNpv_id)
|
- |
|
| 369 |
EmailAutoBuild = Replace( EmailAutoBuild, ":RTAG_ID", NNrtag_id)
|
- |
|
| 370 |
|
- |
|
| 371 |
Set rsQry = OraDatabase.DbCreateDynaset( EmailAutoBuild , cint(0))
|
- |
|
| 372 |
If rsQry("comments") <> "" Then
|
- |
|
| 373 |
comments = comments & "<table width='100%' border='0' cellspacing='0' cellpadding='1'>"
|
- |
|
| 374 |
comments = comments & "<tr>"
|
- |
|
| 375 |
comments = comments & "<td background='#CAC5B8' nowrap class='form_field'><font size='2' face='tahoma,sans-serif'><b>Reason For Release</b></font></td>"
|
- |
|
| 376 |
comments = comments & "</tr>"
|
- |
|
| 377 |
comments = comments & "<tr>"
|
- |
|
| 378 |
comments = comments & "<td background='#CAC5B8' nowrap class='form_item'><font size='1' face='tahoma,sans-serif'>"&NewLine_To_BR((rsQry("comments")))&"</font></td>"
|
- |
|
| 379 |
comments = comments & "</tr>"
|
- |
|
| 380 |
comments = comments & "</table>"
|
- |
|
| 381 |
comments = comments & "<br>"
|
- |
|
| 382 |
End If
|
- |
|
| 383 |
|
- |
|
| 384 |
Err.Clear
|
- |
|
| 385 |
On Error Resume Next
|
- |
|
| 386 |
If rsQry("owner_email") <> "" Then
|
- |
|
| 387 |
Set myMail=Server.CreateObject("Persits.MailSender")
|
- |
|
| 388 |
myMail.Host = SMTP_HOST
|
- |
|
| 389 |
myMail.Subject="Build required for package "& rsQry("pkg_name") &" in Project " & rsQry("proj_name") &" on Release Branch " & rsQry("rtag_name")
|
- |
|
| 390 |
release = release & "<table width='100%' border='0' cellspacing='0' cellpadding='1'>"
|
- |
|
| 391 |
release = release & "<tr>"
|
- |
|
| 392 |
release = release & "<td background='#CAC5B8' nowrap class='form_field'><font size='2' face='tahoma,sans-serif'><b>Release</b></font></td>"
|
- |
|
| 393 |
release = release & "</tr>"
|
- |
|
| 394 |
release = release & "<tr>"
|
- |
|
| 395 |
release = release & "<td background='#CAC5B8' nowrap class='form_item'><a href='http://erg:8002/ManagerSuite/Release_Manager/dependencies.asp?rtag_id="_
|
- |
|
| 396 |
& NNrtag_id & "'><font size='1' face='tahoma,sans-serif'>"&rsQry("rtag_name")&"</font></a></td>"
|
- |
|
| 397 |
release = release & "</tr>"
|
- |
|
| 398 |
release = release & "</table>"
|
- |
|
| 399 |
release = release & "<br>"
|
- |
|
| 400 |
|
- |
|
| 401 |
package = package & "<table width='100%' border='0' cellspacing='0' cellpadding='1'>"
|
- |
|
| 402 |
package = package & "<tr>"
|
- |
|
| 403 |
package = package & "<td background='#CAC5B8' nowrap class='form_field'><font size='2' face='tahoma,sans-serif'><b>Package</b></font></td>"
|
- |
|
| 404 |
package = package & "</tr>"
|
- |
|
| 405 |
package = package & "<tr>"
|
- |
|
| 406 |
package = package & "<td background='#CAC5B8' nowrap class='form_item'><a href='http://erg:8002/ManagerSuite/Release_Manager/fixed_issues.asp?pv_id=" _
|
- |
|
| 407 |
& NNpv_id & "&rtag_id=" & NNrtag_id & "'><font size='1' face='tahoma,sans-serif'>"&rsQry("pkg_name")&" "&rsQry("pkg_version")&"</font></a></td>"
|
- |
|
| 408 |
package = package & "</tr>"
|
- |
|
| 409 |
package = package & "</table>"
|
- |
|
| 410 |
package = package & "<br>"
|
- |
|
| 411 |
|
- |
|
| 412 |
EmailBody = release & package & comments & EmailBody
|
- |
|
| 413 |
myMail.IsHTML = True
|
- |
|
| 414 |
myMail.Body = EmailBody
|
- |
|
| 415 |
myMail.From=ADMIN_EMAIL
|
- |
|
| 416 |
|
- |
|
| 417 |
' if before 8AM or after 5PM then send to owners personal email address else send to their work email address
|
- |
|
| 418 |
If Timer < 28800 OR Timer > 61200 Then
|
- |
|
| 419 |
If rsQry("owner_personal_email") <> "" Then
|
- |
|
| 420 |
myMail.AddAddress rsQry("owner_personal_email")
|
- |
|
| 421 |
Else
|
- |
|
| 422 |
myMail.AddAddress rsQry("owner_email")
|
- |
|
| 423 |
End If
|
- |
|
| 424 |
Else
|
- |
|
| 425 |
myMail.AddAddress rsQry("owner_email")
|
- |
|
| 426 |
End If
|
- |
|
| 427 |
|
- |
|
| 428 |
myMail.Send
|
- |
|
| 429 |
set myMail=nothing
|
- |
|
| 430 |
End If
|
- |
|
| 431 |
End Sub
|
- |
|
| 432 |
'-------------------------------------------------------------------------------------
|
- |
|
| 433 |
Sub PRIVATE_MakeApproved (NNrtag_id, NNpv_id)
|
374 |
Function PRIVATE_MakeApproved (NNrtag_id, NNpv_id)
|
| 434 |
|
375 |
|
| 435 |
OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
376 |
OraDatabase.Parameters.Add "PV_ID", NNpv_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 436 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
377 |
OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 437 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
378 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 438 |
|
379 |
|
| - |
|
380 |
objEH.TryORA ( OraSession )
|
| 439 |
OraSession.BeginTrans
|
381 |
On Error Resume Next
|
| 440 |
|
382 |
|
| 441 |
OraDatabase.ExecuteSQL _
|
383 |
OraDatabase.ExecuteSQL _
|
| 442 |
"BEGIN "&_
|
384 |
"BEGIN "&_
|
| 443 |
" PK_ENVIRONMENT.MAKE_APPROVED ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
|
385 |
" PK_ENVIRONMENT.MAKE_APPROVED ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
|
| 444 |
"END; "
|
386 |
"END; "
|
| 445 |
|
387 |
|
| 446 |
OraSession.CommitTrans
|
388 |
objEH.CatchORA ( OraSession )
|
| 447 |
|
389 |
|
| 448 |
OraDatabase.Parameters.Remove "PV_ID"
|
390 |
OraDatabase.Parameters.Remove "PV_ID"
|
| 449 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
391 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 450 |
OraDatabase.Parameters.Remove "USER_ID"
|
392 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 451 |
End Sub
|
- |
|
| 452 |
'-------------------------------------------------------------------------------------
|
- |
|
| 453 |
Function PRIVATE_Get_EmailBody(NNrtag_id, NNpv_id)
|
- |
|
| 454 |
|
- |
|
| 455 |
Dim SSsql, rsCQ
|
- |
|
| 456 |
|
- |
|
| 457 |
PRIVATE_Get_EmailBody = ""
|
- |
|
| 458 |
|
- |
|
| 459 |
Set rsCQ = Server.CreateObject("ADODB.Recordset")
|
- |
|
| 460 |
' All Requirements OK
|
- |
|
| 461 |
'COMPLETE THE REQUEST...
|
- |
|
| 462 |
Call PRIVATE_Get_Package_Issues(NNpv_id, SSsql)
|
- |
|
| 463 |
|
- |
|
| 464 |
If PRIVATE_Get_CQ_Issues ( SSsql, rsCQ ) = 0 Then
|
- |
|
| 465 |
Dim EmailBody
|
- |
|
| 466 |
|
- |
|
| 467 |
EmailBody = "<font size='2' face='tahoma,sans-serif'><b>Fixed Issues</b></font>"
|
- |
|
| 468 |
EmailBody = EmailBody & "<table width='100%' border='1' cellspacing='0' cellpadding='1'>"
|
- |
|
| 469 |
EmailBody = EmailBody & "<tr>"
|
- |
|
| 470 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap class='form_field'><font size='1' face='tahoma,sans-serif'>Issue Id </font></td>"
|
- |
|
| 471 |
|
- |
|
| 472 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap class='form_field'><font size='1' face='tahoma,sans-serif'>Summary</font></td>"
|
- |
|
| 473 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap class='form_field'><font size='1' face='tahoma,sans-serif'>Issue Type </font></td>"
|
- |
|
| 474 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap class='form_field'><font size='1' face='tahoma,sans-serif'>Priority</font></td>"
|
- |
|
| 475 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap class='form_field'><font size='1' face='tahoma,sans-serif'>Status</font></td>"
|
- |
|
| 476 |
|
- |
|
| 477 |
EmailBody = EmailBody & "</tr>"
|
- |
|
| 478 |
If ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF)) Then
|
- |
|
| 479 |
While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))
|
- |
|
| 480 |
EmailBody = EmailBody & "<tr>"
|
- |
|
| 481 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap class='form_item'><font size='1' face='tahoma,sans-serif'>"&rsCQ("iss_num")&"</font></td>"
|
- |
|
| 482 |
EmailBody = EmailBody & "<td background='#CAC5B8' class='form_item'><font size='1' face='tahoma,sans-serif'>"&NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )&"</font></td>"
|
- |
|
| 483 |
EmailBody = EmailBody & "<td nowrap background='#CAC5B8' class='form_item'><font size='1' face='tahoma,sans-serif'>"&rsCQ("issue_type")&"</font></td>"
|
- |
|
| 484 |
EmailBody = EmailBody & "<td nowrap background='#CAC5B8' class='form_item'><font size='1' face='tahoma,sans-serif'>"&rsCQ("priority")&"</font></td>"
|
- |
|
| 485 |
EmailBody = EmailBody & "<td nowrap background='#CAC5B8' class='form_item'><font size='1' face='tahoma,sans-serif'>"&rsCQ("Status")&"</font></td>"
|
- |
|
| 486 |
EmailBody = EmailBody & "</tr>"
|
- |
|
| 487 |
rsCQ.MoveNext
|
- |
|
| 488 |
WEnd
|
- |
|
| 489 |
rsCQ.Close
|
- |
|
| 490 |
Else
|
- |
|
| 491 |
EmailBody = EmailBody & "<tr>"
|
- |
|
| 492 |
EmailBody = EmailBody & "<td background='#CAC5B8' nowrap></td>"
|
- |
|
| 493 |
EmailBody = EmailBody & "<td background='#CAC5B8' class='form_item'></td>"
|
- |
|
| 494 |
EmailBody = EmailBody & "<td background='#CAC5B8' class='form_item'></td>"
|
- |
|
| 495 |
EmailBody = EmailBody & "<td background='#CAC5B8' class='form_item'></td>"
|
- |
|
| 496 |
EmailBody = EmailBody & "<td background='#CAC5B8' class='form_item'></td>"
|
- |
|
| 497 |
EmailBody = EmailBody & "</tr>"
|
- |
|
| 498 |
End If
|
- |
|
| 499 |
|
- |
|
| 500 |
EmailBody = EmailBody & "</table>"
|
- |
|
| 501 |
|
393 |
|
| - |
|
394 |
' return TRUE if operation was successful, else FALSE
|
| - |
|
395 |
If objEH.LastOraFailed Then
|
| 502 |
PRIVATE_Get_EmailBody = EmailBody
|
396 |
PRIVATE_MakeApproved = FALSE
|
| - |
|
397 |
Else
|
| - |
|
398 |
PRIVATE_MakeApproved = TRUE
|
| 503 |
End If
|
399 |
End If
|
| 504 |
End Function
|
- |
|
| 505 |
|
400 |
|
| - |
|
401 |
End Function
|
| 506 |
'-------------------------------------------------------------------------------------
|
402 |
'-------------------------------------------------------------------------------------
|
| 507 |
' This function is called from _make_approved.asp, which is loaded when the btnApprovePackage
|
403 |
' This function is called from _make_approved.asp, which is loaded when the btnApprovePackage
|
| 508 |
' action button is pressed. It is also called as part of the bulk release operation.
|
404 |
' action button is pressed. It is also called as part of the bulk release operation.
|
| 509 |
Function PUBLIC_ApproveRelease(NNrtag_id, NNpv_id, ByRef retParameters)
|
405 |
Function PUBLIC_ApproveRelease(NNrtag_id, NNpv_id, ByRef retParameters, isBulk)
|
| 510 |
|
406 |
|
| 511 |
Dim retERRmsg
|
407 |
Dim retERRmsg
|
| 512 |
Dim retALRTmsg
|
408 |
Dim retALRTmsg
|
| 513 |
Dim pkgType
|
409 |
Dim pkgType
|
| 514 |
|
410 |
|
| Line 520... |
Line 416... |
| 520 |
' default return value
|
416 |
' default return value
|
| 521 |
PUBLIC_ApproveRelease = FALSE
|
417 |
PUBLIC_ApproveRelease = FALSE
|
| 522 |
|
418 |
|
| 523 |
If ( NNrtag_id <> "") AND (NNpv_id <> "") Then
|
419 |
If ( NNrtag_id <> "") AND (NNpv_id <> "") Then
|
| 524 |
|
420 |
|
| 525 |
'Check If There Already Exists A WIP Instance Of The Package In The Release
|
- |
|
| 526 |
If Check_Package_WIP_Already_Exists(NNrtag_id, NNpv_id) > 0 Then
|
- |
|
| 527 |
Call RaiseMsg ( enum_MSG_PACKAGE_WIP_EXISTS&"?rtag_id="& NNrtag_id & "&pv_id="& NNpv_id & "", NNpv_id )
|
- |
|
| 528 |
' RaiseMsg redirects loaded web page, so no return
|
- |
|
| 529 |
Else
|
- |
|
| 530 |
'-- Get Package details
|
421 |
'-- Get Package details
|
| 531 |
Call Get_Pkg_Info ( NNpv_id, NNrtag_id )
|
422 |
Call Get_Pkg_Info ( NNpv_id, NNrtag_id )
|
| 532 |
|
- |
|
| 533 |
If pkgInfoHash.Item("build_type") = "A" Then
|
- |
|
| 534 |
If PRIVATE_Is_Allowed_To_Approve_AutoBuild(NNrtag_id) Then
|
- |
|
| 535 |
'-- Approve Automatic-build package
|
- |
|
| 536 |
Call CheckRequirementsForMakeApproved ( NNpv_id, NNrtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
|
- |
|
| 537 |
If IsNull(retERRmsg) Then
|
- |
|
| 538 |
Dim EmailBody
|
- |
|
| 539 |
|
- |
|
| 540 |
EmailBody = PRIVATE_Get_EmailBody (NNrtag_id, NNpv_id)
|
- |
|
| 541 |
|
- |
|
| 542 |
Call PRIVATE_MakeApproved (NNrtag_id, NNpv_id)
|
- |
|
| 543 |
|
- |
|
| 544 |
Call PRIVATE_SendOwnerEmail(NNrtag_id, NNpv_id, EmailBody)
|
- |
|
| 545 |
|
423 |
|
| - |
|
424 |
If pkgInfoHash.Item("build_type") = "A" Then
|
| - |
|
425 |
'Check If There Already Exists A WIP Instance Of The Package In The Release
|
| - |
|
426 |
If Check_Package_WIP_Already_Exists(NNrtag_id, NNpv_id) > 0 Then
|
| - |
|
427 |
RaiseWIPExists = TRUE
|
| - |
|
428 |
End If
|
| - |
|
429 |
|
| - |
|
430 |
If PRIVATE_Is_Allowed_To_Approve_AutoBuild(NNrtag_id) Then
|
| - |
|
431 |
'-- Approve Automatic-build package
|
| - |
|
432 |
Call CheckRequirementsForMakeApproved ( NNpv_id, NNrtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
|
| - |
|
433 |
If IsNull(retERRmsg) Then
|
| - |
|
434 |
Dim EmailBody
|
| - |
|
435 |
|
| - |
|
436 |
If PRIVATE_MakeApproved (NNrtag_id, NNpv_id) = TRUE Then
|
| - |
|
437 |
|
| - |
|
438 |
If ( RaiseWIPExists = TRUE ) AND ( isBulk = FALSE ) Then
|
| - |
|
439 |
Call RaiseMsg ( enum_MSG_PACKAGE_WIP_EXISTS&"?rtag_id="& NNrtag_id & "&pv_id="& NNpv_id & "", NNpv_id )
|
| - |
|
440 |
' RaiseMsg redirects loaded web page, so no return
|
| - |
|
441 |
' Deal with BulkMakeRelease elsewhere
|
| - |
|
442 |
End If
|
| 546 |
' indicate success
|
443 |
' indicate success
|
| 547 |
PUBLIC_ApproveRelease = TRUE
|
444 |
PUBLIC_ApproveRelease = TRUE
|
| - |
|
445 |
End If
|
| 548 |
Else
|
446 |
Else
|
| 549 |
Call RaiseMsg ( Eval(retERRmsg), NNrtag_id & "|" & NNpv_id & "|" & retParameters & "|" & "N" )
|
447 |
Call RaiseMsg ( Eval(retERRmsg), NNrtag_id & "|" & NNpv_id & "|" & retParameters & "|" & "N" )
|
| 550 |
End If
|
448 |
End If
|
| 551 |
Else
|
449 |
Else
|
| 552 |
' Indicate an auto-build permission problem was detected in the global variable.
|
450 |
' Indicate an auto-build permission problem was detected in the global variable.
|
| 553 |
' This is only used within the context of a bulk release.
|
451 |
' This is only used within the context of a bulk release.
|
| 554 |
AutoBuildPermissionDenied = TRUE
|
452 |
AutoBuildPermissionDenied = TRUE
|
| 555 |
End If
|
453 |
End If
|
| 556 |
Else
|
454 |
Else
|
| 557 |
If PRIVATE_Is_Allowed_To_Approve_ManualBuild(NNrtag_id) Then
|
455 |
If PRIVATE_Is_Allowed_To_Approve_ManualBuild(NNrtag_id) Then
|
| 558 |
'-- Approve a Manual Build Release
|
456 |
'-- Approve a Manual Build Release
|
| 559 |
Call CheckRequirementsForMakeRelease ( NNpv_id, NNrtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
|
457 |
Call CheckRequirementsForMakeRelease ( NNpv_id, NNrtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
|
| 560 |
If IsNull(retERRmsg) Then
|
458 |
If IsNull(retERRmsg) Then
|
| 561 |
|
459 |
|
| 562 |
Call PUBLIC_MakeRelease ( NNrtag_id, NNpv_id )
|
460 |
If PUBLIC_MakeRelease ( NNrtag_id, NNpv_id ) = TRUE Then
|
| 563 |
' If all went well, initiate the generation of release notes, and email any interested parties
|
461 |
' If all went well, initiate the generation of release notes, and email any interested parties
|
| 564 |
|
- |
|
| 565 |
If objEH.Finally Then
|
- |
|
| 566 |
Call PUBLIC_Run_onMakeOfficial ( NNrtag_id, NNpv_id )
|
462 |
If PUBLIC_Run_onMakeOfficial ( NNrtag_id, NNpv_id ) = TRUE Then
|
| 567 |
|
- |
|
| 568 |
Call PUBLIC_NotifyInterestManualBuild( NNrtag_id, NNpv_id )
|
463 |
Call PUBLIC_NotifyInterestManualBuild( NNrtag_id, NNpv_id )
|
| 569 |
|
464 |
|
| 570 |
' indicate success
|
465 |
' indicate success
|
| 571 |
PUBLIC_ApproveRelease = TRUE
|
466 |
PUBLIC_ApproveRelease = TRUE
|
| 572 |
End If
|
467 |
End If
|
| - |
|
468 |
End If
|
| 573 |
Else
|
469 |
Else
|
| 574 |
Call RaiseMsg ( Eval(retERRmsg), NNrtag_id & "|" & NNpv_id & "|" & retParameters & "|" & "N" )
|
470 |
Call RaiseMsg ( Eval(retERRmsg), NNrtag_id & "|" & NNpv_id & "|" & retParameters & "|" & "N" )
|
| 575 |
End If
|
471 |
End If
|
| 576 |
Else
|
472 |
Else
|
| 577 |
' Indicate a manual-build permission problem was detected in the global variable
|
473 |
' Indicate a manual-build permission problem was detected in the global variable
|
| 578 |
' This is only used within the context of a bulk release.
|
474 |
' This is only used within the context of a bulk release.
|
| 579 |
ManualBuildPermissionDenied = TRUE
|
475 |
ManualBuildPermissionDenied = TRUE
|
| 580 |
End If
|
- |
|
| 581 |
End If
|
476 |
End If
|
| 582 |
End If
|
477 |
End If
|
| 583 |
End If
|
478 |
End If
|
| 584 |
End Function
|
479 |
End Function
|
| 585 |
'-----------------------------------------------------------------------------------------------------------------------------
|
480 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 586 |
|
481 |
|
| 587 |
|
482 |
|
| Line 674... |
Line 569... |
| 674 |
remainingList2(len_remainingList - 1) = pvId
|
569 |
remainingList2(len_remainingList - 1) = pvId
|
| 675 |
End If
|
570 |
End If
|
| 676 |
Next
|
571 |
Next
|
| 677 |
|
572 |
|
| 678 |
' Now process each new Auto/Manaul build item in the string array
|
573 |
' Now process each new Auto/Manaul build item in the string array
|
| - |
|
574 |
RaiseWIPExists = FALSE
|
| 679 |
For Each pvId In remainingList2
|
575 |
For Each pvId In remainingList2
|
| 680 |
Call PUBLIC_ApproveRelease(NNrtag_id, pvId, retParameters)
|
576 |
Call PUBLIC_ApproveRelease(NNrtag_id, pvId, retParameters, TRUE)
|
| 681 |
Next
|
577 |
Next
|
| - |
|
578 |
If ( RaiseWIPExists = TRUE ) Then
|
| - |
|
579 |
Call RaiseMsg ( enum_MSG_PACKAGE_WIP_EXISTS&"?rtag_id="& NNrtag_id & "&pv_id="& pvId & "", pvId )
|
| - |
|
580 |
' RaiseMsg redirects loaded web page, so no return
|
| - |
|
581 |
End If
|
| 682 |
|
582 |
|
| 683 |
|
583 |
|
| 684 |
' If any items were not approved for release due to permission errors, issue an alert to the user
|
584 |
' If any items were not approved for release due to permission errors, issue an alert to the user
|
| 685 |
If AutoBuildPermissionDenied = TRUE OR ManualBuildPermissionDenied = TRUE Then
|
585 |
If AutoBuildPermissionDenied = TRUE OR ManualBuildPermissionDenied = TRUE Then
|
| 686 |
Call RaiseMsg( enum_MSG_ERROR, "One of more items could not be approved due to missing permissions (either ApproveForAutoBuild or ApproveForManualBuild).<p>"_
|
586 |
Call RaiseMsg( enum_MSG_ERROR, "One of more items could not be approved due to missing permissions (either ApproveForAutoBuild or ApproveForManualBuild).<p>"_
|