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 -->
770
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
771
      <tr>
772
         <td><a href="index.asp" alt="Home" title="Home"><img src="images/b_release_manager.jpg" width="467" height="50" border="0"></a></td>
773
         <td valign="bottom" align="right">&nbsp;</td>
774
      </tr>
775
      <tr>
776
         <td align=left noWrap valign=center width=150 background="images/h_dot.gif" height="1"></td>
777
         <td background="images/h_dot.gif" height="1"></td>
778
      </tr>
779
   </table>
780
   <!-- BODY ---->
781
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
782
      <tr>
783
         <td width="1%" background="images/bg_home_orange.gif" valign="top">
784
            <!-- SELECT RELEASE A ---------------------------------------------->
785
            <br>
786
            <table width="100%"  border="0" cellspacing="10" cellpadding="0">
787
               <tr>
788
                  <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>
789
               </tr>
790
               <tr>
791
                  <td align="left">
792
                     <select name="projA" class="form_item" onChange="RequestReleaseCombo( '?proj_id='+ this.value, FormName.rtagA );">
793
                        <option value="">-- Select Project --</option>
794
                        <%
795
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorA.Item("proj_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 796
 
123 ghuddy 797
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ProjectsCombo.sql"), cint(0))
119 ghuddy 798
 
123 ghuddy 799
                        OraDatabase.Parameters.Remove "PROJ_ID"
119 ghuddy 800
 
123 ghuddy 801
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
802
                           <option value="<%=rsQry("proj_id")%>" <%=rsQry("selected")%>><%=rsQry("proj_name")%></option>
803
                           <%rsQry.MoveNext
804
                        WEnd
119 ghuddy 805
 
123 ghuddy 806
                        rsQry.Close
807
                        Set rsQry = Nothing
808
                        %>
809
                     </select>
810
                  </td>
811
               </tr>
812
               <tr>
813
                  <td align="left">
814
                     <select name="rtagA" id="rtagA" class="form_item">
815
                        <%
816
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorA.Item("proj_id"),   ORAPARM_INPUT,  ORATYPE_NUMBER
817
                        OraDatabase.Parameters.Add "RTAG_ID",    objRelCollectorA.Item("rtag_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 818
 
123 ghuddy 819
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleasesCombo.sql"), cint(0))
119 ghuddy 820
 
123 ghuddy 821
                        OraDatabase.Parameters.Remove "PROJ_ID"
822
                        OraDatabase.Parameters.Remove "RTAG_ID"
119 ghuddy 823
 
123 ghuddy 824
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
825
                              <option value="<%=rsQry("rtag_id")%>" <%=rsQry("selected")%>><%=rsQry("rtag_name")%></option>
826
                           <%rsQry.MoveNext
827
                        WEnd
119 ghuddy 828
 
123 ghuddy 829
                        rsQry.Close
830
                        Set rsQry = Nothing
831
                        %>
832
                     </select>
833
                  </td>
834
               </tr>
835
               <%If (parRtagA <> "") Then%>
119 ghuddy 836
                  <tr>
123 ghuddy 837
                     <td align="left"><a href="dependencies.asp?rtag_id=<%=parRtagA%>" class="body_txt_drk">Go To Release A &raquo;</a></td>
119 ghuddy 838
                  </tr>
123 ghuddy 839
               <%End If%>
840
            </table>
119 ghuddy 841
 
123 ghuddy 842
            <!-- SELECT RELEASE A END ---------------------------------------------->
843
         </td>
119 ghuddy 844
 
123 ghuddy 845
         <td width="1%" valign="top" background="images/bg_lght_gray.gif">&nbsp;</td>
119 ghuddy 846
 
123 ghuddy 847
         <td rowspan="2" valign="top" width="100%" background="images/bg_lght_gray.gif" align="center">
848
            <!-- DIFF -------------------------------------------------------->
849
            <br>
850
            <table width="100%" border="0" cellspacing="10" cellpadding="0">
851
               <tr>
852
                  <td>
853
                     <table width="100%" border="0" cellspacing="0" cellpadding="0">
854
                        <tr>
855
                           <td width="1%"></td>
856
                           <td width="100%" align="left" class="form_ttl">DIFF / MERGE RELEASE</td>
857
                           <td width="1%"></td>
858
                        </tr>
859
                        <tr>
860
                           <td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
861
                           <td background="images/lbox_bg_blue.gif" align="left" class="wform_ttl">&nbsp;</td>
862
                           <td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
863
                        </tr>
864
                        <tr>
865
                           <td width="1%" bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
866
                           <td bgcolor="#FFFFFF" valign="top" class="form_item">
867
                              <table width="100%"  border="0" cellspacing="0" cellpadding="5">
868
                                 <tr>
869
                                    <td width="100%" bgcolor="#DAD7C8">
870
                                       <input type="submit" name="btn" value="Compare" class="form_btn_comp" style="margin-right:5px;">
871
                                       <input type="submit" name="btn" value="Swap Compare" class="form_btn_comp">
872
                                       <span class="body_txt">
873
                                          <input name="btn" type="submit" class="form_btn" value="Mail Me Report">
874
                                       </span>
875
                                    </td>
876
                                    <td width="1" align="right" bgcolor="#DAD7C8" nowrap>
877
                                       <table width="100%"  border="0" cellspacing="0" cellpadding="0">
878
                                          <tr>
879
                                             <td>
880
                                                <%If (objRelCollectorB.Item("official") <> "Y" AND objRelCollectorB.Item("official") <> "C" ) AND (objAccessControl.IsActive("MergeRelease")) Then%>
881
                                                   <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
882
                                                <%End If%>
883
                                             </td>
884
                                             <td>
885
                                                <%If (objRelCollectorB.Item("official") = "C" ) AND (objAccessControl.IsActive("MergeReleaseForCCB")) Then%>
886
                                                   <input type="submit" name="btn" value="Merge" class="form_btn_comp" style="margin-right:10px;" <%If (parRtagA = "") OR (parRtagB = "")Then%>disabled<%End If%>>
887
                                                <%End If%>
888
                                             </td>
889
                                             <td>
890
                                                <input type="submit" name="btn" value="Exit" class="form_btn_comp">
891
                                             </td>
892
                                          </tr>
893
                                       </table>
894
                                    </td>
895
                                 </tr>
896
                                 <tr>
897
                                    <td>
898
                                       <%If (parRtagA <> "") AND (parRtagB <> "")Then%>
899
                                          <!-- DIFF FILTER +++++++++++++++++++++++++++++++++++++++++++ -->
900
                                          <fieldset style="width:150px;">
901
                                             <legend><a href="javascript:;" class="body_scol" onClick="ToggleDisplay('divDiffFilter');" ><%=GetIsDiffFilterInUseIcon() %>&nbsp;Filter&nbsp;Results...</a></legend>
902
                                             <div name="divDiffFilter" id="divDiffFilter" class="body_txt" style="display:none;">
903
                                                <br>
904
                                                <table width="100%"  border="0" cellspacing="1" cellpadding="3">
905
                                                   <tr>
906
                                                      <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>
907
                                                      <td width="50" nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_UPDATED%>Updated</td>
908
                                                   </tr>
909
                                                   <tr>
910
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_NEW%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_NEW)%>></td>
911
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_ADDED%>Added</td>
912
                                                   </tr>
913
                                                   <tr>
914
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_REMOVED%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_REMOVED)%>></td>
915
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_REMOVED%>Removed</td>
916
                                                   </tr>
917
                                                   <tr>
918
                                                      <td background="images/bg_action_norm.gif"><input type="checkbox" name="difilter" value="<%=enumDB_NUM_DIFF_RIPPLE%>" <%=GetIsDiffFilterChecked(enumDB_NUM_DIFF_RIPPLE)%>></td>
919
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field"><%=LIMG_RIPPLED%>Rippled</td>
920
                                                   </tr>
921
                                                   <tr>
922
                                                      <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>
923
                                                      <td nowrap background="images/bg_action_norm.gif" class="form_field">Unchanged</td>
924
                                                   </tr>
925
                                                   <tr>
926
                                                      <td background="images/bg_action_norm.gif">&nbsp;</td>
927
                                                      <td background="images/bg_action_norm.gif"><input name="btn" type="submit" class="form_btn" value="Hide"></td>
928
                                                   </tr>
929
                                                </table>
930
                                             </div>
931
                                          </fieldset>
932
                                          <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
933
                                       <%End If%>
934
                                    </td>
935
                                    <td></td>
936
                                 </tr>
937
                              </table>
119 ghuddy 938
 
123 ghuddy 939
                              <%
940
                              ' Successfull Merge
941
                              If (Request("btn") = "Merge") Then
942
                                 Call Messenger ( "Merge has completed successfully.", 3, "100%" )
943
                              End If
119 ghuddy 944
 
123 ghuddy 945
                              Set FSO=Server.CreateObject("Scripting.FileSystemObject")
946
                              Set NewTextFile=FSO.CreateTextFile(Server.MapPath("docs\compareReleases_"&objAccessControl.UserName&".html"), true)
119 ghuddy 947
 
123 ghuddy 948
                              Call Header()
119 ghuddy 949
 
123 ghuddy 950
                              If (parRtagA <> "") AND (parRtagB <> "")Then%>
951
                                 <table width="100%"  border="0" cellspacing="1" cellpadding="0">
952
                                    <tr>
953
                                       <td width="50%" bgcolor="#E4E9EC" class="body_row" nowrap><%= ReleaseIcon(objRelCollectorA.Item("official")) & objRelCollectorA.Item("location")%> </td>
954
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="1"></td>
955
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="20"></td>
956
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="1"></td>
957
                                       <td width="50%" bgcolor="#E4E9EC" class="body_row" nowrap><%= ReleaseIcon(objRelCollectorB.Item("official")) & objRelCollectorB.Item("location")%></td>
958
                                       <td width="1" bgcolor="#E4E9EC"><img src="images/spacer.gif" width="20" height="1"></td>
959
                                    </tr>
960
                                    <%
961
                                    OraDatabase.Parameters.Add "RTAG_A",    parRtagA,   ORAPARM_INPUT, ORATYPE_NUMBER
962
                                    OraDatabase.Parameters.Add "RTAG_B",    parRtagB,   ORAPARM_INPUT, ORATYPE_NUMBER
963
                                    OraDatabase.Parameters.Add "NO_CHANGE", GetIsDiffFilterChecked(enumDB_NUM_DIFF_NO_CHANGE), ORAPARM_INPUT, ORATYPE_VARCHAR2
964
                                    OraDatabase.Parameters.Add "ADDED",     GetIsDiffFilterChecked(enumDB_NUM_DIFF_NEW),       ORAPARM_INPUT, ORATYPE_VARCHAR2
965
                                    OraDatabase.Parameters.Add "UPDATED",   GetIsDiffFilterChecked(enumDB_NUM_DIFF_UPDATED),   ORAPARM_INPUT, ORATYPE_VARCHAR2
966
                                    OraDatabase.Parameters.Add "REMOVED",   GetIsDiffFilterChecked(enumDB_NUM_DIFF_REMOVED),   ORAPARM_INPUT, ORATYPE_VARCHAR2
119 ghuddy 967
 
123 ghuddy 968
                                    Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseDiff.sql"), cint(0))
119 ghuddy 969
 
123 ghuddy 970
                                    OraDatabase.Parameters.Remove "RTAG_A"
971
                                    OraDatabase.Parameters.Remove "RTAG_B"
972
                                    OraDatabase.Parameters.Remove "NO_CHANGE"
973
                                    OraDatabase.Parameters.Remove "ADDED"
974
                                    OraDatabase.Parameters.Remove "UPDATED"
975
                                    OraDatabase.Parameters.Remove "REMOVED"
119 ghuddy 976
 
123 ghuddy 977
                                    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))
978
                                    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 979
 
123 ghuddy 980
                                    Call Javascript()
119 ghuddy 981
 
123 ghuddy 982
                                    NewTextFile.WriteLine("<title>Difference Report Between "&rsQryA("proj_name")&" "&rsQryA("rtag_name")&" and "&rsQryB("proj_name")&" "&rsQryB("rtag_name")&"</title>")
983
                                    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>")
984
                                    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 985
 
123 ghuddy 986
                                    Dim currView_id
987
                                    currView_id = -1
119 ghuddy 988
 
123 ghuddy 989
                                    While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
990
                                       errormsg = false
991
                                       rowId = rsQry("pv_id_a") &"_"& rsQry("pv_id_b")
119 ghuddy 992
 
123 ghuddy 993
                                       btnMerge = LIMG_MERGE
994
                                       btnRemove = LIMG_REMOVE
995
                                       colorA = LCOLOR_NOT_CHANGED
996
                                       colorB = LCOLOR_NOT_CHANGED
119 ghuddy 997
 
123 ghuddy 998
                                       changeType = rsQry("change_type")
119 ghuddy 999
 
123 ghuddy 1000
                                       Select Case changeType
1001
                                          Case "U"
1002
                                             colorA = LCOLOR_CHANGED
1003
                                             colorB = LCOLOR_CHANGED
1004
                                          Case "UW"
1005
                                             colorA = LCOLOR_CHANGED
1006
                                             colorB = LCOLOR_CHANGED
1007
                                             btnMerge = LIMG_MERGE_WARN
1008
                                          Case "UR"
1009
                                             colorA = LCOLOR_RIPPLED
1010
                                             colorB = LCOLOR_RIPPLED
1011
                                          Case "A"
1012
                                             colorA = LCOLOR_BLANK
1013
                                          Case "R"
1014
                                             colorB = LCOLOR_BLANK
1015
                                       End Select
119 ghuddy 1016
 
123 ghuddy 1017
                                       Call GetDiffStateIcon ( changeType, ChangeTypeIcon )
119 ghuddy 1018
 
123 ghuddy 1019
                                       If changeType = "U" OR changeType = "UW" OR changeType = "UR" Then
1020
                                          Dim MajorA, MajorB, MinorA, MinorB, PatchA, PatchB, BuildA, BuildB, pos, pkgVersionA, pkgVersionB, majMinA, majMinB
1021
                                          MajorA = NULL
1022
                                          MajorB = NULL
1023
                                          MinorA = NULL
1024
                                          MinorB = NULL
119 ghuddy 1025
 
123 ghuddy 1026
                                          pkgVersionA = rsQry("pkg_version_a")
1027
                                          pkgVersionB = rsQry("pkg_version_b")
119 ghuddy 1028
 
123 ghuddy 1029
                                          PatchA = rsQry("patch_number_a")
1030
                                          PatchB = rsQry("patch_number_b")
1031
                                          BuildA = rsQry("build_number_a")
1032
                                          BuildB = rsQry("build_number_b")
119 ghuddy 1033
 
1034
 
123 ghuddy 1035
                                          ' Find the first occurence of the dot in package version A
1036
                                          pos = InStr(pkgVersionA, ".")
1037
                                          If pos <> 0 Then
1038
                                             ' Extract the Major Version for A
1039
                                             MajorA = Mid(pkgVersionA, 1, pos - 1)
1040
                                             ' Delete the Major Version Value from the string to get the minor and patch version
1041
                                             pkgVersionA = Mid(pkgVersionA, pos + 1, Len(pkgVersionA))
1042
                                             ' Find the second occurence of the dot in package version A
1043
                                             pos = InStr(pkgVersionA, ".")
1044
                                             ' Extract the Minor Version for A
1045
                                             If pos <> 0 Then
1046
                                                MinorA = Mid(pkgVersionA, 1, pos - 1)
1047
                                             End If
1048
                                          End If
119 ghuddy 1049
 
123 ghuddy 1050
                                          ' Find the first occurence of the dot in package version B
1051
                                          pos = InStr(pkgVersionB, ".")
1052
                                          If pos <> 0 Then
1053
                                             ' Extract the Major Version for B
1054
                                             MajorB = Mid(pkgVersionB, 1, pos - 1)
1055
                                             ' Delete the Major Version Value from the string to get the minor and patch version
1056
                                             pkgVersionB = Mid(pkgVersionB, pos + 1, Len(pkgVersionB))
1057
                                             ' Find the second occurence of the dot in package version B
1058
                                             pos = InStr(pkgVersionB, ".")
1059
                                             ' Extract the Minor Version for B
1060
                                             If pos <> 0 Then
1061
                                                MinorB = Mid(pkgVersionB, 1, pos - 1)
1062
                                             End If
1063
                                          End If
119 ghuddy 1064
 
123 ghuddy 1065
                                          If MajorA = MajorB Then
1066
                                             If MinorA = MinorB Then
1067
                                                If IsNumeric(PatchA) AND IsNumeric(PatchB) Then
1068
                                                   If CInt(PatchB) > CInt(PatchA) Then
1069
                                                      btnMerge = LIMG_MERGE_WARN
1070
                                                   Else
1071
                                                      btnMerge = LIMG_MERGE
1072
                                                   End If
1073
                                                End If
1074
                                             Else
1075
                                                If IsNumeric(MinorA) AND IsNumeric(MinorB) Then
1076
                                                   If CInt(MinorB) > CInt(MinorA) Then
1077
                                                      btnMerge = LIMG_MERGE_WARN
1078
                                                   Else
1079
                                                      btnMerge = LIMG_MERGE
1080
                                                   End If
1081
                                                End If
1082
                                             End If
1083
                                          Else
1084
                                             If IsNumeric(MajorA) AND IsNumeric(MajorB) Then
1085
                                                If    CInt(MajorB) > CInt(MajorA) Then
1086
                                                   btnMerge = LIMG_MERGE_WARN
1087
                                                Else
1088
                                                   btnMerge = LIMG_MERGE
1089
                                                End If
1090
                                             End If
1091
                                          End If
1092
                                       End If
119 ghuddy 1093
 
123 ghuddy 1094
                                       ' -------- FILTERS RIPPLE BUILDS WHEN CHECKED -----------------
1095
                                       If NOT (GetIsDiffFilterChecked(enumDB_NUM_DIFF_RIPPLE) = "checked" AND changeType = "UR") THEN
119 ghuddy 1096
 
123 ghuddy 1097
                                          ' -------- GROUP BY BASE VIEW  -----------------
1098
                                          If CDbl(currView_id) <> CDbl(rsQry("view_id")) Then%>
1099
                                             <tr>
1100
                                                <td valign="top" nowrap class="form_ttl"><b><%=rsQry("view_name")%></b></td>
1101
                                                <td class="form_ttl">&nbsp;</td>
1102
                                                <td class="form_ttl">&nbsp;</td>
1103
                                                <td class="form_ttl">&nbsp;</td>
1104
                                                <td class="form_ttl">&nbsp;</td>
1105
                                                <td class="form_ttl">&nbsp;</td>
1106
                                             </tr>
1107
                                             <%
1108
                                             currView_id = CDbl(rsQry("view_id"))
1109
                                          End If
1110
                                          ' -------- END GROUP ------------------------
1111
                                          %>
1112
                                          <%
1113
                                          'Determine if we are dealing with a PV_ID that we have already encountered and displayed as a pending addition
1114
                                          'If we are, we do not need to display anything more about it, so skip the row.
1115
                                          ' NOTE. the result set is sorted by change type (see releasediff.sql) such that if there are multiple entries
1116
                                          '       for the same PV_ID, they are sorted in the following order: unchanged, additions, removals, updates.
1117
                                          '       This is important to the row skip filtering carried out below.
1118
                                          Dim skipRow
1119
                                          If rsQry("pv_id_a") Then
1120
                                             skipRow = pendingAdditions.Exists(CStr(rsQry("pv_id_a")))
1121
                                          Else
1122
                                             skipRow = FALSE
1123
                                          End If
1124
                                          %>
1125
                                          <%If NOT skipRow Then%>
1126
                                             <tr>
1127
                                                <td class="body_row" nowrap>
1128
                                                   <DIV id="PVA<%=rowId%>" style="background:<%=colorA%>; padding:5px;">
1129
                                                      <%=rsQry("pkg_name_a") &" "& rsQry("pkg_version_a")%>
1130
                                                   </DIV>
1131
                                                   <input type="hidden" id="UNDOCOLORA_<%=rowId%>" value="<%=colorA%>">
1132
                                                </td>
1133
                                                <td bgcolor="#F5F5F5">
1134
                                                   <%If objRelCollectorB.Item("official") <> "Y" Then%>
1135
                                                      <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>
1136
                                                   <%End If%>
1137
                                                </td>
1138
                                                <td bgcolor="#E4E9EC">
1139
                                                   <DIV id="IMGSTATE<%=rowId%>" ><%=ChangeTypeIcon%></DIV>
1140
                                                   <input type="hidden" id="CHANGETYPE_<%=rowId%>" value="<%=changeType%>">
1141
                                                </td>
1142
                                                <td bgcolor="#F5F5F5">
1143
                                                   <%If objRelCollectorB.Item("official") <> "Y" Then%>
1144
                                                      <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>
1145
                                                   <%End If%>
1146
                                                </td>
1147
                                                <td class="body_row" nowrap>
1148
                                                   <DIV id="PVB<%=rowId%>" style="background:<%=colorB%>; padding:5px;">
1149
                                                      <%If IsNull(rsQry("pv_id_b")) Then %>
1150
                                                         <%If Is_Pending_Sub(Request("rtagB"), rsQry("pv_id_a")) Then%>
1151
                                                            (removal pending<%=Quick_Help("RemovalPending")%>)
1152
                                                         <%End If %>
1153
                                                      <%Else%>
1154
                                                         <%=rsQry("pkg_name_b") &" "& rsQry("pkg_version_b")%>
1155
                                                         <%If Is_Pending_Add(Request("rtagB"), rsQry("pv_id_b")) Then%>
1156
                                                            (addition pending<%=Quick_Help("AdditionPending")%>)
1157
                                                            <% 'Add this pending addition to the dictionary so that we can filter out REMOVED entries
1158
                                                               'with identical PV_ID's that we might encounter further on in the result set
1159
                                                            If NOT pendingAdditions.Exists(rsQry("pv_id_b")) Then
1160
                                                               pendingAdditions.Add CStr(rsQry("pv_id_b")), CStr(rsQry("pkg_version_b"))
1161
                                                            End If%>
1162
                                                         <%ElseIf Is_Pending_Sub(Request("rtagB"), rsQry("pv_id_b")) Then%>
1163
                                                            (removal pending<%=Quick_Help("RemovalPending")%>)
1164
                                                         <%End If %>
1165
                                                      <%End If %>
1166
                                                   </DIV>
1167
                                                   <input type="hidden" id="UNDOCOLORB_<%=rowId%>" value="<%=colorB%>">
1168
                                                   <input type="hidden" name="addpkg" id="ADDPKG_<%=rowId%>" value="">
1169
                                                   <input type="hidden" name="removepkg" id="REMOVEPKG_<%=rowId%>" value="">
1170
                                                   <input type="hidden" id="UNDOPKG_<%=rowId%>" value="<%=rsQry("pkg_name_b") &" "& rsQry("pkg_version_b")%>">
1171
                                                </td>
1172
                                                <td bgcolor="#F5F5F5">
1173
                                                   <DIV id="IMGUNDO<%=rowId%>" style="display:none;" >
1174
                                                      <a href="javascript:;" onClick="UndoPackage( '<%=rowId%>' );"><%=LIMG_UNDO%></a>
1175
                                                   </DIV>
1176
                                                </td>
1177
                                             </tr>
1178
                                          <%End If %>
119 ghuddy 1179
 
123 ghuddy 1180
                                          <%
1181
                                          If email AND NOT skipRow  Then
1182
                                             If rsQry("pv_id_a") Then
1183
                                                Set rsQryCommentsA = OraDatabase.DbCreateDynaset( "SELECT COMMENTS FROM PACKAGE_VERSIONS WHERE PV_ID="& rsQry("pv_id_a"), cint(0))
1184
                                             End If
119 ghuddy 1185
 
123 ghuddy 1186
                                             If rsQry("pv_id_b") Then
1187
                                                Set rsQryCommentsB = OraDatabase.DbCreateDynaset( "SELECT COMMENTS FROM PACKAGE_VERSIONS WHERE PV_ID="& rsQry("pv_id_b"), cint(0))
1188
                                             End If
119 ghuddy 1189
 
123 ghuddy 1190
                                             pkgA = rsQry("pkg_name_a")
1191
                                             pkgB = rsQry("pkg_name_b")
119 ghuddy 1192
 
123 ghuddy 1193
                                             If pkgA <> "" then
1194
                                                pkgname = pkgA
1195
                                             Else
1196
                                                pkgname = pkgB
1197
                                             End If
119 ghuddy 1198
 
123 ghuddy 1199
                                             If changeType = "U" OR  changeType = "UW" Then
1200
                                                ChangeASource = false
1201
                                                ChangeAUpdate = false
1202
                                                ChangeBSource = false
1203
                                                ChangeBUpdate = false
119 ghuddy 1204
 
123 ghuddy 1205
                                                'NewTextFile.WriteLine("<br><b><font face="&chr(34)&"arial"&chr(34)&">"&pkgname&"</font></b>")
1206
                                                NewTextFile.Write("<SPAN id=""spanShowDetails"& rowId &""" name=""spanShowDetails""><a href=""javascript:;"" class=""body_scol"" onClick=""DisplaySPAN(true,'"& rowId &"');"">"& pkgname &"</a></SPAN>")
1207
                                                NewTextFile.Write("<SPAN id=""spanHideDetails"& rowId &""" name=""spanHideDetails"" style=""display:none;""><a href=""javascript:;"" class=""body_scol"" onClick=""DisplaySPAN(false,'"& rowId &"');"">"& pkgname &"</a></SPAN>")
1208
                                                NewTextFile.WriteLine("<SPAN id=""spanPkgInfo"& rowId &""" name=""spanPkgInfo"" style=""display:none;"">")
1209
                                                NewTextFile.Write(rsQryA("rtag_name")&" uses: "&rsQry("pkg_version_a")&" (")
1210
                                                Call Release(rsQry("pv_id_a"))
1211
                                                NewTextFile.WriteLine(")<br>")
1212
                                                NewTextFile.Write(rsQryB("rtag_name")&" uses: "&rsQry("pkg_version_b")&" (")
1213
                                                Call Release(rsQry("pv_id_b"))
1214
                                                NewTextFile.WriteLine(")<br>")
119 ghuddy 1215
 
123 ghuddy 1216
                                                a = rsQry("pv_id_a")
1217
                                                b = rsQry("pv_id_b")
1218
                                                c = rsQry("pv_id_a")
1219
                                                d = rsQry("pv_id_b")
119 ghuddy 1220
 
123 ghuddy 1221
                                                Set pvCollectionA = CreateObject("Scripting.Dictionary")
1222
                                                Set pvCollectionB = CreateObject("Scripting.Dictionary")
1223
                                                On Error Resume Next
1224
                                                While CLng(a) <> CLng(b) and NOT errormsg
119 ghuddy 1225
 
123 ghuddy 1226
                                                   'NewTextFile.WriteLine("A: "&a)
1227
                                                   'NewTextFile.WriteLine("B: "&b)
1228
                                                   pvCollectionA.Add CStr(a), Empty
1229
                                                   pvCollectionB.Add CStr(b), Empty
1230
                                                   If CLng(a) > CLng(b) Then
1231
                                                      'NewTextFile.WriteLine("TestA")
1232
                                                      Call LastPvIdA(a)
1233
                                                   ElseIf CLng(b) > CLng(a) Then
1234
                                                      'NewTextFile.WriteLine("TestB")
1235
                                                      Call LastPvIdB(b)
1236
                                                   End If
1237
                                                Wend
119 ghuddy 1238
 
123 ghuddy 1239
                                                Set pvCollectionA = Nothing
1240
                                                Set pvCollectionB = Nothing
119 ghuddy 1241
 
123 ghuddy 1242
                                                Call pkg_Version(a)
1243
                                                NewTextFile.Write("Common PARENT package version: "&pkgversion&" (")
1244
                                                Call Release(a)
1245
                                                NewTextFile.WriteLine(")<br><br>")
1246
                                                NewTextFile.WriteLine()
1247
                                                NewTextFile.WriteLine("<b>"&rsQryA("rtag_name")&"</b>")
119 ghuddy 1248
 
123 ghuddy 1249
                                                If pkgversion <> rsQry("pkg_version_a") Then
1250
                                                   NewTextFile.WriteLine("<blockquote><b><i>Versions between "& pkgversion &" and "& rsQry("pkg_version_a")&"</i></b></blockquote>")
119 ghuddy 1251
 
123 ghuddy 1252
                                                   If errormsg Then
1253
                                                      NewTextFile.WriteLine("Error determining root!<br>")
1254
                                                      NewTextFile.WriteLine()
1255
                                                   End If
119 ghuddy 1256
 
123 ghuddy 1257
                                                   source_change = false
119 ghuddy 1258
 
123 ghuddy 1259
                                                   While CLng(a) <> CLng(c) and NOT errormsg
1260
                                                      Call Comments(c)
1261
                                                      Call GetFixedIssues(c)
1262
                                                      Call LastPvIdAa(c)
1263
                                                      NewTextFile.WriteLine()
1264
                                                   Wend
119 ghuddy 1265
 
123 ghuddy 1266
                                                   If source_change = false Then
1267
                                                      NewTextFile.WriteLine("<blockquote><b><i>No source changes to "& rsQryA("rtag_name")&". Only Rippled Builds.</i></b></blockquote><br>")
1268
                                                      ChangeASource = true
1269
                                                   End If
119 ghuddy 1270
 
123 ghuddy 1271
                                                   Call pkg_Version(b)
1272
                                                   NewTextFile.WriteLine()
1273
                                                   NewTextFile.WriteLine()
119 ghuddy 1274
 
123 ghuddy 1275
                                                ElseIf pkgversion = rsQry("pkg_version_a") Then
1276
                                                   NewTextFile.WriteLine("<blockquote><b><i>No updates to "& rsQryA("rtag_name")&"</i></b></blockquote><br>")
1277
                                                   ChangeAUpdate = true
1278
                                                   NewTextFile.WriteLine()
1279
                                                End If
119 ghuddy 1280
 
123 ghuddy 1281
                                                NewTextFile.WriteLine("<b>"&rsQryB("rtag_name")&"</b>")
119 ghuddy 1282
 
123 ghuddy 1283
                                                If pkgversion <> rsQry("pkg_version_b") Then
1284
                                                   NewTextFile.WriteLine("<blockquote><b><i>Versions between "& pkgversion &" and "& rsQry("pkg_version_b")&"</i></b></blockquote>")
119 ghuddy 1285
 
123 ghuddy 1286
                                                   If errormsg Then
1287
                                                      NewTextFile.WriteLine("Error determining root!<br>")
1288
                                                      NewTextFile.WriteLine()
1289
                                                   End If
119 ghuddy 1290
 
123 ghuddy 1291
                                                   source_change = false
119 ghuddy 1292
 
123 ghuddy 1293
                                                   While CLng(b) <> CLng(d) and NOT errormsg
1294
                                                      Call Comments(d)
1295
                                                      Call GetFixedIssues(d)
1296
                                                      Call LastPvIdBb(d)
1297
                                                      NewTextFile.WriteLine()
1298
                                                   Wend
119 ghuddy 1299
 
123 ghuddy 1300
                                                   If source_change = false Then
1301
                                                      NewTextFIle.WriteLine("<blockquote><b><i>No source changes to "& rsQryB("rtag_name")&". Only Rippled Builds.</i></b></blockquote><br>")
1302
                                                      ChangeBSource = true
1303
                                                   End If
119 ghuddy 1304
 
123 ghuddy 1305
                                                ElseIf pkgversion = rsQry("pkg_version_b") Then
1306
                                                   NewTextFile.WriteLine("<blockquote><b><i>No updates to "& rsQryB("rtag_name")&"</i></b></blockquote><br>")
1307
                                                   ChangeBUpdate = true
1308
                                                   NewTextFile.WriteLine()
1309
                                                End If
119 ghuddy 1310
 
123 ghuddy 1311
                                                NewTextFile.WriteLine("</SPAN>")
119 ghuddy 1312
 
123 ghuddy 1313
                                                If ChangeASource Then
1314
                                                   If ChangeBSource Then
1315
                                                      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>")
1316
                                                   ElseIf ChangeBUpdate Then
1317
                                                      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>")
1318
                                                   ElseIf NOT ChangeBSource AND NOT ChangeBUpdate Then
1319
                                                      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>")
1320
                                                   End If
1321
                                                End If
119 ghuddy 1322
 
123 ghuddy 1323
                                                If ChangeBSource Then
1324
                                                   If NOT ChangeAUpdate Then
1325
                                                      If NOT ChangeASource AND NOT ChangeBUpdate Then
1326
                                                         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>")
1327
                                                      End If
1328
                                                   End If
1329
                                                End If
119 ghuddy 1330
 
123 ghuddy 1331
                                                If NOT ChangeASource Then
1332
                                                   If NOT ChangeAUpdate Then
1333
                                                      If NOT ChangeBSource AND NOT ChangeBUpdate Then
1334
                                                         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>")
1335
                                                      ElseIf ChangeBUpdate Then
1336
                                                         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>")
1337
                                                      End If
1338
                                                   ElseIf ChangeAUpdate Then
1339
                                                      If NOT ChangeBSource AND NOT ChangeBUpdate Then
1340
                                                         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>")
1341
                                                      ElseIf ChangeBSource Then
1342
                                                         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>")
1343
                                                      End If
1344
                                                   End If
1345
                                                End If
119 ghuddy 1346
 
123 ghuddy 1347
                                             End If  'changeType = "U" OR  changeType = "UW"
119 ghuddy 1348
 
123 ghuddy 1349
                                          End If  'email
119 ghuddy 1350
 
123 ghuddy 1351
                                       End If 'NOT (GetIsDiffFilterChecked(enumDB_NUM_DIFF_RIPPLE) = "checked" AND changeType = "UR")
119 ghuddy 1352
 
123 ghuddy 1353
                                       rsQry.MoveNext
1354
                                    WEnd
119 ghuddy 1355
 
123 ghuddy 1356
                                    rsQry.Close
1357
                                    Set rsQry = Nothing
1358
                                    %>
1359
                                    <%
1360
                                    Call Footer()
1361
                                    NewTextFile.Close
1362
                                    Set NewTextFile=Nothing
1363
                                    %>
1364
                                 </table>
1365
                                 <br>
1366
                              <%Else%>
1367
                                 <br>
1368
                                 <%
1369
                                 If (parRtagB <> "") Then
1370
                                    Call Messenger ( "Select <b>Release A</b> to compare.", 3, "100%" )
1371
                                 ElseIf (parRtagA <> "") Then
1372
                                    Call Messenger ( "Select <b>Release B</b> to compare.", 3, "100%" )
1373
                                 Else
1374
                                    Call Messenger ( "Select <b>Release A</b> and <b>Release B</b> to compare.", 3, "100%" )
1375
                                 End If
1376
                                 %>
1377
                              <%End If%>
1378
                           </td>
1379
                           <td width="1%" background="images/lbox_bgside_white.gif">&nbsp;</td>
1380
                        </tr>
1381
                        <tr>
1382
                           <td width="1%" background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
1383
                           <td background="images/lbox_bg_blue.gif"></td>
1384
                           <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>
1385
                        </tr>
1386
                     </table>
1387
                  </td>
1388
               </tr>
119 ghuddy 1389
            </table>
123 ghuddy 1390
            <!-- DIFF END ---------------------------------------------------->
1391
         </td>
1392
         <td valign="top" width="1%" background="images/bg_home_orange.gif">
119 ghuddy 1393
 
123 ghuddy 1394
            <!-- SELECT RELEASE B ---------------------------------------------->
1395
            <br>
1396
            <table width="100%"  border="0" cellspacing="10" cellpadding="0">
1397
               <tr>
1398
                  <td align="left" class="body_col">
1399
                     <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>
1400
                  </td>
1401
               </tr>
1402
               <tr>
1403
                  <td align="left">
1404
                     <select name="projB" class="form_item" onChange="RequestReleaseCombo( '?proj_id='+ this.value, FormName.rtagB );">
1405
                        <option value="">-- Select Project --</option>
1406
                        <%
1407
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorB.Item("proj_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1408
 
123 ghuddy 1409
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ProjectsCombo.sql"), cint(0))
119 ghuddy 1410
 
123 ghuddy 1411
                        OraDatabase.Parameters.Remove "PROJ_ID"
119 ghuddy 1412
 
123 ghuddy 1413
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
1414
                           <option value="<%=rsQry("proj_id")%>" <%=rsQry("selected")%>><%=rsQry("proj_name")%></option>
1415
                           <%rsQry.MoveNext
1416
                        WEnd
119 ghuddy 1417
 
123 ghuddy 1418
                        rsQry.Close
1419
                        Set rsQry = Nothing
1420
                        %>
1421
                     </select>
1422
                  </td>
1423
               </tr>
1424
               <tr>
1425
                  <td align="left">
1426
                     <select name="rtagB" id="rtagB" class="form_item">
1427
                        <%
1428
                        OraDatabase.Parameters.Add "PROJ_ID",    objRelCollectorB.Item("proj_id"),   ORAPARM_INPUT,  ORATYPE_NUMBER
1429
                        OraDatabase.Parameters.Add "RTAG_ID",    objRelCollectorB.Item("rtag_id"),   ORAPARM_INPUT, ORATYPE_NUMBER
119 ghuddy 1430
 
123 ghuddy 1431
                        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleasesCombo.sql"), cint(0))
119 ghuddy 1432
 
123 ghuddy 1433
                        OraDatabase.Parameters.Remove "PROJ_ID"
1434
                        OraDatabase.Parameters.Remove "RTAG_ID"
119 ghuddy 1435
 
123 ghuddy 1436
                        While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
1437
                              <option value="<%=rsQry("rtag_id")%>" <%=rsQry("selected")%>><%=rsQry("rtag_name")%></option>
1438
                           <%rsQry.MoveNext
1439
                        WEnd
119 ghuddy 1440
 
123 ghuddy 1441
                        rsQry.Close
1442
                        Set rsQry = Nothing
1443
                        %>
1444
                     </select>
1445
                  </td>
1446
               </tr>
1447
               <%If (parRtagB <> "") Then%>
1448
                  <tr>
1449
                     <td align="left"><a href="dependencies.asp?rtag_id=<%=parRtagB%>" class="body_txt_drk">Go To Release B &raquo;</a></td>
1450
                  </tr>
1451
               <%End If%>
1452
            </table>
1453
            <!-- SELECT RELEASE B END ---------------------------------------------->
1454
         </td>
1455
      </tr>
1456
      <tr>
1457
         <td valign="bottom" align="center" background="images/bg_home_orange.gif">
1458
            <img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30">
1459
         </td>
1460
         <td background="images/bg_lght_gray.gif" valign="top">
1461
            <img src="images/h_trsp_dot.gif" width="1" height="500">
1462
         </td>
1463
         <td valign="bottom" background="images/bg_home_orange.gif" align="center">
1464
            <img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30">
1465
         </td>
1466
      </tr>
1467
   </table>
119 ghuddy 1468
</form>
1469
<!-- FOOTER -->
1470
<!--#include file="_footer.asp"-->
1471
<%
123 ghuddy 1472
If email Then
1473
   Dim myMail, LocalPath
1474
   Set myMail=Server.CreateObject("Persits.MailSender")
1475
   LocalPath = Server.MapPath("docs\compareReleases_"&objAccessControl.UserName&".html")
119 ghuddy 1476
 
123 ghuddy 1477
   myMail.Host = SMTP_HOST
1478
   myMail.Subject="Release Comparisons from Release Manager"
1479
   myMail.From="releasem@erggroup.com"
1480
   myMail.AddAddress objAccessControl.UserEmail
1481
   ' Attach the file
1482
   myMail.AddAttachment LocalPath
1483
   myMail.Body = "Your requested report..."
1484
   myMail.Send
119 ghuddy 1485
 
123 ghuddy 1486
   set myMail=nothing
1487
End If
119 ghuddy 1488
%>
1489
</body>
1490
</html>
1491
<%
1492
Call Destroy_All_Objects
1493
%>