Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
123 ghuddy 5
'|                       DIFF                        |
119 ghuddy 6
'|                                                   |
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
123 ghuddy 12
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 13
%>
14
 
15
<%
16
'To enable the script timeout to 20 mins
17
Server.ScriptTimeout=1200
18
%>
19
<!--#include file="common/conf.asp"-->
20
<!--#include file="common/globals.asp"-->
21
<!--#include file="common/formating.asp"-->
22
<!--#include file="common/qstr.asp"-->
23
<!--#include file="common/common_subs.asp"-->
24
<!--#include file="common/common_dbedit.asp"-->
25
<!--#include file="common/_form_window_common.asp"-->
26
<!--#include file="common/_rtree_common.asp"-->
27
<%
28
' Set rfile parameter. This is a return page after Login
29
'Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
30
'objPMod.PersistInQryString("proj_id")
31
'------------ ACCESS CONTROL ------------------
32
%>
33
<!--#include file="_access_control_login.asp"-->
34
<!--#include file="_access_control_general.asp"-->
35
<%
36
'------------ Variable Definition -------------
37
Dim rsQry
38
Dim objRelCollectorA
39
Dim objRelCollectorB
40
Dim parRtagA
41
Dim parRtagB
42
Dim dDiffFilter
43
Dim colorA, colorB, ChangeTypeIcon
44
Dim btnMerge, btnRemove
45
Dim rowId
46
Dim email
47
Dim FSO
48
Dim NewTextFile
49
Dim pkgA, pkgB, pkgname, delimiter, rsQryA, rsQryB, rsQryCommentsA, rsQryCommentsB, sqlstrA, counterA, sqlstrB, counterB
50
Dim SSsql, retVal, rsCQ, DEVIiss, TDSEiss, VT5DMiss, VTSUPiss
51
Dim a, b, c, d, pkgversion, errormsg, source_change, ChangeASource, ChangeAUpdate, ChangeBSource, ChangeBUpdate, pvCollectionA, pvCollectionB
52
Dim changeType
123 ghuddy 53
Dim pendingAdditions
119 ghuddy 54
 
55
'------------ Constants Declaration -----------
56
Const LIMG_UPDATED = "<img src='images/i_updated.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Updated'>"
57
Const LIMG_RIPPLED = "<img src='images/i_rippled.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Rippled'>"
58
Const LIMG_ADDED = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Added'>"
59
Const LIMG_REMOVED = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='Removed'>"
60
Const LIMG_FILTER_ON = "<img src='images/i_data_table.gif' border='0' align='absmiddle' hspace='0' title='Filter in use.'>"
61
Const LIMG_FILTER_OFF = "<img src='images/i_data_table_off.gif' border='0' align='absmiddle' hspace='0' title='Filter not in use.'>"
62
Const LIMG_DROP_DOWN_ARROW = "<img src='images/i_drop_down_arrow.gif' width='5' height='15' hspace='1' border='0' align='absmiddle'>"
63
Const LCOLOR_NOT_CHANGED = "#F5F5F5"
64
Const LCOLOR_CHANGED = "#d2f7c9"
65
Const LCOLOR_RIPPLED = "#D8F8F8"
66
Const LCOLOR_BLANK = "#FFFFFF"
67
Const LIMG_MERGE = "<img src='images/bt_move_all_right.gif' title='Click to merge.' border='0'>"
68
Const LIMG_MERGE_WARN = "<img src='images/bt_move_warn_right.gif' title='Right hand side version is newer.' border='0'>"
69
Const LIMG_REMOVE = "<img src='images/bt_remove.gif' title='Remove this version from release.' border='0'>"
70
Const LIMG_UNDO = "<img src='images/bt_undo.gif' title='Undo merge/remove.' border='0'>"
71
'------------ Variable Init -------------------
72
Set rsCQ = Server.CreateObject("ADODB.Recordset")
73
parRtagA = Request("rtagA")
74
parRtagB = Request("rtagB")
75
Set objRelCollectorA = CreateObject("Scripting.Dictionary")
76
Set objRelCollectorB = CreateObject("Scripting.Dictionary")
77
Set dDiffFilter = CreateObject("Scripting.Dictionary")
123 ghuddy 78
Set pendingAdditions = CreateObject("Scripting.Dictionary")
119 ghuddy 79
'----------------------------------------------
80
If Request("btn") = "Mail Me Report" Then
123 ghuddy 81
   email = true
119 ghuddy 82
End If
83
%>
84
<%
85
'--------------------------------------------------------------------------------------------------------------------------
86
Sub GetDiffFilterValues ( outDepFilter )
123 ghuddy 87
   Dim FilterVal, aFilterValues
119 ghuddy 88
 
123 ghuddy 89
   If Request.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER) <> "" Then
90
      aFilterValues = Split( Replace( Request.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER), " ", ""), ",")
119 ghuddy 91
 
123 ghuddy 92
      For Each FilterVal In aFilterValues
93
         outDepFilter.Item (CStr( FilterVal )) = ""
94
      Next
119 ghuddy 95
 
123 ghuddy 96
   End If
119 ghuddy 97
 
98
End Sub
99
'--------------------------------------------------------------------------------------------------------------------------
100
Sub GetFixedIssues(pv_id)
131 ghuddy 101
   Set sqlstrA = OraDatabase.DbCreateDynaset("SELECT iss_db, iss_id, iss_state, notes FROM CQ_ISSUES WHERE pv_id="& pv_id &"  AND iss_state = "& enumISSUES_STATE_FIXED, cint(0))
119 ghuddy 102
 
123 ghuddy 103
      If sqlstrA.RecordCount <> 0 Then
104
         NewTextFile.WriteLine()
105
         NewTextFile.WriteLine("<blockquote><blockquote>Fixed Issues:</blockquote></blockquote>")
106
      End If
119 ghuddy 107
 
123 ghuddy 108
      For counterA=1 to sqlstrA.RecordCount
109
         DEVIiss = "-1"
110
         TDSEiss = "-1"
111
         VT5DMiss = "-1"
112
         VTSUPiss = "-1"
119 ghuddy 113
 
123 ghuddy 114
         If CInt(sqlstrA("iss_db")) = CInt(enumCLEARQUEST_DEVI_ID) Then
115
            DEVIiss = DEVIiss &","& sqlstrA("iss_id")
116
         ElseIf CInt(sqlstrA("iss_db")) = CInt(enumCLEARQUEST_TDSE_ID) Then
117
            TDSEiss = TDSEiss &","& sqlstrA("iss_id")
118
         ElseIf CInt(sqlstrA("iss_db")) = CInt(enumCLEARQUEST_VT5DM_ID) Then
119
            VT5DMiss = VT5DMiss &","& sqlstrA("iss_id")
120
         ElseIf CInt(sqlstrA("iss_db")) = CInt(enumCLEARQUEST_VTSUP_ID) Then
121
            VTSUPiss = VTSUPiss &","& sqlstrA("iss_id")
122
         End If
119 ghuddy 123
 
123 ghuddy 124
         SSsql = ReadFile( rootPath & "queries\cq_issues.sql" )
125
         SSsql = Replace( SSsql, "/*enumCLEARQUEST_DEVI_ID*/", enumCLEARQUEST_DEVI_ID)
126
         SSsql = Replace( SSsql, "/*enumCLEARQUEST_TDSE_ID*/", enumCLEARQUEST_TDSE_ID)
127
         SSsql = Replace( SSsql, "/*enumCLEARQUEST_VT5DM_ID*/", enumCLEARQUEST_VT5DM_ID)
128
         SSsql = Replace( SSsql, "/*enumCLEARQUEST_VTSUP_ID*/", enumCLEARQUEST_VTSUP_ID)
129
         SSsql = Replace( SSsql, "/*DEVIiss*/", DEVIiss)
130
         SSsql = Replace( SSsql, "/*TDSEiss*/", TDSEiss)
131
         SSsql = Replace( SSsql, "/*VT5DMiss*/", VT5DMiss)
132
         SSsql = Replace( SSsql, "/*VTSUPiss*/", VTSUPiss)
133
         retVal = Get_CQ_Issues ( SSsql, rsCQ )
119 ghuddy 134
 
123 ghuddy 135
         If rsCQ("iss_num") <> "" Then
136
            NewTextFile.Write("<blockquote><blockquote><blockquote>"&rsCQ("iss_num")&": ")
137
         End If
119 ghuddy 138
 
123 ghuddy 139
         If rsCQ("summary") <> "" Then
140
            NewTextFile.WriteLine(rsCQ("summary")&"</blockquote></blockquote></blockquote>")
141
         End If
119 ghuddy 142
 
123 ghuddy 143
         sqlstrA.MoveNext
144
      Next
145
      sqlstrA.Close()
119 ghuddy 146
End Sub
147
'--------------------------------------------------------------------------------------------------------------------------
148
Sub LastPvIdA(a)
149
 
123 ghuddy 150
   Dim qryA
131 ghuddy 151
   Set qryA = OraDatabase.DbCreateDynaset("SELECT LAST_PV_ID FROM PACKAGE_VERSIONS WHERE PV_ID="&a, cint(0))
119 ghuddy 152
 
123 ghuddy 153
   'If a <> qryA("last_pv_id") Then
154
      a = qryA("last_pv_id")
155
   'Else
156
   '   errormsg = true
157
   'End If
119 ghuddy 158
 
123 ghuddy 159
   If pvCollectionA.Exists(CStr(a)) Then
160
      errormsg = true
161
      Exit Sub
162
   End If
119 ghuddy 163
 
123 ghuddy 164
   qryA.Close()
119 ghuddy 165
End Sub
166
'--------------------------------------------------------------------------------------------------------------------------
167
Sub LastPvIdB(b)
123 ghuddy 168
   Dim qryB
131 ghuddy 169
   Set qryB = OraDatabase.DbCreateDynaset("SELECT LAST_PV_ID FROM PACKAGE_VERSIONS WHERE PV_ID="&b, cint(0))
119 ghuddy 170
 
123 ghuddy 171
   'If b <> qryB("last_pv_id") Then
172
      b = qryB("last_pv_id")
173
   'Else
174
   '   errormsg = true
175
   'End If
119 ghuddy 176
 
123 ghuddy 177
   If pvCollectionB.Exists(CStr(b)) Then
178
      errormsg = true
179
      Exit Sub
180
   End If
119 ghuddy 181
 
123 ghuddy 182
   qryB.Close()
119 ghuddy 183
End Sub
184
'--------------------------------------------------------------------------------------------------------------------------
185
Sub pkg_Version(pv)
123 ghuddy 186
   Dim qry
131 ghuddy 187
   Set qry = OraDatabase.DbCreateDynaset("SELECT PKG_VERSION FROM PACKAGE_VERSIONS WHERE PV_ID="&pv, cint(0))
123 ghuddy 188
   pkgversion = qry("pkg_version")
189
   qry.Close()
119 ghuddy 190
End Sub
191
'--------------------------------------------------------------------------------------------------------------------------
192
Sub LastPvIdAa(a)
123 ghuddy 193
   Dim qryA
131 ghuddy 194
   Set qryA = OraDatabase.DbCreateDynaset("SELECT LAST_PV_ID FROM PACKAGE_VERSIONS WHERE PV_ID="&a, cint(0))
123 ghuddy 195
   c = qryA("last_pv_id")
196
   qryA.Close()
119 ghuddy 197
End Sub
198
'--------------------------------------------------------------------------------------------------------------------------
199
Sub LastPvIdBb(b)
123 ghuddy 200
   Dim qryB
131 ghuddy 201
   Set qryB = OraDatabase.DbCreateDynaset("SELECT LAST_PV_ID FROM PACKAGE_VERSIONS WHERE PV_ID="&b, cint(0))
123 ghuddy 202
   d = qryB("last_pv_id")
203
   qryB.Close()
119 ghuddy 204
End Sub
205
'--------------------------------------------------------------------------------------------------------------------------
206
Sub Comments(Pv_Id)
123 ghuddy 207
   Dim comments
131 ghuddy 208
   Set comments = OraDatabase.DbCreateDynaset("SELECT COMMENTS, PKG_VERSION FROM PACKAGE_VERSIONS WHERE PV_ID="&Pv_id, cint(0))
119 ghuddy 209
 
123 ghuddy 210
   If comments("comments") <> "Rippled Build." Then
211
      NewTextFile.WriteLine("<blockquote><blockquote><font color="&chr(34)&"blue"&chr(34)&">Version: "& comments("pkg_version")&"</font></blockquote></blockquote>")
212
      If comments("comments") <> "" Then
213
         NewTextFile.WriteLine("<blockquote><blockquote>Comments: </blockquote></blockquote>")
214
         NewTextFile.WriteLine("<blockquote><blockquote><blockquote>"& TextToHTML(comments("comments")) &"</blockquote></blockquote></blockquote>")
215
         source_change = true
216
      End If
217
   End If
119 ghuddy 218
 
219
End Sub
220
'--------------------------------------------------------------------------------------------------------------------------
221
Sub Release(pvId)
123 ghuddy 222
   Dim release
131 ghuddy 223
   Set release = OraDatabase.DbCreateDynaset("SELECT INSERT_STAMP FROM RELEASE_CONTENT WHERE PV_ID="&pvId, cint(0))
119 ghuddy 224
 
123 ghuddy 225
   If release("insert_stamp") <> "" Then
226
      NewTextFile.Write(release("insert_stamp"))
227
   Else
228
      NewTextFile.Write("Version Not Used.")
229
   End If
119 ghuddy 230
 
231
End Sub
232
'--------------------------------------------------------------------------------------------------------------------------
233
Sub Header()
123 ghuddy 234
   NewTextFile.WriteLine("<html>")
119 ghuddy 235
End Sub
236
'--------------------------------------------------------------------------------------------------------------------------
237
Sub Footer()
123 ghuddy 238
   NewTextFile.WriteLine("</html>")
119 ghuddy 239
End Sub
240
'--------------------------------------------------------------------------------------------------------------------------
241
Sub Javascript()
123 ghuddy 242
   NewTextFile.WriteLine("<script language=""JavaScript"" type=""text/javascript"">")
243
   NewTextFile.WriteLine("function MM_findObj(n, d) { //v4.0")
244
   NewTextFile.WriteLine("  var p,i,x;")
245
   NewTextFile.WriteLine("  if(!d) d=document; ")
246
   NewTextFile.WriteLine("  if((p=n.indexOf(""?""))>0&&parent.frames.length) {")
247
   NewTextFile.WriteLine("     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);")
248
   NewTextFile.WriteLine("  }")
249
   NewTextFile.WriteLine("  if(!(x=d[n])&&d.all) x=d.all[n]; ")
250
   NewTextFile.WriteLine("  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];")
251
   NewTextFile.WriteLine("  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);")
252
   NewTextFile.WriteLine("  if(!x && document.getElementById) x=document.getElementById(n); ")
253
   NewTextFile.WriteLine("  return x;")
254
   NewTextFile.WriteLine("}")
255
   NewTextFile.WriteLine("function DisplaySPAN(show, x) {")
256
   NewTextFile.WriteLine("   if (show) {")
257
   NewTextFile.WriteLine("      MM_findObj(""spanHideDetails"" + x).style.display = ""block"";")
258
   NewTextFile.WriteLine("      MM_findObj(""spanPkgInfo"" + x).style.display = ""block"";")
259
   NewTextFile.WriteLine("      MM_findObj(""spanShowDetails"" + x).style.display = ""none"";")
260
   NewTextFile.WriteLine("   } else {")
261
   NewTextFile.WriteLine("      MM_findObj(""spanHideDetails"" + x).style.display = ""none"";")
262
   NewTextFile.WriteLine("      MM_findObj(""spanPkgInfo"" + x).style.display = ""none"";")
263
   NewTextFile.WriteLine("      MM_findObj(""spanShowDetails"" + x).style.display = ""block"";")
264
   NewTextFile.WriteLine("   }")
265
   NewTextFile.WriteLine("}")
266
   NewTextFile.WriteLine("</script>")
119 ghuddy 267
End Sub
268
'--------------------------------------------------------------------------------------------------------------------------
269
Function GetIsDiffFilterInUseIcon()
123 ghuddy 270
   GetIsDiffFilterInUseIcon = LIMG_FILTER_OFF & LIMG_DROP_DOWN_ARROW
119 ghuddy 271
 
123 ghuddy 272
   If dDiffFilter.Count > 0 Then
273
      GetIsDiffFilterInUseIcon = LIMG_FILTER_ON & LIMG_DROP_DOWN_ARROW
274
   End If
119 ghuddy 275
 
276
End Function
277
'--------------------------------------------------------------------------------------------------------------------------
278
Function GetIsDiffFilterChecked( nFilterId )
279
 
123 ghuddy 280
   If dDiffFilter.Exists ( CStr(nFilterId)  ) Then
281
      GetIsDiffFilterChecked = "checked"
282
   End If
119 ghuddy 283
 
284
End Function
285
'---------------------------------------------------------------------------------------------------------------------------
286
Function  Get_CQ_Issues ( SSsql, OOrsCQ )
287
 
123 ghuddy 288
   If OOrsCQ.State = 1 Then
289
      OOrsCQ.Close
290
   End If
119 ghuddy 291
 
123 ghuddy 292
   On Error Resume Next
293
   OOrsCQ.ActiveConnection = CQ_conn
294
   OOrsCQ.Source = SSsql
295
   OOrsCQ.CursorType = 0
296
   OOrsCQ.CursorLocation = 2
297
   OOrsCQ.LockType = 3
298
   OOrsCQ.Open()
299
   Get_CQ_Issues = Err.Number
119 ghuddy 300
 
301
End Function
302
'--------------------------------------------------------------------------------------------------------------------------
303
Public Function TextToHTML ( sString )
123 ghuddy 304
   Dim mString
119 ghuddy 305
 
123 ghuddy 306
   If (sString = "") OR IsNull(sString) Then Exit Function
119 ghuddy 307
 
123 ghuddy 308
   mString = Server.HTMLEncode( sString )
309
   mString = Replace(mString, VBNewLine, "<br>")
119 ghuddy 310
 
123 ghuddy 311
   TextToHTML = mString
119 ghuddy 312
End Function
313
'--------------------------------------------------------------------------------------------------------------------------
314
 
315
Sub GetFormDetails ( nSourceRtagId, ByRef outobjDetails )
123 ghuddy 316
   Dim rsQry, query
119 ghuddy 317
 
123 ghuddy 318
   ' Exit if nSourceRtagId is empty
319
   If nSourceRtagId = "" Then Exit Sub
119 ghuddy 320
 
123 ghuddy 321
   OraDatabase.Parameters.Add "SOURCE_RTAG_ID",    nSourceRtagId,      ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 322
 
123 ghuddy 323
   query = _
324
   " SELECT pr.PROJ_NAME ||' &gt; '|| rt.RTAG_NAME   AS LOCATION, "&_
325
   "        rt.OFFICIAL, pr.PROJ_ID, rt.RTAG_ID"&_
326
   "  FROM RELEASE_TAGS rt,"&_
327
   "         PROJECTS pr"&_
328
   " WHERE rt.PROJ_ID = pr.PROJ_ID"&_
329
   "   AND rt.RTAG_ID = :SOURCE_RTAG_ID"
119 ghuddy 330
 
123 ghuddy 331
   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
119 ghuddy 332
 
123 ghuddy 333
   OraDatabase.Parameters.Remove "SOURCE_RTAG_ID"
119 ghuddy 334
 
123 ghuddy 335
   If rsQry.RecordCount > 0 Then
336
      outobjDetails.Item ("location") = rsQry("location")
337
      outobjDetails.Item ("official") = rsQry("official")
338
      outobjDetails.Item ("proj_id") = rsQry("proj_id")
339
      outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
340
   Else
341
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. nSourceRtagId="& nSourceRtagId
342
   End If
119 ghuddy 343
 
123 ghuddy 344
   rsQry.Close
345
   Set rsQry = Nothing
119 ghuddy 346
End Sub
347
'--------------------------------------------------------------------------------------------------------------------------
348
Sub GetDiffStateIcon( nDiffState, outIcon )
349
 
123 ghuddy 350
   Select Case nDiffState
351
      Case "U"
352
         outIcon  = LIMG_UPDATED
353
      Case "UW"
354
         outIcon  = LIMG_UPDATED
355
      Case "A"
356
         outIcon = LIMG_ADDED
357
      Case "R"
358
         outIcon = LIMG_REMOVED
359
      Case "UR"
360
         outIcon = LIMG_RIPPLED
361
      Case Else
362
         outIcon = ""
363
   End Select
119 ghuddy 364
 
365
End Sub
366
'--------------------------------------------------------------------------------------------------------------------------
123 ghuddy 367
Function Get_Record_Count ( SSsql )
129 ghuddy 368
   Dim rsTemp
123 ghuddy 369
   Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT COUNT(*) as record_count FROM "& SSsql , cint(0))
370
 
129 ghuddy 371
   If (NOT rsTemp.BOF) AND (NOT rsTemp.EOF) Then
372
      Get_Record_Count = rsTemp("record_count")
373
   Else
374
      Get_Record_Count = 0
375
   End If
376
   rsTemp.Close
377
   Set rsTemp = nothing
123 ghuddy 378
End Function
379
'--------------------------------------------------------------------------------------------------------------------------
380
' We need a way of discriminating between versions in the destination release that are pending, and those that are officially
381
' in the release. This function allows us to do that on the fly within the VBSCRIPT HTML generating code, indicating specifically
382
' if the given PV_ID reflects a pending additive merge.
383
Function Is_Pending_Add(NNrtag_id, NNpv_id)
384
   If IsNull(NNrtag_id) OR IsNull(NNpv_id) Then
385
      Is_Pending_Add = 0
386
   Else
387
      Is_Pending_Add = Get_Record_Count( "PLANNED pl WHERE pl.rtag_id = " & NNrtag_id & " AND pl.pv_id = " & NNpv_id & " AND pl.operation = 'A'" )
129 ghuddy 388
   End If
123 ghuddy 389
End Function
390
'--------------------------------------------------------------------------------------------------------------------------
391
' We need a way of discriminating between versions in the destination release that are pending, and those that are officially
392
' in the release. This function allows us to do that on the fly within the VBSCRIPT HTML generating code, indicating specifically
393
' if the given PV_ID reflects a pending subtractive merge.
394
Function Is_Pending_Sub(NNrtag_id, NNpv_id)
395
   If IsNull(NNrtag_id) OR IsNull(NNpv_id) Then
396
      Is_Pending_Sub = 0
397
   Else
398
      Is_Pending_Sub = Get_Record_Count( "PLANNED pl WHERE pl.rtag_id = " & NNrtag_id & " AND pl.pv_id = " & NNpv_id & " AND pl.operation = 'S'" )
399
   End If
400
End Function
401
 
402
'--------------------------------------------------------------------------------------------------------------------------
403
 
404
 
119 ghuddy 405
Sub MergePackages (releaseMode)
123 ghuddy 406
   Dim aFullList, aAddPkgList, aRemovePkgList, dAddPkgList, dRemovePkgList, PvId
407
   Dim OraParameter
408
   Dim rc
119 ghuddy 409
 
123 ghuddy 410
   ' Business Rules restricting the use of the merge feature...
411
   ' Bypass merge if the destination release is in closed or archive mode, or if user does not have
412
   ' merge permissions
413
   If releaseMode <> enumDB_RELEASE_IN_CLOSED_MODE  AND releaseMode <> enumDB_RELEASE_IN_ARCHIVE_MODE _
414
   AND (objAccessControl.IsActive("MergeRelease")) THEN
119 ghuddy 415
 
123 ghuddy 416
      Set dAddPkgList = CreateObject("Scripting.Dictionary")
417
      Set dRemovePkgList = CreateObject("Scripting.Dictionary")
119 ghuddy 418
 
123 ghuddy 419
      '--- Get Add Packages ---
420
      ' Get full list of "addpkg" parameter
421
      aFullList = Split ( Replace( Request("addpkg"), " ", "" ), "," )
119 ghuddy 422
 
123 ghuddy 423
      ' Clean empty parameters
424
      For Each PvId In aFullList
425
         If PvId <> "" Then
426
            dAddPkgList.Add CStr( PvId ), Empty
427
         End If
428
      Next
119 ghuddy 429
 
123 ghuddy 430
      aFullList = NULL
431
      aAddPkgList = dAddPkgList.Keys
119 ghuddy 432
 
123 ghuddy 433
      '--- Get Remove Packages ---
434
      ' Get full list of "removepkg" parameter
435
      aFullList = Split ( Replace( Request("removepkg"), " ", "" ), "," )
119 ghuddy 436
 
123 ghuddy 437
      ' Clean empty parameters
438
      For Each PvId In aFullList
439
         If PvId <> "" Then
440
            dRemovePkgList.Add CStr( PvId ), Empty
441
         End If
442
      Next
119 ghuddy 443
 
123 ghuddy 444
      aFullList = NULL
445
      aRemovePkgList = dRemovePkgList.Keys
119 ghuddy 446
 
123 ghuddy 447
      '-- Add package List to release --
448
      OraDatabase.Parameters.Add "PV_ID",    NULL, ORAPARM_INPUT, ORATYPE_NUMBER
449
      OraDatabase.Parameters.Add "VIEW_ID",  NULL, ORAPARM_BOTH, ORATYPE_NUMBER
450
      OraDatabase.Parameters.Add "RTAG_A",   Request("rtagA"), ORAPARM_INPUT, ORATYPE_NUMBER
451
      OraDatabase.Parameters.Add "RTAG_B",   Request("rtagB"), ORAPARM_INPUT, ORATYPE_NUMBER
452
      OraDatabase.Parameters.Add "PROJB",    objRelCollectorB.Item("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
453
      OraDatabase.Parameters.Add "COMMENTS", "Merging from "& objRelCollectorA.Item("location") &" to "& objRelCollectorB.Item("location"), ORAPARM_INPUT, ORATYPE_VARCHAR2
454
      OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
455
      OraDatabase.Parameters.Add "OPERATION",NULL, ORAPARM_INPUT, ORATYPE_CHAR
119 ghuddy 456
 
123 ghuddy 457
      Set OraParameter = OraDatabase.Parameters
119 ghuddy 458
 
459
 
123 ghuddy 460
      On Error Resume Next
119 ghuddy 461
 
462
 
123 ghuddy 463
      ' Begin Database entry
464
      objEH.TryORA ( OraSession )
119 ghuddy 465
 
123 ghuddy 466
      '-- Add Packages --
467
      OraParameter("OPERATION").Value = "A"
468
      For Each PvId In aAddPkgList
469
         OraParameter("PV_ID").Value = PvId
470
         ' DEVI-45275, Merge into Planned (pending) table instead of release_content table.
129 ghuddy 471
         If Err.Number = 0 Then
123 ghuddy 472
            OraDatabase.ExecuteSQL _
473
            "BEGIN  "&_
129 ghuddy 474
            "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_A ); "&_
123 ghuddy 475
            "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
476
            "END;"
477
         End If
478
      Next
119 ghuddy 479
 
129 ghuddy 480
      '-- Remove Packages --
481
      If Err.Number = 0 Then
482
         OraParameter("OPERATION").Value = "S"
483
         For Each PvId In aRemovePkgList
484
            OraParameter("PV_ID").Value = PvId
119 ghuddy 485
 
129 ghuddy 486
            If Err.Number = 0 Then
487
               ' Does this PV_ID exist in the destination release's planned table?
488
               rc = Get_Record_Count ("PLANNED pl WHERE pl.pv_id = " & PvId & " AND pl.rtag_id = " & Request("rtagB") )
489
               If  rc > 0 Then
490
                  ' Given that merging now merges into pending, the merge page may be used to remove items that have
491
                  ' previously been merged but have not yet been committed to the destination release. For these,
492
                  ' we cannot call PK_RELEASE.GET_PACKAGE_VIEW(). We have to call PK_PLANNED.GET_PACKAGE_VIEW() instead.
493
                  OraDatabase.ExecuteSQL _
494
                  "BEGIN  "&_
495
                  "  :VIEW_ID := PK_PLANNED.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_B ); "&_
496
                  "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
497
                  "END;"
498
               Else
499
                  ' DEVI-45275, Merge into Planned (pending) table instead of release_content table.
500
                  OraDatabase.ExecuteSQL _
501
                  "BEGIN  "&_
502
                  "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_B ); "&_
503
                  "  PK_PLANNED.MERGE_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_B, :USER_ID, :OPERATION );  "&_
504
                  "END;"
505
               End If
506
            End If
507
         Next
119 ghuddy 508
 
129 ghuddy 509
         '-- Log Project Merge Action
510
         If Err.Number = 0 Then
511
            OraDatabase.ExecuteSQL _
512
            "BEGIN  LOG_PROJECT_ACTION ( :PROJB, 'merge_release', :USER_ID, :COMMENTS, :RTAG_B );  END;"
513
         End If
123 ghuddy 514
 
129 ghuddy 515
      End If
123 ghuddy 516
 
129 ghuddy 517
      objEH.CatchORA ( OraSession )    ' sets up LastOraFailed as appropriate
518
 
519
      ' NOTE, The Touch_Release stored procedure does a commit itself, so we should not do it unless all the ExecuteSQL's we
520
      ' have just performed, were successful
521
      If objEH.LastOraFailed = FALSE Then
522
         '-- Force package state recalculate
523
         objEH.TryORA ( OraSession )
524
         OraDatabase.ExecuteSQL _
525
            "BEGIN  "&_
526
            "  TOUCH_RELEASE ( :RTAG_B );  "&_
527
            "END;"
528
         objEH.CatchORA ( OraSession )
529
      End If
530
 
123 ghuddy 531
      Set OraParameter = Nothing
532
      OraDatabase.Parameters.Remove "PV_ID"
533
      OraDatabase.Parameters.Remove "VIEW_ID"
534
      OraDatabase.Parameters.Remove "RTAG_A"
535
      OraDatabase.Parameters.Remove "RTAG_B"
536
      OraDatabase.Parameters.Remove "USER_ID"
537
      OraDatabase.Parameters.Remove "PROJB"
538
      OraDatabase.Parameters.Remove "COMMENTS"
539
      OraDatabase.Parameters.Remove "OPERATION"
540
      'Response.write "<br>"& sAddPkgList &"-"& dAddPkgList.Count &"-"& UBound( aFullList )
541
   End If
119 ghuddy 542
End Sub
543
'--------------------------------------------------------------------------------------------------------------------------
544
Function AddTrailingZeros(byval n, byval count)
123 ghuddy 545
   if len(n) >= count then
546
      AddTrailingZeros = n
547
      exit function
548
   end if
119 ghuddy 549
 
123 ghuddy 550
   dim c, s, i
551
   c = count - len(n)
119 ghuddy 552
 
123 ghuddy 553
   for i = 1 to c
554
      s = s & "0"
555
   next
556
   s = cstr(n) & s
119 ghuddy 557
 
123 ghuddy 558
   AddTrailingZeros = s
119 ghuddy 559
End function
560
'--------------------------------------------------------------------------------------------------------------------------
561
%>
562
<%
563
'------------ RUN BEFORE PAGE RENDER ----------
564
If Request("btn") = "Exit" Then
123 ghuddy 565
   Call OpenInWindow ( "index.asp" )
119 ghuddy 566
End If
567
 
568
' Get release details
569
Call GetFormDetails ( parRtagA, objRelCollectorA )
570
Call GetFormDetails ( parRtagB, objRelCollectorB )
571
 
572
 
573
 
574
 
575
If (Request("btn") = "Merge") Then
123 ghuddy 576
   Call MergePackages ( objRelCollectorB.Item("official") )
119 ghuddy 577
End If
578
 
579
If Request("btn") = "Swap Compare" Then
123 ghuddy 580
   Call OpenInWindow ( ScriptName &"?rtagA="& parRtagB &"&rtagB="& parRtagA )
119 ghuddy 581
End If
582
 
583
If Request("btn") = "Hide" Then
123 ghuddy 584
   ' Store filter in cookie
585
   Response.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER) = Request("difilter")
119 ghuddy 586
End If
587
 
588
 
589
Call GetDiffFilterValues ( dDiffFilter )
590
'----------------------------------------------
591
%>
592
<html>
593
<head>
594
<title>Release Manager</title>
595
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
596
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
597
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
598
<link rel="stylesheet" href="images/navigation.css" type="text/css">
599
<script language="JavaScript" src="images/common.js"></script>
600
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
123 ghuddy 601
 
602
<!-- TIPS -->
603
<script language="JavaScript" src="images/tipster.js"></script>
604
<script language="JavaScript" src="images/_help_tips.js"></script>
119 ghuddy 605
<script language="JavaScript" type="text/javascript">
606
<!--
607
 
123 ghuddy 608
function RequestReleaseCombo( paramString, rowId )
609
{
610
   var requestURL = 'RequestReleaseCombo.asp';
119 ghuddy 611
 
123 ghuddy 612
   // Set ajax divname
613
   ajaxdivname = rowId;
119 ghuddy 614
 
123 ghuddy 615
   //Append the name to search for to the requestURL
616
   var url = requestURL + paramString;
119 ghuddy 617
 
123 ghuddy 618
   //Progress
619
   //alert(MM_findObj( rowId ));
119 ghuddy 620
 
123 ghuddy 621
   //MM_findObj( rowId ).options[0] = new Option('Loading...','');
622
   //MM_findObj( rowId ).selectedIndex = 0;
623
   rowId.options[0] = new Option('Loading...','');
624
   rowId.selectedIndex = 0;
119 ghuddy 625
 
626
 
123 ghuddy 627
   //Create the xmlHttp object to use in the request
628
   //stateChangeHandler will fire when the state has changed, i.e. data is received back
629
   // This is non-blocking (asynchronous)
630
   xmlHttp = GetXmlHttpObject(stateComboChangeHandler);
119 ghuddy 631
 
123 ghuddy 632
   //Send the xmlHttp get to the specified url
633
   xmlHttp_Get(xmlHttp, url);
119 ghuddy 634
}
635
 
636
 
637
function MergePackage ( pkga, pkgb, rowId )
638
{
123 ghuddy 639
   // Set merge hidden field with new value
640
   MM_findObj( 'ADDPKG_' + rowId ).value = pkga;
119 ghuddy 641
 
123 ghuddy 642
   var divA = MM_findObj( 'PVA' + rowId );
643
   var divB = MM_findObj( 'PVB' + rowId );
119 ghuddy 644
 
123 ghuddy 645
   // Set text equal
646
   divB.innerHTML = divA.innerHTML;
119 ghuddy 647
 
123 ghuddy 648
   // Set highlight to blank
649
   divA.style.backgroundColor = '<%=LCOLOR_NOT_CHANGED%>';
650
   divB.style.backgroundColor = '<%=LCOLOR_NOT_CHANGED%>';
119 ghuddy 651
 
652
    // Set Change state icon to blank
123 ghuddy 653
   MM_findObj( 'IMGSTATE' + rowId ).style.display = 'none';
119 ghuddy 654
 
123 ghuddy 655
   // Remove Merge Button
656
   MM_findObj( 'IMGMERGE' + rowId ).style.display = 'none';
657
   MM_findObj( 'IMGREMOVE' + rowId ).style.display = 'none';
119 ghuddy 658
 
123 ghuddy 659
   // Show undo button
660
   MM_findObj( 'IMGUNDO' + rowId ).style.display = 'block';
119 ghuddy 661
}
662
 
663
 
664
function RemovePackage ( pkga, pkgb, rowId )
665
{
123 ghuddy 666
   // Set remove hidden field with new value
667
   MM_findObj( 'REMOVEPKG_' + rowId ).value = pkgb;
119 ghuddy 668
 
123 ghuddy 669
   var divA = MM_findObj( 'PVA' + rowId );
670
   var divB = MM_findObj( 'PVB' + rowId );
119 ghuddy 671
 
123 ghuddy 672
   // Set text equal
673
   divB.style.textDecoration = 'line-through';
119 ghuddy 674
 
123 ghuddy 675
   // Set highlight to blank
676
   if (MM_findObj( 'CHANGETYPE_' + rowId ).value != "A")
677
   {
678
      divA.style.backgroundColor = '<%=LCOLOR_NOT_CHANGED%>';
679
   }
680
   divB.style.backgroundColor = '<%=LCOLOR_NOT_CHANGED%>';
119 ghuddy 681
 
682
    // Set Change state icon to blank
123 ghuddy 683
   MM_findObj( 'IMGSTATE' + rowId ).style.display = 'none';
119 ghuddy 684
 
123 ghuddy 685
   // Remove Merge Button
686
   MM_findObj( 'IMGMERGE' + rowId ).style.display = 'none';
687
   MM_findObj( 'IMGREMOVE' + rowId ).style.display = 'none';
119 ghuddy 688
 
123 ghuddy 689
   // Show undo button
690
   MM_findObj( 'IMGUNDO' + rowId ).style.display = 'block';
119 ghuddy 691
}
692
 
693
 
694
 
695
function UndoPackage ( rowId )
696
{
123 ghuddy 697
   // Set merge/remove hidden field with new value
698
   MM_findObj( 'ADDPKG_' + rowId ).value = '';
699
   MM_findObj( 'REMOVEPKG_' + rowId ).value = '';
119 ghuddy 700
 
123 ghuddy 701
   var divA = MM_findObj( 'PVA' + rowId );
702
   var divB = MM_findObj( 'PVB' + rowId );
119 ghuddy 703
 
123 ghuddy 704
   // Set text equal
705
   divB.innerHTML = MM_findObj( 'UNDOPKG_' + rowId ).value;
706
   divB.style.textDecoration = 'none';
119 ghuddy 707
 
708
 
123 ghuddy 709
   // Set highlight to blank
710
   divA.style.backgroundColor = MM_findObj( 'UNDOCOLORA_' + rowId ).value;
711
   divB.style.backgroundColor = MM_findObj( 'UNDOCOLORB_' + rowId ).value;
119 ghuddy 712
 
713
    // Set Change state icon to blank
123 ghuddy 714
   MM_findObj( 'IMGSTATE' + rowId ).style.display = 'block';
119 ghuddy 715
 
123 ghuddy 716
   // Remove Merge Button
717
   var cht = MM_findObj( 'CHANGETYPE_' + rowId );
119 ghuddy 718
 
123 ghuddy 719
   if (cht.value == "R")
720
   {
721
      MM_findObj( 'IMGMERGE' + rowId ).style.display = 'block';
722
   }
723
   else if ( (cht.value == "A") || (cht.value == "") )
724
   {
725
      MM_findObj( 'IMGREMOVE' + rowId ).style.display = 'block';
726
   }
727
   else
728
   {
729
      MM_findObj( 'IMGMERGE' + rowId ).style.display = 'block';
730
      MM_findObj( 'IMGREMOVE' + rowId ).style.display = 'block';
731
   }
119 ghuddy 732
 
123 ghuddy 733
   // Show undo button
734
   MM_findObj( 'IMGUNDO' + rowId ).style.display = 'none';
119 ghuddy 735
}
736
 
737
 
738
function MergeAll()
739
{
123 ghuddy 740
   var elem
119 ghuddy 741
 
123 ghuddy 742
   if (document.all)
743
   {
744
      // Run this for IE
745
      elem = document.all;
746
   } else {
747
      // Run this for other browsers
748
      elem = document.getElementsByTagName('div');
749
   }
119 ghuddy 750
 
123 ghuddy 751
   for (i in elem)
752
   {
753
      if (elem[i].id)
754
      {
755
         if (elem[i].id.indexOf('SHORT_') == 0) elem[i].style.display = 'none';
756
         if (elem[i].id.indexOf('LONG_') == 0) elem[i].style.display = 'block';
757
      }
758
   }
119 ghuddy 759
}
760
 
761
//-->
762
</script>
763
 
764
</head>
123 ghuddy 765
<!-- TIPS LAYERS -------------------------------------->
766
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
119 ghuddy 767
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
768
<form name="FormName" method="post" action="<%=ScriptName%>">
123 ghuddy 769
   <!-- HEADER -->
2365 dpurdie 770
   <!--#include file="_header.asp"-->
123 ghuddy 771
   <!-- BODY ---->
772
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
773
      <tr>
774
         <td width="1%" background="images/bg_home_orange.gif" valign="top">
775
            <!-- SELECT RELEASE A ---------------------------------------------->
776
            <br>
777
            <table width="100%"  border="0" cellspacing="10" cellpadding="0">
778
               <tr>
779
                  <td align="left" class="body_col"><img src="images/i_rtag_open_mode.gif" border="0" align="absmiddle" width="15" height="13">&nbsp;Select Release A<hr size="1px" color="Olive" noshade></td>
780
               </tr>
781
               <tr>
782
                  <td align="left">
783
                     <select name="projA" class="form_item" onChange="RequestReleaseCombo( '?proj_id='+ this.value, FormName.rtagA );">
784
                        <option value="">-- Select Project --</option>
785
                        <%
786
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorA.Item("proj_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 787
 
123 ghuddy 788
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ProjectsCombo.sql"), cint(0))
119 ghuddy 789
 
123 ghuddy 790
                        OraDatabase.Parameters.Remove "PROJ_ID"
119 ghuddy 791
 
123 ghuddy 792
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
793
                           <option value="<%=rsQry("proj_id")%>" <%=rsQry("selected")%>><%=rsQry("proj_name")%></option>
794
                           <%rsQry.MoveNext
795
                        WEnd
119 ghuddy 796
 
123 ghuddy 797
                        rsQry.Close
798
                        Set rsQry = Nothing
799
                        %>
800
                     </select>
801
                  </td>
802
               </tr>
803
               <tr>
804
                  <td align="left">
805
                     <select name="rtagA" id="rtagA" class="form_item">
806
                        <%
807
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorA.Item("proj_id"),   ORAPARM_INPUT,  ORATYPE_NUMBER
808
                        OraDatabase.Parameters.Add "RTAG_ID",    objRelCollectorA.Item("rtag_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 809
 
123 ghuddy 810
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleasesCombo.sql"), cint(0))
119 ghuddy 811
 
123 ghuddy 812
                        OraDatabase.Parameters.Remove "PROJ_ID"
813
                        OraDatabase.Parameters.Remove "RTAG_ID"
119 ghuddy 814
 
123 ghuddy 815
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
816
                              <option value="<%=rsQry("rtag_id")%>" <%=rsQry("selected")%>><%=rsQry("rtag_name")%></option>
817
                           <%rsQry.MoveNext
818
                        WEnd
119 ghuddy 819
 
123 ghuddy 820
                        rsQry.Close
821
                        Set rsQry = Nothing
822
                        %>
823
                     </select>
824
                  </td>
825
               </tr>
826
               <%If (parRtagA <> "") Then%>
119 ghuddy 827
                  <tr>
123 ghuddy 828
                     <td align="left"><a href="dependencies.asp?rtag_id=<%=parRtagA%>" class="body_txt_drk">Go To Release A &raquo;</a></td>
119 ghuddy 829
                  </tr>
123 ghuddy 830
               <%End If%>
831
            </table>
119 ghuddy 832
 
123 ghuddy 833
            <!-- SELECT RELEASE A END ---------------------------------------------->
834
         </td>
119 ghuddy 835
 
123 ghuddy 836
         <td width="1%" valign="top" background="images/bg_lght_gray.gif">&nbsp;</td>
119 ghuddy 837
 
123 ghuddy 838
         <td rowspan="2" valign="top" width="100%" background="images/bg_lght_gray.gif" align="center">
839
            <!-- DIFF -------------------------------------------------------->
840
            <br>
841
            <table width="100%" border="0" cellspacing="10" cellpadding="0">
842
               <tr>
843
                  <td>
844
                     <table width="100%" border="0" cellspacing="0" cellpadding="0">
845
                        <tr>
846
                           <td width="1%"></td>
847
                           <td width="100%" align="left" class="form_ttl">DIFF / MERGE RELEASE</td>
848
                           <td width="1%"></td>
849
                        </tr>
850
                        <tr>
851
                           <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
852
                           <td background="images/lbox_bg_blue.gif" align="left" class="wform_ttl">&nbsp;</td>
853
                           <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
854
                        </tr>
855
                        <tr>
856
                           <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
857
                           <td bgcolor="#FFFFFF" valign="top" class="form_item">
858
                              <table width="100%"  border="0" cellspacing="0" cellpadding="5">
859
                                 <tr>
860
                                    <td width="100%" bgcolor="#DAD7C8">
861
                                       <input type="submit" name="btn" value="Compare" class="form_btn_comp" style="margin-right:5px;">
862
                                       <input type="submit" name="btn" value="Swap Compare" class="form_btn_comp">
863
                                       <span class="body_txt">
864
                                          <input name="btn" type="submit" class="form_btn" value="Mail Me Report">
865
                                       </span>
866
                                    </td>
867
                                    <td width="1" align="right" bgcolor="#DAD7C8" nowrap>
868
                                       <table width="100%"  border="0" cellspacing="0" cellpadding="0">
869
                                          <tr>
870
                                             <td>
871
                                                <%If (objRelCollectorB.Item("official") <> "Y" AND objRelCollectorB.Item("official") <> "C" ) AND (objAccessControl.IsActive("MergeRelease")) Then%>
872
                                                   <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
873
                                                <%End If%>
874
                                             </td>
875
                                             <td>
876
                                                <%If (objRelCollectorB.Item("official") = "C" ) AND (objAccessControl.IsActive("MergeReleaseForCCB")) Then%>
877
                                                   <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
878
                                                <%End If%>
879
                                             </td>
880
                                             <td>
881
                                                <input type="submit" name="btn" value="Exit" class="form_btn_comp">
882
                                             </td>
883
                                          </tr>
884
                                       </table>
885
                                    </td>
886
                                 </tr>
887
                                 <tr>
888
                                    <td>
889
                                       <%If (parRtagA <> "") AND (parRtagB <> "")Then%>
890
                                          <!-- DIFF FILTER +++++++++++++++++++++++++++++++++++++++++++ -->
891
                                          <fieldset style="width:150px;">
892
                                             <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divDiffFilter');" ><%=GetIsDiffFilterInUseIcon() %>&nbsp;Filter&nbsp;Results...</a></legend>
893
                                             <div name="divDiffFilter" id="divDiffFilter" class="body_txt" style="display:none;">
894
                                                <br>
895
                                                <table width="100%"  border="0" cellspacing="1" cellpadding="3">
896
                                                   <tr>
897
                                                      <td width="1" background="images/bg_action_norm.gif"><input name="difilter" type="checkbox" value="<%=enumDB_NUM_DIFF_UPDATED%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_UPDATED)%>></td>
898
                                                      <td width="50" nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_UPDATED%>Updated</td>
899
                                                   </tr>
900
                                                   <tr>
901
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_NEW%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_NEW)%>></td>
902
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_ADDED%>Added</td>
903
                                                   </tr>
904
                                                   <tr>
905
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_REMOVED%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_REMOVED)%>></td>
906
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_REMOVED%>Removed</td>
907
                                                   </tr>
908
                                                   <tr>
909
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_RIPPLE%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_RIPPLE)%>></td>
910
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_RIPPLED%>Rippled</td>
911
                                                   </tr>
912
                                                   <tr>
913
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_NO_CHANGE%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_NO_CHANGE)%>></td>
914
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field">Unchanged</td>
915
                                                   </tr>
916
                                                   <tr>
917
                                                      <td background="images/bg_action_norm.gif">&nbsp;</td>
918
                                                      <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" value="Hide"></td>
919
                                                   </tr>
920
                                                </table>
921
                                             </div>
922
                                          </fieldset>
923
                                          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
924
                                       <%End If%>
925
                                    </td>
926
                                    <td></td>
927
                                 </tr>
928
                              </table>
119 ghuddy 929
 
123 ghuddy 930
                              <%
931
                              ' Successfull Merge
932
                              If (Request("btn") = "Merge") Then
933
                                 Call Messenger ( "Merge has completed successfully.", 3, "100%" )
934
                              End If
119 ghuddy 935
 
123 ghuddy 936
                              Set FSO=Server.CreateObject("Scripting.FileSystemObject")
937
                              Set NewTextFile=FSO.CreateTextFile(Server.MapPath("docs\compareReleases_"&objAccessControl.UserName&".html"), true)
119 ghuddy 938
 
123 ghuddy 939
                              Call Header()
119 ghuddy 940
 
123 ghuddy 941
                              If (parRtagA <> "") AND (parRtagB <> "")Then%>
942
                                 <table width="100%"  border="0" cellspacing="1" cellpadding="0">
943
                                    <tr>
944
                                       <td width="50%" bgcolor="#E4E9EC" class="body_row" nowrap><%= ReleaseIcon(objRelCollectorA.Item("official")) & objRelCollectorA.Item("location")%> </td>
945
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="1"></td>
946
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="20"></td>
947
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="1"></td>
948
                                       <td width="50%" bgcolor="#E4E9EC" class="body_row" nowrap><%= ReleaseIcon(objRelCollectorB.Item("official")) & objRelCollectorB.Item("location")%></td>
949
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="1"></td>
950
                                    </tr>
951
                                    <%
952
                                    OraDatabase.Parameters.Add "RTAG_A",    parRtagA,   ORAPARM_INPUT, ORATYPE_NUMBER
953
                                    OraDatabase.Parameters.Add "RTAG_B",    parRtagB,   ORAPARM_INPUT, ORATYPE_NUMBER
954
                                    OraDatabase.Parameters.Add "NO_CHANGE", GetIsDiffFilterChecked(enumDB_NUM_DIFF_NO_CHANGE), ORAPARM_INPUT, ORATYPE_VARCHAR2
955
                                    OraDatabase.Parameters.Add "ADDED",     GetIsDiffFilterChecked(enumDB_NUM_DIFF_NEW),       ORAPARM_INPUT, ORATYPE_VARCHAR2
956
                                    OraDatabase.Parameters.Add "UPDATED",   GetIsDiffFilterChecked(enumDB_NUM_DIFF_UPDATED),   ORAPARM_INPUT, ORATYPE_VARCHAR2
957
                                    OraDatabase.Parameters.Add "REMOVED",   GetIsDiffFilterChecked(enumDB_NUM_DIFF_REMOVED),   ORAPARM_INPUT, ORATYPE_VARCHAR2
119 ghuddy 958
 
123 ghuddy 959
                                    Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseDiff.sql"), cint(0))
119 ghuddy 960
 
123 ghuddy 961
                                    OraDatabase.Parameters.Remove "RTAG_A"
962
                                    OraDatabase.Parameters.Remove "RTAG_B"
963
                                    OraDatabase.Parameters.Remove "NO_CHANGE"
964
                                    OraDatabase.Parameters.Remove "ADDED"
965
                                    OraDatabase.Parameters.Remove "UPDATED"
966
                                    OraDatabase.Parameters.Remove "REMOVED"
119 ghuddy 967
 
123 ghuddy 968
                                    Set rsQryA = OraDatabase.DbCreateDynaset( "SELECT RT.RTAG_NAME, PRJ.PROJ_NAME FROM RELEASE_TAGS RT, PROJECTS PRJ WHERE RTAG_ID="& parRtagA &" AND RT.PROJ_ID=PRJ.PROJ_ID", cint(0))
969
                                    Set rsQryB = OraDatabase.DbCreateDynaset( "SELECT RT.RTAG_NAME, PRJ.PROJ_NAME FROM RELEASE_TAGS RT, PROJECTS PRJ WHERE RTAG_ID="& parRtagB &" AND RT.PROJ_ID=PRJ.PROJ_ID", cint(0))
119 ghuddy 970
 
123 ghuddy 971
                                    Call Javascript()
119 ghuddy 972
 
123 ghuddy 973
                                    NewTextFile.WriteLine("<title>Difference Report Between "&rsQryA("proj_name")&" "&rsQryA("rtag_name")&" and "&rsQryB("proj_name")&" "&rsQryB("rtag_name")&"</title>")
974
                                    NewTextFile.WriteLine("<div align="&chr(34)&"center"&chr(34)&"><font color="&chr(34)&"red"&chr(34)&" size="&chr(34)&"4"&chr(34)&" face="&chr(34)&"Verdana, Arial, Helvetica, sans-serif"&chr(34)&">Difference Report Between "&rsQryA("proj_name")&" "&rsQryA("rtag_name")&" and "&rsQryB("proj_name")&" "&rsQryB("rtag_name")&"</font></div><br>")
975
                                    NewTextFile.WriteLine("<b>Key:</b><br><blockquote><font style="&chr(34)&"background-color:red"&chr(34)&"><b> SOURCE CODE CHANGES</b></font><font color="&chr(34)&"red"&chr(34)&"> Indicates Changes to a Package in "& rsQryA("rtag_name") &"</font>. <br><font style="&chr(34)&"background-color:#FF9933"&chr(34)&"><b> SOURCE CODE CHANGES</b></font><font color="&chr(34)&"#FF9933"&chr(34)&"> Indicates Changes to a Package in "& rsQryB("rtag_name") &"</font>. <br><font color="&chr(34)&"#999999"&chr(34)&">Grey Text Indicates No Source Code Changes to a Package in either Release</font>.</blockquote>")
119 ghuddy 976
 
123 ghuddy 977
                                    Dim currView_id
978
                                    currView_id = -1
119 ghuddy 979
 
123 ghuddy 980
                                    While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
981
                                       errormsg = false
982
                                       rowId = rsQry("pv_id_a") &"_"& rsQry("pv_id_b")
119 ghuddy 983
 
123 ghuddy 984
                                       btnMerge = LIMG_MERGE
985
                                       btnRemove = LIMG_REMOVE
986
                                       colorA = LCOLOR_NOT_CHANGED
987
                                       colorB = LCOLOR_NOT_CHANGED
119 ghuddy 988
 
123 ghuddy 989
                                       changeType = rsQry("change_type")
119 ghuddy 990
 
123 ghuddy 991
                                       Select Case changeType
992
                                          Case "U"
993
                                             colorA = LCOLOR_CHANGED
994
                                             colorB = LCOLOR_CHANGED
995
                                          Case "UW"
996
                                             colorA = LCOLOR_CHANGED
997
                                             colorB = LCOLOR_CHANGED
998
                                             btnMerge = LIMG_MERGE_WARN
999
                                          Case "UR"
1000
                                             colorA = LCOLOR_RIPPLED
1001
                                             colorB = LCOLOR_RIPPLED
1002
                                          Case "A"
1003
                                             colorA = LCOLOR_BLANK
1004
                                          Case "R"
1005
                                             colorB = LCOLOR_BLANK
1006
                                       End Select
119 ghuddy 1007
 
123 ghuddy 1008
                                       Call GetDiffStateIcon ( changeType, ChangeTypeIcon )
119 ghuddy 1009
 
123 ghuddy 1010
                                       If changeType = "U" OR changeType = "UW" OR changeType = "UR" Then
1011
                                          Dim MajorA, MajorB, MinorA, MinorB, PatchA, PatchB, BuildA, BuildB, pos, pkgVersionA, pkgVersionB, majMinA, majMinB
1012
                                          MajorA = NULL
1013
                                          MajorB = NULL
1014
                                          MinorA = NULL
1015
                                          MinorB = NULL
119 ghuddy 1016
 
123 ghuddy 1017
                                          pkgVersionA = rsQry("pkg_version_a")
1018
                                          pkgVersionB = rsQry("pkg_version_b")
119 ghuddy 1019
 
123 ghuddy 1020
                                          PatchA = rsQry("patch_number_a")
1021
                                          PatchB = rsQry("patch_number_b")
1022
                                          BuildA = rsQry("build_number_a")
1023
                                          BuildB = rsQry("build_number_b")
119 ghuddy 1024
 
1025
 
123 ghuddy 1026
                                          ' Find the first occurence of the dot in package version A
1027
                                          pos = InStr(pkgVersionA, ".")
1028
                                          If pos <> 0 Then
1029
                                             ' Extract the Major Version for A
1030
                                             MajorA = Mid(pkgVersionA, 1, pos - 1)
1031
                                             ' Delete the Major Version Value from the string to get the minor and patch version
1032
                                             pkgVersionA = Mid(pkgVersionA, pos + 1, Len(pkgVersionA))
1033
                                             ' Find the second occurence of the dot in package version A
1034
                                             pos = InStr(pkgVersionA, ".")
1035
                                             ' Extract the Minor Version for A
1036
                                             If pos <> 0 Then
1037
                                                MinorA = Mid(pkgVersionA, 1, pos - 1)
1038
                                             End If
1039
                                          End If
119 ghuddy 1040
 
123 ghuddy 1041
                                          ' Find the first occurence of the dot in package version B
1042
                                          pos = InStr(pkgVersionB, ".")
1043
                                          If pos <> 0 Then
1044
                                             ' Extract the Major Version for B
1045
                                             MajorB = Mid(pkgVersionB, 1, pos - 1)
1046
                                             ' Delete the Major Version Value from the string to get the minor and patch version
1047
                                             pkgVersionB = Mid(pkgVersionB, pos + 1, Len(pkgVersionB))
1048
                                             ' Find the second occurence of the dot in package version B
1049
                                             pos = InStr(pkgVersionB, ".")
1050
                                             ' Extract the Minor Version for B
1051
                                             If pos <> 0 Then
1052
                                                MinorB = Mid(pkgVersionB, 1, pos - 1)
1053
                                             End If
1054
                                          End If
119 ghuddy 1055
 
123 ghuddy 1056
                                          If MajorA = MajorB Then
1057
                                             If MinorA = MinorB Then
1058
                                                If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
1059
                                                   If CInt(PatchB) > CInt(PatchA) Then
1060
                                                      btnMerge = LIMG_MERGE_WARN
1061
                                                   Else
1062
                                                      btnMerge = LIMG_MERGE
1063
                                                   End If
1064
                                                End If
1065
                                             Else
1066
                                                If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
1067
                                                   If CInt(MinorB) > CInt(MinorA) Then
1068
                                                      btnMerge = LIMG_MERGE_WARN
1069
                                                   Else
1070
                                                      btnMerge = LIMG_MERGE
1071
                                                   End If
1072
                                                End If
1073
                                             End If
1074
                                          Else
1075
                                             If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
1076
                                                If    CInt(MajorB) > CInt(MajorA) Then
1077
                                                   btnMerge = LIMG_MERGE_WARN
1078
                                                Else
1079
                                                   btnMerge = LIMG_MERGE
1080
                                                End If
1081
                                             End If
1082
                                          End If
1083
                                       End If
119 ghuddy 1084
 
123 ghuddy 1085
                                       ' -------- FILTERS RIPPLE BUILDS WHEN CHECKED -----------------
1086
                                       If NOT (GetIsDiffFilterChecked(enumDB_NUM_DIFF_RIPPLE) = "checked" AND changeType = "UR") THEN
119 ghuddy 1087
 
123 ghuddy 1088
                                          ' -------- GROUP BY BASE VIEW  -----------------
1089
                                          If CDbl(currView_id) <> CDbl(rsQry("view_id")) Then%>
1090
                                             <tr>
1091
                                                <td valign="top" nowrap class="form_ttl"><b><%=rsQry("view_name")%></b></td>
1092
                                                <td class="form_ttl">&nbsp;</td>
1093
                                                <td class="form_ttl">&nbsp;</td>
1094
                                                <td class="form_ttl">&nbsp;</td>
1095
                                                <td class="form_ttl">&nbsp;</td>
1096
                                                <td class="form_ttl">&nbsp;</td>
1097
                                             </tr>
1098
                                             <%
1099
                                             currView_id = CDbl(rsQry("view_id"))
1100
                                          End If
1101
                                          ' -------- END GROUP ------------------------
1102
                                          %>
1103
                                          <%
1104
                                          'Determine if we are dealing with a PV_ID that we have already encountered and displayed as a pending addition
1105
                                          'If we are, we do not need to display anything more about it, so skip the row.
1106
                                          ' NOTE. the result set is sorted by change type (see releasediff.sql) such that if there are multiple entries
1107
                                          '       for the same PV_ID, they are sorted in the following order: unchanged, additions, removals, updates.
1108
                                          '       This is important to the row skip filtering carried out below.
1109
                                          Dim skipRow
1110
                                          If rsQry("pv_id_a") Then
1111
                                             skipRow = pendingAdditions.Exists(CStr(rsQry("pv_id_a")))
1112
                                          Else
1113
                                             skipRow = FALSE
1114
                                          End If
1115
                                          %>
1116
                                          <%If NOT skipRow Then%>
1117
                                             <tr>
1118
                                                <td class="body_row" nowrap>
1119
                                                   <DIV id="PVA<%=rowId%>" style="background:<%=colorA%>; padding:5px;">
1120
                                                      <%=rsQry("pkg_name_a") &" "& rsQry("pkg_version_a")%>
1121
                                                   </DIV>
1122
                                                   <input type="hidden" id="UNDOCOLORA_<%=rowId%>" value="<%=colorA%>">
1123
                                                </td>
1124
                                                <td bgcolor="#F5F5F5">
1125
                                                   <%If objRelCollectorB.Item("official") <> "Y" Then%>
1126
                                                      <DIV id="IMGMERGE<%=rowId%>" <%If (changeType = "A")  OR IsNull( changeType ) Then%>style="display:none;"<%End If%>><a href="javascript:;" onClick="MergePackage( '<%=rsQry("pv_id_a")%>', '<%=rsQry("pv_id_b")%>', '<%=rowId%>' );"><%=btnMerge%></a></DIV>
1127
                                                   <%End If%>
1128
                                                </td>
1129
                                                <td bgcolor="#E4E9EC">
1130
                                                   <DIV id="IMGSTATE<%=rowId%>" ><%=ChangeTypeIcon%></DIV>
1131
                                                   <input type="hidden" id="CHANGETYPE_<%=rowId%>" value="<%=changeType%>">
1132
                                                </td>
1133
                                                <td bgcolor="#F5F5F5">
1134
                                                   <%If objRelCollectorB.Item("official") <> "Y" Then%>
1135
                                                      <DIV id="IMGREMOVE<%=rowId%>" <%If changeType = "R" Then%>style="display:none;"<%End If%>><a href="javascript:;" onClick="RemovePackage( '<%=rsQry("pv_id_a")%>', '<%=rsQry("pv_id_b")%>', '<%=rowId%>' );"><%=btnRemove%></a></DIV>
1136
                                                   <%End If%>
1137
                                                </td>
1138
                                                <td class="body_row" nowrap>
1139
                                                   <DIV id="PVB<%=rowId%>" style="background:<%=colorB%>; padding:5px;">
1140
                                                      <%If IsNull(rsQry("pv_id_b")) Then %>
1141
                                                         <%If Is_Pending_Sub(Request("rtagB"), rsQry("pv_id_a")) Then%>
1142
                                                            (removal pending<%=Quick_Help("RemovalPending")%>)
1143
                                                         <%End If %>
1144
                                                      <%Else%>
1145
                                                         <%=rsQry("pkg_name_b") &" "& rsQry("pkg_version_b")%>
1146
                                                         <%If Is_Pending_Add(Request("rtagB"), rsQry("pv_id_b")) Then%>
1147
                                                            (addition pending<%=Quick_Help("AdditionPending")%>)
1148
                                                            <% 'Add this pending addition to the dictionary so that we can filter out REMOVED entries
1149
                                                               'with identical PV_ID's that we might encounter further on in the result set
1150
                                                            If NOT pendingAdditions.Exists(rsQry("pv_id_b")) Then
1151
                                                               pendingAdditions.Add CStr(rsQry("pv_id_b")), CStr(rsQry("pkg_version_b"))
1152
                                                            End If%>
1153
                                                         <%ElseIf Is_Pending_Sub(Request("rtagB"), rsQry("pv_id_b")) Then%>
1154
                                                            (removal pending<%=Quick_Help("RemovalPending")%>)
1155
                                                         <%End If %>
1156
                                                      <%End If %>
1157
                                                   </DIV>
1158
                                                   <input type="hidden" id="UNDOCOLORB_<%=rowId%>" value="<%=colorB%>">
1159
                                                   <input type="hidden" name="addpkg" id="ADDPKG_<%=rowId%>" value="">
1160
                                                   <input type="hidden" name="removepkg" id="REMOVEPKG_<%=rowId%>" value="">
1161
                                                   <input type="hidden" id="UNDOPKG_<%=rowId%>" value="<%=rsQry("pkg_name_b") &" "& rsQry("pkg_version_b")%>">
1162
                                                </td>
1163
                                                <td bgcolor="#F5F5F5">
1164
                                                   <DIV id="IMGUNDO<%=rowId%>" style="display:none;" >
1165
                                                      <a href="javascript:;" onClick="UndoPackage( '<%=rowId%>' );"><%=LIMG_UNDO%></a>
1166
                                                   </DIV>
1167
                                                </td>
1168
                                             </tr>
1169
                                          <%End If %>
119 ghuddy 1170
 
123 ghuddy 1171
                                          <%
1172
                                          If email AND NOT skipRow  Then
1173
                                             If rsQry("pv_id_a") Then
1174
                                                Set rsQryCommentsA = OraDatabase.DbCreateDynaset( "SELECT COMMENTS FROM PACKAGE_VERSIONS WHERE PV_ID="& rsQry("pv_id_a"), cint(0))
1175
                                             End If
119 ghuddy 1176
 
123 ghuddy 1177
                                             If rsQry("pv_id_b") Then
1178
                                                Set rsQryCommentsB = OraDatabase.DbCreateDynaset( "SELECT COMMENTS FROM PACKAGE_VERSIONS WHERE PV_ID="& rsQry("pv_id_b"), cint(0))
1179
                                             End If
119 ghuddy 1180
 
123 ghuddy 1181
                                             pkgA = rsQry("pkg_name_a")
1182
                                             pkgB = rsQry("pkg_name_b")
119 ghuddy 1183
 
123 ghuddy 1184
                                             If pkgA <> "" then
1185
                                                pkgname = pkgA
1186
                                             Else
1187
                                                pkgname = pkgB
1188
                                             End If
119 ghuddy 1189
 
123 ghuddy 1190
                                             If changeType = "U" OR  changeType = "UW" Then
1191
                                                ChangeASource = false
1192
                                                ChangeAUpdate = false
1193
                                                ChangeBSource = false
1194
                                                ChangeBUpdate = false
119 ghuddy 1195
 
123 ghuddy 1196
                                                'NewTextFile.WriteLine("<br><b><font face="&chr(34)&"arial"&chr(34)&">"&pkgname&"</font></b>")
1197
                                                NewTextFile.Write("<SPAN id=""spanShowDetails"& rowId &""" name=""spanShowDetails""><a href=""javascript:;"" class=""body_scol"" onClick=""DisplaySPAN(true,'"& rowId &"');"">"& pkgname &"</a></SPAN>")
1198
                                                NewTextFile.Write("<SPAN id=""spanHideDetails"& rowId &""" name=""spanHideDetails"" style=""display:none;""><a href=""javascript:;"" class=""body_scol"" onClick=""DisplaySPAN(false,'"& rowId &"');"">"& pkgname &"</a></SPAN>")
1199
                                                NewTextFile.WriteLine("<SPAN id=""spanPkgInfo"& rowId &""" name=""spanPkgInfo"" style=""display:none;"">")
1200
                                                NewTextFile.Write(rsQryA("rtag_name")&" uses: "&rsQry("pkg_version_a")&" (")
1201
                                                Call Release(rsQry("pv_id_a"))
1202
                                                NewTextFile.WriteLine(")<br>")
1203
                                                NewTextFile.Write(rsQryB("rtag_name")&" uses: "&rsQry("pkg_version_b")&" (")
1204
                                                Call Release(rsQry("pv_id_b"))
1205
                                                NewTextFile.WriteLine(")<br>")
119 ghuddy 1206
 
123 ghuddy 1207
                                                a = rsQry("pv_id_a")
1208
                                                b = rsQry("pv_id_b")
1209
                                                c = rsQry("pv_id_a")
1210
                                                d = rsQry("pv_id_b")
119 ghuddy 1211
 
123 ghuddy 1212
                                                Set pvCollectionA = CreateObject("Scripting.Dictionary")
1213
                                                Set pvCollectionB = CreateObject("Scripting.Dictionary")
1214
                                                On Error Resume Next
1215
                                                While CLng(a) <> CLng(b) and NOT errormsg
119 ghuddy 1216
 
123 ghuddy 1217
                                                   'NewTextFile.WriteLine("A: "&a)
1218
                                                   'NewTextFile.WriteLine("B: "&b)
1219
                                                   pvCollectionA.Add CStr(a), Empty
1220
                                                   pvCollectionB.Add CStr(b), Empty
1221
                                                   If CLng(a) > CLng(b) Then
1222
                                                      'NewTextFile.WriteLine("TestA")
1223
                                                      Call LastPvIdA(a)
1224
                                                   ElseIf CLng(b) > CLng(a) Then
1225
                                                      'NewTextFile.WriteLine("TestB")
1226
                                                      Call LastPvIdB(b)
1227
                                                   End If
1228
                                                Wend
119 ghuddy 1229
 
123 ghuddy 1230
                                                Set pvCollectionA = Nothing
1231
                                                Set pvCollectionB = Nothing
119 ghuddy 1232
 
123 ghuddy 1233
                                                Call pkg_Version(a)
1234
                                                NewTextFile.Write("Common PARENT package version: "&pkgversion&" (")
1235
                                                Call Release(a)
1236
                                                NewTextFile.WriteLine(")<br><br>")
1237
                                                NewTextFile.WriteLine()
1238
                                                NewTextFile.WriteLine("<b>"&rsQryA("rtag_name")&"</b>")
119 ghuddy 1239
 
123 ghuddy 1240
                                                If pkgversion <> rsQry("pkg_version_a") Then
1241
                                                   NewTextFile.WriteLine("<blockquote><b><i>Versions between "& pkgversion &" and "& rsQry("pkg_version_a")&"</i></b></blockquote>")
119 ghuddy 1242
 
123 ghuddy 1243
                                                   If errormsg Then
1244
                                                      NewTextFile.WriteLine("Error determining root!<br>")
1245
                                                      NewTextFile.WriteLine()
1246
                                                   End If
119 ghuddy 1247
 
123 ghuddy 1248
                                                   source_change = false
119 ghuddy 1249
 
123 ghuddy 1250
                                                   While CLng(a) <> CLng(c) and NOT errormsg
1251
                                                      Call Comments(c)
1252
                                                      Call GetFixedIssues(c)
1253
                                                      Call LastPvIdAa(c)
1254
                                                      NewTextFile.WriteLine()
1255
                                                   Wend
119 ghuddy 1256
 
123 ghuddy 1257
                                                   If source_change = false Then
1258
                                                      NewTextFile.WriteLine("<blockquote><b><i>No source changes to "& rsQryA("rtag_name")&". Only Rippled Builds.</i></b></blockquote><br>")
1259
                                                      ChangeASource = true
1260
                                                   End If
119 ghuddy 1261
 
123 ghuddy 1262
                                                   Call pkg_Version(b)
1263
                                                   NewTextFile.WriteLine()
1264
                                                   NewTextFile.WriteLine()
119 ghuddy 1265
 
123 ghuddy 1266
                                                ElseIf pkgversion = rsQry("pkg_version_a") Then
1267
                                                   NewTextFile.WriteLine("<blockquote><b><i>No updates to "& rsQryA("rtag_name")&"</i></b></blockquote><br>")
1268
                                                   ChangeAUpdate = true
1269
                                                   NewTextFile.WriteLine()
1270
                                                End If
119 ghuddy 1271
 
123 ghuddy 1272
                                                NewTextFile.WriteLine("<b>"&rsQryB("rtag_name")&"</b>")
119 ghuddy 1273
 
123 ghuddy 1274
                                                If pkgversion <> rsQry("pkg_version_b") Then
1275
                                                   NewTextFile.WriteLine("<blockquote><b><i>Versions between "& pkgversion &" and "& rsQry("pkg_version_b")&"</i></b></blockquote>")
119 ghuddy 1276
 
123 ghuddy 1277
                                                   If errormsg Then
1278
                                                      NewTextFile.WriteLine("Error determining root!<br>")
1279
                                                      NewTextFile.WriteLine()
1280
                                                   End If
119 ghuddy 1281
 
123 ghuddy 1282
                                                   source_change = false
119 ghuddy 1283
 
123 ghuddy 1284
                                                   While CLng(b) <> CLng(d) and NOT errormsg
1285
                                                      Call Comments(d)
1286
                                                      Call GetFixedIssues(d)
1287
                                                      Call LastPvIdBb(d)
1288
                                                      NewTextFile.WriteLine()
1289
                                                   Wend
119 ghuddy 1290
 
123 ghuddy 1291
                                                   If source_change = false Then
1292
                                                      NewTextFIle.WriteLine("<blockquote><b><i>No source changes to "& rsQryB("rtag_name")&". Only Rippled Builds.</i></b></blockquote><br>")
1293
                                                      ChangeBSource = true
1294
                                                   End If
119 ghuddy 1295
 
123 ghuddy 1296
                                                ElseIf pkgversion = rsQry("pkg_version_b") Then
1297
                                                   NewTextFile.WriteLine("<blockquote><b><i>No updates to "& rsQryB("rtag_name")&"</i></b></blockquote><br>")
1298
                                                   ChangeBUpdate = true
1299
                                                   NewTextFile.WriteLine()
1300
                                                End If
119 ghuddy 1301
 
123 ghuddy 1302
                                                NewTextFile.WriteLine("</SPAN>")
119 ghuddy 1303
 
123 ghuddy 1304
                                                If ChangeASource Then
1305
                                                   If ChangeBSource Then
1306
                                                      NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &": .</b><font color="&chr(34)&"#999999"&chr(34)&"> Ripple Builds Only.</font></td>   <td width=""349""><b>"& Ucase(rsQryB("rtag_name")) &": </b><font color="&chr(34)&"#999999"&chr(34)&"> Ripple Builds Only.</font></td>  </tr></table></blockquote>")
1307
                                                   ElseIf ChangeBUpdate Then
1308
                                                      NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &": </b><font color="&chr(34)&"#999999"&chr(34)&">Ripple Builds Only.</font></td>   <td width=""349""><b>"& Ucase(rsQryB("rtag_name")) &": </b><font color="&chr(34)&"#999999"&chr(34)&">No Updates.</font></td>  </tr></table></blockquote>")
1309
                                                   ElseIf NOT ChangeBSource AND NOT ChangeBUpdate Then
1310
                                                      NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &":</b> <font color="&chr(34)&"999999"&chr(34)&">Ripple Builds Only.</font></td>   <td width=""349"">   <b>"& Ucase(rsQryB("rtag_name")) &":</b> <b><font style="&chr(34)&"background-color:#FF9933"&chr(34)&">SOURCE CODE CHANGES.</b></font></td>  </tr></table></blockquote>")
1311
                                                   End If
1312
                                                End If
119 ghuddy 1313
 
123 ghuddy 1314
                                                If ChangeBSource Then
1315
                                                   If NOT ChangeAUpdate Then
1316
                                                      If NOT ChangeASource AND NOT ChangeBUpdate Then
1317
                                                         NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &": </b><b><font style="&chr(34)&"background-color:red"&chr(34)&"> SOURCE CODE CHANGES</font></b>.</td>   <td width=""349""> <b>"& Ucase(rsQryB("rtag_name")) &":</b> <font color="&chr(34)&"#999999"&chr(34)&">Ripple Builds Only.</font></td>  </tr></table></blockquote>")
1318
                                                      End If
1319
                                                   End If
1320
                                                End If
119 ghuddy 1321
 
123 ghuddy 1322
                                                If NOT ChangeASource Then
1323
                                                   If NOT ChangeAUpdate Then
1324
                                                      If NOT ChangeBSource AND NOT ChangeBUpdate Then
1325
                                                         NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &": </b><b><font style="&chr(34)&"background-color:red"&chr(34)&"> SOURCE CODE CHANGES</font></b>.</td>   <td width=""349""> <b>"& Ucase(rsQryB("rtag_name")) &":</b> <b><font style="&chr(34)&"background-color:#FF9933"&chr(34)&">SOURCE CODE CHANGES.</b></font></td>  </tr></table></blockquote>")
1326
                                                      ElseIf ChangeBUpdate Then
1327
                                                         NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &":</b> <b><font style="&chr(34)&"background-color:red"&chr(34)&">SOURCE CODE CHANGES.</font></b></td> <td width=""349""><b>"& Ucase(rsQryB("rtag_name")) &":</b><font color="&chr(34)&"#999999"&chr(34)&">No Updates.</font></td>  </tr></table></blockquote>")
1328
                                                      End If
1329
                                                   ElseIf ChangeAUpdate Then
1330
                                                      If NOT ChangeBSource AND NOT ChangeBUpdate Then
1331
                                                         NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &":</b> <font color="&chr(34)&"#999999"&chr(34)&">No Updates.</td> <td width=""349"">  <b></font>"& Ucase(rsQryB("rtag_name")) &":</b> <b><font style="&chr(34)&"background-color:#FF9933"&chr(34)&">SOURCE CODE CHANGES.</font></b></td>  </tr></table></blockquote>")
1332
                                                      ElseIf ChangeBSource Then
1333
                                                         NewTextFile.WriteLine("<blockquote><table width=""700"" border=""0"">  <tr><td width=""335""><b>"& Ucase(rsQryA("rtag_name")) &":</b> <font color="&chr(34)&"#999999"&chr(34)&">No Updates.</td> <td width=""349""> </font><b>"& Ucase(rsQryB("rtag_name")) &":</b> <font color="&chr(34)&"#999999"&chr(34)&">Ripple Builds Only.</font></td>  </tr></table></blockquote>")
1334
                                                      End If
1335
                                                   End If
1336
                                                End If
119 ghuddy 1337
 
123 ghuddy 1338
                                             End If  'changeType = "U" OR  changeType = "UW"
119 ghuddy 1339
 
123 ghuddy 1340
                                          End If  'email
119 ghuddy 1341
 
123 ghuddy 1342
                                       End If 'NOT (GetIsDiffFilterChecked(enumDB_NUM_DIFF_RIPPLE) = "checked" AND changeType = "UR")
119 ghuddy 1343
 
123 ghuddy 1344
                                       rsQry.MoveNext
1345
                                    WEnd
119 ghuddy 1346
 
123 ghuddy 1347
                                    rsQry.Close
1348
                                    Set rsQry = Nothing
1349
                                    %>
1350
                                    <%
1351
                                    Call Footer()
1352
                                    NewTextFile.Close
1353
                                    Set NewTextFile=Nothing
1354
                                    %>
1355
                                 </table>
1356
                                 <br>
1357
                              <%Else%>
1358
                                 <br>
1359
                                 <%
1360
                                 If (parRtagB <> "") Then
1361
                                    Call Messenger ( "Select <b>Release A</b> to compare.", 3, "100%" )
1362
                                 ElseIf (parRtagA <> "") Then
1363
                                    Call Messenger ( "Select <b>Release B</b> to compare.", 3, "100%" )
1364
                                 Else
1365
                                    Call Messenger ( "Select <b>Release A</b> and <b>Release B</b> to compare.", 3, "100%" )
1366
                                 End If
1367
                                 %>
1368
                              <%End If%>
1369
                           </td>
1370
                           <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
1371
                        </tr>
1372
                        <tr>
1373
                           <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
1374
                           <td background="images/lbox_bg_blue.gif"></td>
1375
                           <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
1376
                        </tr>
1377
                     </table>
1378
                  </td>
1379
               </tr>
119 ghuddy 1380
            </table>
123 ghuddy 1381
            <!-- DIFF END ---------------------------------------------------->
1382
         </td>
1383
         <td valign="top" width="1%" background="images/bg_home_orange.gif">
119 ghuddy 1384
 
123 ghuddy 1385
            <!-- SELECT RELEASE B ---------------------------------------------->
1386
            <br>
1387
            <table width="100%"  border="0" cellspacing="10" cellpadding="0">
1388
               <tr>
1389
                  <td align="left" class="body_col">
1390
                     <img src="images/i_rtag_open_mode.gif" border="0" align="absmiddle" width="15" height="13">&nbsp;Select Release B<hr size="1px" color="Olive" noshade>
1391
                  </td>
1392
               </tr>
1393
               <tr>
1394
                  <td align="left">
1395
                     <select name="projB" class="form_item" onChange="RequestReleaseCombo( '?proj_id='+ this.value, FormName.rtagB );">
1396
                        <option value="">-- Select Project --</option>
1397
                        <%
1398
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorB.Item("proj_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1399
 
123 ghuddy 1400
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ProjectsCombo.sql"), cint(0))
119 ghuddy 1401
 
123 ghuddy 1402
                        OraDatabase.Parameters.Remove "PROJ_ID"
119 ghuddy 1403
 
123 ghuddy 1404
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
1405
                           <option value="<%=rsQry("proj_id")%>" <%=rsQry("selected")%>><%=rsQry("proj_name")%></option>
1406
                           <%rsQry.MoveNext
1407
                        WEnd
119 ghuddy 1408
 
123 ghuddy 1409
                        rsQry.Close
1410
                        Set rsQry = Nothing
1411
                        %>
1412
                     </select>
1413
                  </td>
1414
               </tr>
1415
               <tr>
1416
                  <td align="left">
1417
                     <select name="rtagB" id="rtagB" class="form_item">
1418
                        <%
1419
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorB.Item("proj_id"),   ORAPARM_INPUT,  ORATYPE_NUMBER
1420
                        OraDatabase.Parameters.Add "RTAG_ID",    objRelCollectorB.Item("rtag_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1421
 
123 ghuddy 1422
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleasesCombo.sql"), cint(0))
119 ghuddy 1423
 
123 ghuddy 1424
                        OraDatabase.Parameters.Remove "PROJ_ID"
1425
                        OraDatabase.Parameters.Remove "RTAG_ID"
119 ghuddy 1426
 
123 ghuddy 1427
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
1428
                              <option value="<%=rsQry("rtag_id")%>" <%=rsQry("selected")%>><%=rsQry("rtag_name")%></option>
1429
                           <%rsQry.MoveNext
1430
                        WEnd
119 ghuddy 1431
 
123 ghuddy 1432
                        rsQry.Close
1433
                        Set rsQry = Nothing
1434
                        %>
1435
                     </select>
1436
                  </td>
1437
               </tr>
1438
               <%If (parRtagB <> "") Then%>
1439
                  <tr>
1440
                     <td align="left"><a href="dependencies.asp?rtag_id=<%=parRtagB%>" class="body_txt_drk">Go To Release B &raquo;</a></td>
1441
                  </tr>
1442
               <%End If%>
1443
            </table>
1444
            <!-- SELECT RELEASE B END ---------------------------------------------->
1445
         </td>
1446
      </tr>
1447
      <tr>
1448
         <td valign="bottom" align="center" background="images/bg_home_orange.gif">
1449
            <img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30">
1450
         </td>
1451
         <td background="images/bg_lght_gray.gif" valign="top">
1452
            <img src="images/h_trsp_dot.gif" width="1" height="500">
1453
         </td>
1454
         <td valign="bottom" background="images/bg_home_orange.gif" align="center">
1455
            <img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30">
1456
         </td>
1457
      </tr>
1458
   </table>
119 ghuddy 1459
</form>
1460
<!-- FOOTER -->
1461
<!--#include file="_footer.asp"-->
1462
<%
123 ghuddy 1463
If email Then
1464
   Dim myMail, LocalPath
1465
   Set myMail=Server.CreateObject("Persits.MailSender")
1466
   LocalPath = Server.MapPath("docs\compareReleases_"&objAccessControl.UserName&".html")
119 ghuddy 1467
 
123 ghuddy 1468
   myMail.Host = SMTP_HOST
1469
   myMail.Subject="Release Comparisons from Release Manager"
1470
   myMail.From="releasem@erggroup.com"
1471
   myMail.AddAddress objAccessControl.UserEmail
1472
   ' Attach the file
1473
   myMail.AddAttachment LocalPath
1474
   myMail.Body = "Your requested report..."
1475
   myMail.Send
119 ghuddy 1476
 
123 ghuddy 1477
   set myMail=nothing
1478
End If
119 ghuddy 1479
%>
1480
</body>
1481
</html>
1482
<%
1483
Call Destroy_All_Objects
1484
%>