Subversion Repositories DevTools

Rev

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