Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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