Subversion Repositories DevTools

Rev

Rev 6371 | Rev 6480 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
Option explicit
4
Response.Expires = 0   ' always load the page, dont store
5
%>
6
<%
7
'=====================================================
8
'               Ripple Properties
9
'=====================================================
10
%>
11
<!--#include file="common/conf.asp"-->
12
<!--#include file="common/globals.asp"-->
13
<!--#include file="common/formating.asp"-->
14
<!--#include file="common/qstr.asp"-->
15
<!--#include file="common/common_subs.asp"-->
16
<!--#include file="common/common_dbedit.asp"-->
17
<!--#include file="common/_popup_window_common.asp"-->
18
<%
19
' Set rfile parameter. This is a return page after Login
20
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
21
'------------ ACCESS CONTROL ------------------
22
%>
23
<!--#include file="_access_control_login.asp"-->
24
<!--#include file="_access_control_general.asp"-->
25
<!--#include file="_access_control_project.asp"-->
26
<%
27
'------------ Variable Definition -------------
28
Dim parPv_id
29
Dim query
30
Dim rsQry, rsTemp
31
Dim checked
32
Dim FRripplebuildYES, FRripplebuildNO
33
Dim objFormCollector
34
Dim Query_String
35
Dim isDLocked
36
Dim isNotSdk
37
'------------ Constants Declaration -----------
38
'------------ Variable Init -------------------
39
Set objFormCollector = CreateObject("Scripting.Dictionary")
40
parPv_id = QStrPar("pv_id")
41
'----------------------------------------------
42
%>
43
<%
44
'------------------------------------------------------------------------------------------------------------------------------------
45
Sub UpdateRippleType ( )
46
   Dim rsTemp, Query_String
47
   Dim storedRippleType
48
   Dim storedMajorLimit
49
   Dim storedMinorLimit
50
   Dim storedPatchLimit
51
   Dim storedBuildNumberLimit
52
   Dim selectedRippleType
53
   selectedRippleType = Request("ripple_type_combo")
54
   Dim enteredMajorLimit
55
   ' enteredMajorLimit is a string of digits
56
   ' it will be compared with a string representing a NUMBER in the db
57
   ' use CInt to at least strip leading zeros
58
   enteredMajorLimit = CInt(Request("Major"))
59
   Dim enteredMinorLimit
60
   enteredMinorLimit = CInt(Request("Minor"))
61
   Dim enteredPatchLimit
62
   enteredPatchLimit = CInt(Request("Patch"))
63
   Dim enteredBuildLimit
64
   enteredBuildLimit = CInt(Request("Build"))
65
   Query_String = _
66
    " SELECT ripple_field, major_limit, minor_limit, patch_limit, build_number_limit"&_
67
   " FROM package_versions"&_
68
   " WHERE pv_id = "& Request("pv_id")
69
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
70
   storedRippleType = rsTemp("ripple_field").Value
71
   storedMajorLimit = rsTemp("major_limit").Value
72
 
73
   If ( IsNull(storedMajorLimit) ) Then
74
     storedMajorLimit = "0"
75
   End If
76
 
77
   storedMinorLimit = rsTemp("minor_limit").Value
78
 
79
   If ( IsNull(storedMinorLimit) ) Then
80
     storedMinorLimit = "0"
81
   End If
82
 
83
   storedPatchLimit = rsTemp("patch_limit").Value
84
 
85
   If ( IsNull(storedPatchLimit) ) Then
86
     storedPatchLimit = "0"
87
   End If
88
 
89
   storedBuildNumberLimit = rsTemp("build_number_limit").Value
90
 
91
   If ( IsNull(storedBuildNumberLimit) ) Then
92
     storedBuildNumberLimit = "0"
93
   End If
94
 
95
   'normalise for comparison purposes
96
   storedMajorLimit = CInt( storedMajorLimit )
97
   storedMinorLimit = CInt( storedMinorLimit )
98
   storedPatchlimit = CInt( storedPatchLimit )
99
   storedBuildNumberLimit = CInt( storedBuildNumberLimit )
100
 
101
   If (storedRippleType <> selectedRippleType) OR IsNull(storedRippleType) Then
102
 
103
      'update fields
104
      rsTemp.Edit()
105
      rsTemp.Fields("ripple_field").Value = selectedRippleType
106
      rsTemp.Update()
107
 
5648 dpurdie 108
      Dim selectedRippleName, selectedRippleState
109
      selectedRippleName = rippleFieldName(selectedRippleType, selectedRippleState)
5357 dpurdie 110
 
111
      '/* Log Action */
5648 dpurdie 112
      Call Log_Action ( Request("pv_id"), "ripple_type_update", selectedRippleName)
5357 dpurdie 113
   End If
114
 
115
   If ( storedMajorLimit <> enteredMajorLimit ) Then
116
 
117
      'update fields
118
      rsTemp.Edit()
119
      If ( enteredMajorLimit <> "0" ) Then
120
        rsTemp.Fields("major_limit").Value = enteredMajorLimit
121
      Else
122
        rsTemp.Fields("major_limit").Value = NULL
123
      End If
124
      rsTemp.Update()
125
 
126
      '/* Log Action */
127
      Call Log_Action ( Request("pv_id"), "major_limit_update", enteredMajorLimit )
128
   End If
129
 
130
   If ( storedMinorLimit <> enteredMinorLimit ) Then
131
 
132
      'update fields
133
      rsTemp.Edit()
134
      If ( enteredMinorLimit <> "0" ) Then
135
        rsTemp.Fields("minor_limit").Value = enteredMinorLimit
136
      Else
137
        rsTemp.Fields("minor_limit").Value = NULL
138
      End If
139
      rsTemp.Update()
140
 
141
      '/* Log Action */
142
      Call Log_Action ( Request("pv_id"), "minor_limit_update", enteredMinorLimit )
143
   End If
144
 
145
   If ( storedPatchLimit <> enteredPatchLimit ) Then
146
 
147
      'update fields
148
      rsTemp.Edit()
149
      If ( enteredPatchLimit <> "0" ) Then
150
        rsTemp.Fields("patch_limit").Value = enteredPatchLimit
151
      Else
152
        rsTemp.Fields("patch_limit").Value = NULL
153
      End If
154
      rsTemp.Update()
155
 
156
      '/* Log Action */
157
      Call Log_Action ( Request("pv_id"), "patch_limit_update", enteredPatchLimit )
158
   End If
159
 
160
   If ( storedBuildNumberLimit <> enteredBuildLimit ) Then
161
 
162
      'update fields
163
      rsTemp.Edit()
164
      If ( enteredBuildLimit <> "0" ) Then
165
        rsTemp.Fields("build_number_limit").Value = enteredBuildLimit
166
      Else
167
        rsTemp.Fields("build_number_limit").Value = NULL
168
      End If
169
      rsTemp.Update()
170
 
171
      '/* Log Action */
172
      Call Log_Action ( Request("pv_id"), "build_number_limit_update", enteredBuildLimit )
173
   End If
174
 
175
   rsTemp.Close()
176
   Set rsTemp = nothing
177
End Sub
178
'------------------------------------------------------------------------------------------------------------------------------------
179
Sub RipplePackage (flag)
180
 
181
   OraDatabase.Parameters.Add "PV_ID",   parPv_id,                  ORAPARM_INPUT, ORATYPE_NUMBER
182
   OraDatabase.Parameters.Add "RTAG_ID", parRtag_id,                ORAPARM_INPUT, ORATYPE_NUMBER
183
   OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,   ORAPARM_INPUT, ORATYPE_NUMBER
184
 
185
   objEH.TryORA ( OraSession )
186
   On Error Resume Next
187
 
188
   If flag Then
189
      OraDatabase.ExecuteSQL _
190
      "BEGIN  Ripple_Package( :PV_ID, :RTAG_ID, :USER_ID );  END;"
191
   Else
192
      OraDatabase.ExecuteSQL _
193
      "BEGIN  UnRipple_Package( :PV_ID, :RTAG_ID, :USER_ID );  END;"
194
   End If
195
 
196
   objEH.CatchORA ( OraSession )
197
 
198
   OraDatabase.Parameters.Remove "PV_ID"
199
   OraDatabase.Parameters.Remove "RTAG_ID"
200
   OraDatabase.Parameters.Remove "USER_ID"
201
 
202
End Sub
6440 dpurdie 203
 
5357 dpurdie 204
'------------------------------------------------------------------------------------------------------------------------------------
6440 dpurdie 205
Sub PersistRippleStop (flag)
206
   Dim rsTemp, Query_String
207
   Query_String = _
208
       " SELECT persist_ripple_stop"&_
209
       " FROM release_content"&_
210
       " WHERE pv_id = :PV_ID AND rtag_id = :RTAG_ID"
211
 
212
   OraDatabase.Parameters.Add "PV_ID",            parPv_id,                   ORAPARM_INPUT, ORATYPE_NUMBER
213
   OraDatabase.Parameters.Add "RTAG_ID",          parRtag_id,                 ORAPARM_INPUT, ORATYPE_NUMBER
214
 
215
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
216
 
217
   Dim sValue, textValue
218
   sValue = NULL
219
   textValue = "clear_persist_ripple_stop"
220
	If flag Then
221
        textValue = "set_persist_ripple_stop"
222
        sValue = "Y"
223
	End If
224
 
225
 
226
    'update fields
227
    rsTemp.Edit()
228
    rsTemp.Fields("persist_ripple_stop").Value = sValue
229
    rsTemp.Update()
230
 
231
   ' Determine the location of th epackage-version
232
   Query_String = _
233
    "SELECT proj.PROJ_NAME ||' / '|| rt.RTAG_NAME AS ReleaseLocation" &_
234
    " FROM PROJECTS proj,RELEASE_TAGS rt" &_
235
    " WHERE rt.PROJ_ID = proj.PROJ_ID AND rt.RTAG_ID = :RTAG_ID"
236
 
237
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
238
    Dim ReleaseLocation : ReleaseLocation = "Unknown"
239
	If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
240
		ReleaseLocation = rsTemp.Fields("ReleaseLocation")
241
	End If
242
 
243
   OraDatabase.Parameters.Remove "PV_ID"
244
   OraDatabase.Parameters.Remove "RTAG_ID"
245
   rsTemp.Close()
246
   Set rsTemp = nothing
247
 
248
    '/* Log Action */
249
    Call Log_Action ( Request("pv_id"), textValue, "Location: " & ReleaseLocation)
250
 
251
End Sub
252
'------------------------------------------------------------------------------------------------------------------------------------
5357 dpurdie 253
Sub Get_Form_Details( nRtag_id, nPv_id, ByRef objDetails )
254
   Dim rsTemp, Query_String
255
   Query_String = _
256
   " SELECT * "&_
257
   "  FROM package_versions pv, packages pkg"&_
258
   " WHERE pv.pkg_id = pkg.pkg_id"&_
259
   "   AND pv_id = "& nPv_id
260
 
261
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
262
   If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
263
      objDetails.Item("pkg_name")              = rsTemp("pkg_name")
264
      objDetails.Item("pkg_version")           = rsTemp("pkg_version")
265
      objDetails.Item("pkg_label")             = rsTemp("pkg_label")
266
      objDetails.Item("src_path")              = rsTemp("src_path")
267
      objDetails.Item("pv_description")        = rsTemp("pv_description")
268
      objDetails.Item("pv_overview")           = rsTemp("pv_overview")
269
      objDetails.Item("v_ext")                 = rsTemp("v_ext")
270
      objDetails.Item("is_deployable")         = rsTemp("is_deployable")
271
      objDetails.Item("is_build_env_required") = rsTemp("is_build_env_required")
272
      objDetails.Item("build_type")            = rsTemp("build_type")
273
      objDetails.Item("bs_id")                 = rsTemp("bs_id")
274
      objDetails.Item("ripple_field")          = rsTemp("ripple_field")
275
      objDetails.Item("dlocked")               = rsTemp("dlocked")
276
 
277
      If isNull(rsTemp("major_limit")) Then
278
        objDetails.Item("major_limit")         = "0"
279
      Else
280
        objDetails.Item("major_limit")         = rsTemp("major_limit")
281
      End If
282
      If isNull(rsTemp("minor_limit")) Then
283
        objDetails.Item("minor_limit")         = "0"
284
      Else
285
        objDetails.Item("minor_limit")         = rsTemp("minor_limit")
286
      End If
287
      If isNull(rsTemp("patch_limit")) Then
288
        objDetails.Item("patch_limit")         = "0"
289
      Else
290
        objDetails.Item("patch_limit")         = rsTemp("patch_limit")
291
      End If
292
      If isNull(rsTemp("build_number_limit")) Then
293
        objDetails.Item("build_number_limit")  = "0"
294
      Else
295
        objDetails.Item("build_number_limit")  = rsTemp("build_number_limit")
296
      End If
297
   End If
298
 
299
   rsTemp.Close()
300
   Set rsTemp = Nothing
301
 
302
   '
303
   '    Release Based Properties
304
   objDetails.Item("is_sdkpkg") = FALSE
305
   If nRtag_id <> "" Then
306
       Query_String = _
307
       " SELECT * "&_
308
       "  FROM RELEASE_CONTENT rc"&_
309
       " WHERE rc.rtag_id = " & nRtag_id &_
310
       " AND pv_id = " & nPv_id
311
 
312
       Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
313
       If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
314
          objDetails.Item("is_sdkpkg")              = (NOT IsNull(rsTemp("sdktag_id")))
315
       End If
316
       rsTemp.Close()
317
       Set rsTemp = Nothing
318
   End If
319
 
320
End Sub
321
'----------------------------------------------------------------------------------------------------------------------
322
Sub RenderRippleTypeCombo( cRippleType, cDLocked )
323
 
324
   Dim isEditable
5671 dpurdie 325
   Dim ii
326
   Dim bFlag
5357 dpurdie 327
 
328
   ' DEVI-49267 - ripple type needs to be changeable by team leaders post release so the permission constraint on
329
   ' this is relaxed to non-critical info level (See definition of Is_Page_Editable() in common_subs.asp)
330
   isEditable = Is_Page_Editable ( isDLocked )
331
 
332
 
5671 dpurdie 333
   If IsNull(cRippleType) Then
334
    cRippleType = "b"
335
   End If
336
 
337
 
5357 dpurdie 338
   If (isEditable) Then
339
      Response.Write "<select name='ripple_type_combo' id='rtc' class='form_item' onChange='changeToRippleType(this.options[this.selectedIndex].value)'>"
340
   Else
341
      Response.Write "<select name='ripple_type_combo' id='rtc' class='form_item' disabled>"
342
   End If
343
 
5671 dpurdie 344
   For ii=0 to ubound(rippleFieldValues)
345
      Dim val, name, selected
5357 dpurdie 346
 
5671 dpurdie 347
      val = rippleFieldValues(ii)
348
      name = rippleFieldName(val, bFlag)
349
      selected = iif(cRippleType = val, "selected", "")
5357 dpurdie 350
 
5671 dpurdie 351
      Response.write "<option value='"& val &"' "& selected &">"& name &"</option>"
5357 dpurdie 352
 
5671 dpurdie 353
   Next
354
 
5357 dpurdie 355
   Response.Write "</select>"
356
 
357
End Sub
358
'------------------------------------------------------------------------------------------------------------------------------------
359
Sub PegPackageVersion (applyPegging)
360
 
361
   objEH.TryORA ( OraSession )
362
   On Error Resume Next
363
 
364
   ' try and clean up the pegged_versions table of any stranded rows (should never happen but this will fix it anyway)
365
   ' This means, remove any and all pegging rows whose values are not in an existing release somewhere
366
   OraDatabase.ExecuteSQL _
367
   " delete from pegged_versions"&_
368
   " where (rtag_id, pv_id) IN ("&_
369
   " select rtag_id, pv_id from pegged_versions"&_
370
   " minus"&_
371
   " select rtag_id, pv_id from release_content)"
372
 
373
   If Err.Number = 0 Then
374
 
375
      ' Delete the pegging row for the requested RTAG_ID/PV_ID
376
      OraDatabase.ExecuteSQL _
377
      "DELETE FROM PEGGED_VERSIONS WHERE RTAG_ID = " & parRtag_id & " AND PV_ID = " & parPv_id
378
 
379
      ' And if the user has requested PEGGING to be turned on then Add the PEGGING
380
      If applyPegging = True AND Err.Number = 0 Then
381
         OraDatabase.ExecuteSQL _
382
         "INSERT INTO PEGGED_VERSIONS VALUES(" & parRtag_id & "," & parPv_id & ")"
383
      End If
384
 
385
      If Err.Number = 0 Then
386
 
387
         ' Touch the release so that the state icons are re-evaluated
388
         OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
389
 
390
         OraDatabase.ExecuteSQL "BEGIN Touch_Release( :RTAG_ID ); END;"
391
 
392
         OraDatabase.Parameters.Remove "RTAG_ID"
393
      End If
394
   End If
395
 
396
   objEH.CatchORA ( OraSession )
397
 
398
End Sub
399
'------------------------------------------------------------------------------------------------------------------------------------
400
Sub AdvisoryRipplePackageVersion (applyAdvisoryRipple)
401
 
402
   objEH.TryORA ( OraSession )
403
   On Error Resume Next
404
 
405
   ' Delete the adv. rip. row for the requested RTAG_ID/PV_ID
406
   OraDatabase.ExecuteSQL _
407
   "DELETE FROM ADVISORY_RIPPLE WHERE RTAG_ID = " & parRtag_id & " AND PV_ID = " & parPv_id
408
 
409
   ' And if the user has requested advisory ripple to be turned on then Add it
410
   If applyAdvisoryRipple = True AND Err.Number = 0 Then
411
      OraDatabase.ExecuteSQL _
412
      "INSERT INTO ADVISORY_RIPPLE VALUES(" & parRtag_id & "," & parPv_id & ")"
413
   End If
414
 
415
   If Err.Number = 0 Then
416
 
417
      ' Touch the release so that the state icons are re-evaluated
418
      OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
419
 
420
      OraDatabase.ExecuteSQL "BEGIN Touch_Release( :RTAG_ID ); END;"
421
 
422
      OraDatabase.Parameters.Remove "RTAG_ID"
423
   End If
424
 
425
   objEH.CatchORA ( OraSession )
426
 
427
End Sub
428
 
429
'----------------------------------------------------------------------------------------------------------------------
430
%>
431
<%
432
'------------------------------- RUN BEFORE PAGE RENDER ----------------------------
433
 
434
Call Get_Form_Details( parRtag_id, parPv_id, objFormCollector )
435
isDLocked = objFormCollector.Item("dlocked")
436
isNotSdk = NOT objFormCollector.Item("is_sdkpkg")
437
 
438
'-------------------------------------
439
'Start Process Submission
440
If CBool(QStrPar("action"))  AND  objAccessControl.UserLogedIn Then
441
 
442
   Call UpdateRippleType()
443
 
6440 dpurdie 444
   ' Changes to the Persistent Ripple Stop -----------------------------------
445
   If NOT CBool(QStrPar("prippleStopFlag")) AND Request("FRprippleStop") = "1" Then
446
      Call PersistRippleStop(True)
447
   End If
5357 dpurdie 448
 
6440 dpurdie 449
   If CBool(QStrPar("prippleStopFlag")) AND Request("FRprippleStop") = "0" Then
450
      Call PersistRippleStop(False)
451
   End If
452
 
5357 dpurdie 453
   ' Changes to DO NOT RIPPLE Status -----------------------------------------
454
   If NOT CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "1" Then
455
      Call RipplePackage(True)
456
   End If
457
 
458
   If CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "0" Then
459
      Call RipplePackage(False)
460
   End If
461
 
462
   ' Changes to PEGGED Status ------------------------------------------------
463
   If NOT CBool(QStrPar("peggedFlag")) AND Request("FRpegged") = "1" Then
464
      Call PegPackageVersion(True)
465
   End If
466
 
467
   If CBool(QStrPar("peggedFlag")) AND Request("FRpegged") = "0" Then
468
      Call PegPackageVersion(False)
469
   End If
470
 
471
   ' Changes to ADVISORY RIPPLE Status ---------------------------------------
472
   If NOT CBool(QStrPar("advRipFlag")) AND Request("FRadvrip") = "1" Then
473
      Call AdvisoryRipplePackageVersion(True)
474
   End If
475
 
476
   If CBool(QStrPar("advRipFlag")) AND Request("FRadvrip") = "0" Then
477
      Call AdvisoryRipplePackageVersion(False)
478
   End If
479
 
480
 
481
   Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
482
   Call CloseWindow
483
 
484
End If
485
'End Process Submission
486
'--------------------------------------------------------------------------------------------
487
%>
488
<html>
489
<head>
490
<title>Release Manager</title>
491
<link rel="shortcut icon" href="<%=FavIcon%>"/>
492
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
493
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
494
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
495
<link rel="stylesheet" href="images/navigation.css" type="text/css">
496
<script language="JavaScript" src="images/common.js"></script>
497
<!-- TIPS -->
498
<script language="JavaScript" src="images/tipster.js"></script>
499
<script language="JavaScript" src="images/_help_tips.js"></script>
500
<script language="JavaScript" type="text/JavaScript">
501
<!--
502
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
503
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
504
      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
505
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
506
}
507
MM_reloadPage(true);
508
function isNum(passedVal)
509
{
510
  if (passedVal == "")
511
  {
512
    return false
513
  }
514
  for(i=0; i<passedVal.length; i++)
515
  {
516
    if (passedVal.charAt(i) < "0")
517
    {
518
      return false
519
    }
520
    if (passedVal.charAt(i) > "9")
521
    {
522
      return false
523
    }
524
  }
525
  return true
526
}
527
function valid(form)
528
{
529
  if (!isNum(rippleproperties.Major.value)) {
530
    vixAlert("Invalid major number:" + rippleproperties.Major.value)
531
    return false
532
  }
533
  if (!isNum(rippleproperties.Minor.value)) {
534
    vixAlert("Invalid minor number:" + rippleproperties.Minor.value)
535
    return false
536
  }
537
  if (!isNum(rippleproperties.Patch.value)) {
538
    vixAlert("Invalid patch number:" + rippleproperties.Patch.value)
539
    return false
540
  }
541
  if (!isNum(rippleproperties.Build.value)) {
542
    vixAlert("Invalid build number:" + rippleproperties.Build.value)
543
    return false
544
  }
545
 
546
  return true
547
}
548
function changeToRippleType(val)
549
{
550
  if ( val.match("L") )
551
  {
552
    document.getElementById("limits_row").style.visibility="visible"
553
  }
554
  else
555
  {
556
    document.getElementById("limits_row").style.visibility="hidden"
557
    document.getElementById("Major").value  = "0"
558
    document.getElementById("Minor").value  = "0"
559
    document.getElementById("Patch").value  = "0"
560
    document.getElementById("Build").value  = "0"
561
  }
562
}
563
function loader()
564
{
565
  changeToRippleType(document.getElementById("rtc").options[document.getElementById("rtc").selectedIndex].value)
566
}
567
if (window.addEventListener)
568
{
569
  window.addEventListener("load", loader, false)
570
}
571
else if (window.attachEvent)
572
{
573
  window.attachEvent("onload", loader)
574
}
575
else if (document.getElementById)
576
{
577
  window.onload=loader
578
}
579
//-->
580
</script>
581
</head>
582
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
5590 dpurdie 583
<form onSubmit="return valid(this)" name="rippleproperties" id="rp" method="post" action="<%=scriptName%>" class="form_tight">
584
   <table border="0" cellspacing="0" cellpadding="2" width="800px">
5357 dpurdie 585
      <tr>
586
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
587
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
588
               <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" AND isNotSdk Then%>
589
               <tr>
6440 dpurdie 590
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Persistent Ripple Stop?</td>
591
                  <%
592
                  Dim FRPrippleStopYES, FRPrippleStopNO, FRprippleStopDIS
593
 
594
                  FRPrippleStopYES = ""
595
                  FRPrippleStopNO = ""
596
                  FRprippleStopDIS = "disabled='disabled'"
597
 
598
                  ' Allow persistent ripple stop to be set 
599
                  If (canShowControlInProject( "AdvRipPackageVersions" )) AND isDLocked = "Y" Then
600
                     FRprippleStopDIS = ""
601
                  End If
602
 
603
                  Dim rsQryPrippleStop, prippleStopFlag
604
                  Set rsQryPrippleStop = OraDatabase.DbCreateDynaset( "SELECT PERSIST_RIPPLE_STOP FROM RELEASE_CONTENT WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))
605
                  If rsQryPrippleStop.RecordCount <> 0  Then
606
                      If IsNull(rsQryPrippleStop("PERSIST_RIPPLE_STOP")) Then
607
                         FRPrippleStopNO = "checked"
608
                         prippleStopFlag = False
609
                      Else
610
                         FRPrippleStopYES = "checked"
611
                         prippleStopFlag = True
612
                      End If
613
                  End If
614
 
615
 
616
                  rsQryPrippleStop.Close()
617
                  Set rsQryPrippleStop = nothing
618
 
619
                  %>
620
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
621
                     Yes<input name="FRPrippleStop" type="radio" value="1" <%=FRprippleStopDIS%> <%=FRPrippleStopYES%> >&nbsp;&nbsp;
622
                     No<input name="FRPrippleStop" type="radio" value="0"  <%=FRprippleStopDIS%> <%=FRPrippleStopNO%>  >&nbsp;&nbsp;
623
                  </td>
624
                  <td background="images/bg_form_lightbluedark.gif">
625
                     <span class='err_alert'><b>WARNING!</span>
626
                     <font size='1'>
627
                        <br>
628
                        When set to Yes, this package version will not be rippled, until it has been released by a user. New versions of the
629
                        the package will be marked so as to prevent futher rippling.
630
                     </font></b>
631
                  </td>
632
 
633
 
634
 
635
               </tr>
636
               <tr>
5357 dpurdie 637
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Pegged Version?<%=Quick_Help ( "pegged_version" )%></td>
638
                  <%
639
                  Dim FRpeggedYES, FRpeggedNO, FRpegDisabled
640
 
641
                  FRpeggedYES = ""
642
                  FRpeggedNO = ""
643
                  FRpegDisabled = "disabled='disabled'"
644
 
645
                  ' Allow pegging/un-pegging to occur for locked/released versions only, and by users who have the appropriate permission
646
                  If (canShowControlInProject( "PegPackageVersions" )) AND isDLocked = "Y" Then
647
                     FRpegDisabled = ""
648
                  End If
649
 
650
                  Dim rsQryPegged, peggedFlag
651
                  Set rsQryPegged = OraDatabase.DbCreateDynaset( "SELECT COUNT(*) as record_count FROM PEGGED_VERSIONS WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))
652
 
653
                  If rsQryPegged("record_count") = 0  Then
654
                     FRpeggedNO = "checked"
655
                     peggedFlag = False
656
                  Else
657
                     FRpeggedYES = "checked"
658
                     peggedFlag = True
659
                  End If
660
 
661
                  rsQryPegged.Close()
662
                  Set rsQryPegged = nothing
663
 
664
                  %>
665
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
666
                     Yes<input name="FRpegged" type="radio" value="1" <%=FRpegDisabled%> <%=FRpeggedYES%> >&nbsp;&nbsp;
667
                     No<input name="FRpegged" type="radio" value="0"  <%=FRpegDisabled%> <%=FRpeggedNO%>  >&nbsp;&nbsp;
668
                  </td>
669
                  <td background="images/bg_form_lightbluedark.gif">
670
                     <span class='err_alert'><b>WARNING!</span>
671
                     <font size='1'>
672
                        <br>
673
                        When set to Yes, this package version is never rippled in the current release regardless of the other ripple settings below.
674
                     </font></b>
675
                  </td>
676
               </tr>
677
               <%End If%>
678
               <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%>
679
               <tr>
680
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Advisory Ripple Version?<%=Quick_Help ( "advisory_ripple_version" )%></td>
681
                  <%
682
                  Dim FRadvripYES, FRadvripNO, FRadvripDisabled
683
 
684
                  FRadvripYES = ""
685
                  FRadvripNO = ""
686
                  FRadvripDisabled = "disabled='disabled'"
687
 
688
                  ' Allow setting of advisory ripple to occur only by users who have the appropriate permission
689
                  If (canShowControlInProject( "AdvRipPackageVersions" )) AND isDLocked = "Y" Then
690
                     FRadvripDisabled = ""
691
                  End If
692
 
693
                  Dim rsQryAdvRip, advRipFlag
694
                  Set rsQryAdvRip = OraDatabase.DbCreateDynaset( "SELECT COUNT(*) as record_count FROM ADVISORY_RIPPLE WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))
695
 
696
                  If rsQryAdvRip("record_count") = 0  Then
697
                     FRadvripNO = "checked"
698
                     advRipFlag = False
699
                  Else
700
                     FRadvripYES = "checked"
701
                     advRipFlag = True
702
                  End If
703
 
704
                  rsQryAdvRip.Close()
705
                  Set rsQryAdvRip = nothing
706
 
707
                  %>
708
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
709
                     Yes<input name="FRadvrip" type="radio" value="1" <%=FRadvripDisabled%> <%=FRadvripYES%> >&nbsp;&nbsp;
710
                     No<input name="FRadvrip" type="radio" value="0"  <%=FRadvripDisabled%> <%=FRadvripNO%>  >&nbsp;&nbsp;
711
                  </td>
712
                  <td background="images/bg_form_lightbluedark.gif">
713
                     <span class='err_alert'><b>WARNING!</span>
714
                     <font size='1'>
715
                        <br>
716
                        When set to Yes, a new version of this package will not cause a ripple of higher level packages in the current release.
717
                     </font></b>
718
                  </td>
719
 
720
               </tr>
721
               <%End If%>
722
               <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%>
723
               <tr>
724
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Build Inclusion?<%=Quick_Help ( "ripple_build" )%></td>
725
                  <%
726
                  FRripplebuildYES = ""
727
                  FRripplebuildNO = ""
728
                  ' disabled="disabled" indicates the pv has been excluded indirectly
729
                  ' this is due to another pv (the root_pv_id) being excluded directly
730
                  ' allowing it to be included is somewhat pointless
731
                  ' fixing the root cause is a somewhat better approach
732
                  Dim disabled
733
                  disabled="disabled"
734
 
735
                  Dim rsQryRipple, rippleFlag
6440 dpurdie 736
                  Set rsQryRipple = OraDatabase.DbCreateDynaset( "SELECT nvl(root_pv_id,-1) as root_pv_id FROM DO_NOT_RIPPLE WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))
5357 dpurdie 737
 
738
                  If rsQryRipple.RecordCount = 0  Then
739
                     FRripplebuildYES = "checked"
740
                     rippleFlag = True
741
                     ' do not disable the default
742
                     disabled=""
743
                  Else
6440 dpurdie 744
                     If rsQryRipple("root_pv_id") < 0 Then
5357 dpurdie 745
                        ' pv has been excluded directly
746
                        ' ie has a null pv_id
747
                        ' once fixed, pv should be included ie do not disable
748
                        disabled=""
749
                     End If
750
                     FRripplebuildNO = "checked"
751
                     rippleFlag = False
752
                  End If
753
 
754
                  rsQryRipple.Close()
755
                  Set rsQryRipple = nothing
756
 
757
                  %>
758
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
759
                     Yes<input name="FRripplebuild" type="radio" value="1" <%=FRripplebuildYES%>  <%=disabled%>>&nbsp;&nbsp;
760
                     No<input name="FRripplebuild" type="radio" value="0" <%=FRripplebuildNO%>>&nbsp;&nbsp;
761
                  </td>
762
                  <td background="images/bg_form_lightbluedark.gif">
763
                     <span class='err_alert'><b>WARNING!</span>
764
                     <font size='1'>
6370 dpurdie 765
                        <br>When set to No, this package and <u>all</u> packages which depend on this package, either directly or indirectly,
766
                        will be excluded from the build. 
767
                        <br>When the Yes option is disabled then this package has been excluded indirectly.
768
                        <br>This setting is normally controlled by the build system.
5357 dpurdie 769
                     </font></b>
770
                  </td>
771
               </tr>
772
               <%End If%>
773
               <%If isNotSdk Then %>
774
               <tr>
775
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Ripple Type?<%=Quick_Help ( "ripple_type" )%></td>
776
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
777
                    &nbsp;&nbsp;<% Call RenderRippleTypeCombo( objFormCollector.Item("ripple_field"), isDLocked )%>&nbsp;&nbsp;
778
                  </td>
779
                  <td background="images/bg_form_lightbluedark.gif">
780
                     <span class='err_alert'><b>WARNING!</span>
781
                     <font size='1'>
782
                        <br>
783
                        This enables a package to advertise how it will be numbered when rippled.<br>
784
                        THIS IS PRIMARILY INTENDED TO CATER FOR PACKAGES WHICH DO NOT SUPPORT A NON ZERO PATCH/BUILD NUMBER,<br>
785
                        AND FOR PRODUCTS WHERE CONSTANTLY RIPPLING A PATCH/BUILD NUMBER IS DISLIKED BY A CUSTOMER.
786
                     </font></b>
787
                  </td>
788
               </tr>
789
               <%End If%>
790
               <tr id="limits_row" style="visibility:hidden; position:static">
791
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Version Field Limits</td>
792
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
793
                     Major&nbsp;&nbsp;<input name="Major" id="Major" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("major_limit")%>">&nbsp;&nbsp;<br>
794
                     Minor&nbsp;&nbsp;<input name="Minor" id="Minor" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("minor_limit")%>">&nbsp;&nbsp;<br>
795
                     Patch&nbsp;&nbsp;<input name="Patch" id="Patch" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("patch_limit")%>">&nbsp;&nbsp;<br>
796
                     Build&nbsp;&nbsp;<input name="Build" id="Build" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("build_number_limit")%>">&nbsp;&nbsp;
797
                  </td>
798
                  <td background="images/bg_form_lightbluedark.gif">
799
                     <span class='err_alert'><b>WARNING!</span>
800
                     <font size='1'>
801
                        <br>
802
                        A field (major/minor/patch/build number) may be assigned non zero limits to determine how it will be numbered when rippled.<br>
803
                        Prior to reaching a limit, the rightmost field able to be incremented will be when rippled.<br>
804
                        Upon reaching a limit, that rightmost field will be set to zero and the field next left with a non zero limit (if one exists) will be incremented when rippled.<br>
805
                        A field may be assigned to zero to fix the field (to 0 or 000 for the build number field) when rippled.
806
                     </font></b>
807
                  </td>
808
               </tr>
809
            </table>
810
        </td>
811
      </tr>
812
      <tr>
5590 dpurdie 813
         <td align="right">
814
            <input type="submit" name="btn" value="Submit" class="form_btn_comp">
815
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
816
         </td>
5357 dpurdie 817
      </tr>
818
   </table>
819
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
820
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
821
<input type="hidden" name="rippleFlag" value="<%=rippleFlag%>">
822
<input type="hidden" name="peggedFlag" value="<%=peggedFlag%>">
823
<input type="hidden" name="advRipFlag" value="<%=advRipFlag%>">
6440 dpurdie 824
<input type="hidden" name="prippleStopFlag" value="<%=prippleStopFlag%>">
5357 dpurdie 825
<input type="hidden" name="action" value="true">
826
</form>
827
</body>
828
</html>
829
<%
830
'------------- RUN AFTER PAGE RENDER ---------------
831
Set objFormCollector = Nothing
832
'---------------------------------------------------
833
%>
834
<!-- DESTRUCTOR ------->
835
<!--#include file="common/destructor.asp"-->