Subversion Repositories DevTools

Rev

Rev 155 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'               Ripple Properties
'=====================================================
%>
<!--#include file="common/conf.asp"-->
<!--#include file="common/globals.asp"-->
<!--#include file="common/formating.asp"-->
<!--#include file="common/qstr.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/common_dbedit.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<%
' Set rfile parameter. This is a return page after Login
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login.asp"-->
<!--#include file="_access_control_general.asp"-->
<!--#include file="_access_control_project.asp"-->
<%
'------------ Variable Definition -------------
Dim parPv_id
Dim query
Dim rsQry, rsTemp
Dim checked
Dim FRripplebuildYES, FRripplebuildNO
Dim objFormCollector
Dim Query_String
Dim isDLocked
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
Set objFormCollector = CreateObject("Scripting.Dictionary")
parPv_id = QStrPar("pv_id")
'----------------------------------------------
%>
<%
'------------------------------------------------------------------------------------------------------------------------------------
Sub UpdateRippleType ( )
   Dim rsTemp, Query_String
   Dim storedRippleType
   Dim storedMajorLimit
   Dim storedMinorLimit
   Dim storedPatchLimit
   Dim storedBuildNumberLimit
   Dim selectedRippleType
   selectedRippleType = Request("ripple_type_combo")
   Dim enteredMajorLimit
   ' enteredMajorLimit is a string of digits
   ' it will be compared with a string representing a NUMBER in the db
   ' use CInt to at least strip leading zeros
   enteredMajorLimit = CInt(Request("Major"))
   Dim enteredMinorLimit
   enteredMinorLimit = CInt(Request("Minor"))
   Dim enteredPatchLimit
   enteredPatchLimit = CInt(Request("Patch"))
   Dim enteredBuildLimit
   enteredBuildLimit = CInt(Request("Build"))
   Query_String = _
    " SELECT ripple_field, major_limit, minor_limit, patch_limit, build_number_limit"&_
   " FROM package_versions"&_
   " WHERE pv_id = "& Request("pv_id")
   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
   storedRippleType = rsTemp("ripple_field").Value
   storedMajorLimit = rsTemp("major_limit").Value

   If ( IsNull(storedMajorLimit) ) Then
     storedMajorLimit = "0"
   End If

   storedMinorLimit = rsTemp("minor_limit").Value

   If ( IsNull(storedMinorLimit) ) Then
     storedMinorLimit = "0"
   End If

   storedPatchLimit = rsTemp("patch_limit").Value

   If ( IsNull(storedPatchLimit) ) Then
     storedPatchLimit = "0"
   End If

   storedBuildNumberLimit = rsTemp("build_number_limit").Value

   If ( IsNull(storedBuildNumberLimit) ) Then
     storedBuildNumberLimit = "0"
   End If

   'normalise for comparison purposes
   storedMajorLimit = CInt( storedMajorLimit )
   storedMinorLimit = CInt( storedMinorLimit )
   storedPatchlimit = CInt( storedPatchLimit )
   storedBuildNumberLimit = CInt( storedBuildNumberLimit )

   If (storedRippleType <> selectedRippleType) OR IsNull(storedRippleType) Then

      'update fields
      rsTemp.Edit()
      rsTemp.Fields("ripple_field").Value = selectedRippleType
      rsTemp.Update()

      Dim anotherQry
      Set anotherQry = OraDatabase.DbCreateDynaset( "SELECT state_name from ripple_field_states WHERE state_acronym ='"& selectedRippleType &"'", cint(0))

      '/* Log Action */
      Call Log_Action ( Request("pv_id"), "ripple_type_update", anotherQry.Fields("state_name").Value )
      anotherQry.Close()
      Set anotherQry = nothing
   End If

   If ( storedMajorLimit <> enteredMajorLimit ) Then

      'update fields
      rsTemp.Edit()
      If ( enteredMajorLimit <> "0" ) Then
        rsTemp.Fields("major_limit").Value = enteredMajorLimit
      Else
        rsTemp.Fields("major_limit").Value = NULL
      End If
      rsTemp.Update()

      '/* Log Action */
      Call Log_Action ( Request("pv_id"), "major_limit_update", enteredMajorLimit )
   End If

   If ( storedMinorLimit <> enteredMinorLimit ) Then

      'update fields
      rsTemp.Edit()
      If ( enteredMinorLimit <> "0" ) Then
        rsTemp.Fields("minor_limit").Value = enteredMinorLimit
      Else
        rsTemp.Fields("minor_limit").Value = NULL
      End If
      rsTemp.Update()

      '/* Log Action */
      Call Log_Action ( Request("pv_id"), "minor_limit_update", enteredMinorLimit )
   End If

   If ( storedPatchLimit <> enteredPatchLimit ) Then

      'update fields
      rsTemp.Edit()
      If ( enteredPatchLimit <> "0" ) Then
        rsTemp.Fields("patch_limit").Value = enteredPatchLimit
      Else
        rsTemp.Fields("patch_limit").Value = NULL
      End If
      rsTemp.Update()

      '/* Log Action */
      Call Log_Action ( Request("pv_id"), "patch_limit_update", enteredPatchLimit )
   End If

   If ( storedBuildNumberLimit <> enteredBuildLimit ) Then

      'update fields
      rsTemp.Edit()
      If ( enteredBuildLimit <> "0" ) Then
        rsTemp.Fields("build_number_limit").Value = enteredBuildLimit
      Else
        rsTemp.Fields("build_number_limit").Value = NULL
      End If
      rsTemp.Update()

      '/* Log Action */
      Call Log_Action ( Request("pv_id"), "build_number_limit_update", enteredBuildLimit )
   End If

   rsTemp.Close()
   Set rsTemp = nothing
End Sub
'------------------------------------------------------------------------------------------------------------------------------------
Sub RipplePackage (flag)

   OraDatabase.Parameters.Add "PV_ID",   parPv_id,                  ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "RTAG_ID", parRtag_id,                ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,   ORAPARM_INPUT, ORATYPE_NUMBER

   objEH.TryORA ( OraSession )
   On Error Resume Next

   If flag Then
      OraDatabase.ExecuteSQL _
      "BEGIN  Ripple_Package( :PV_ID, :RTAG_ID, :USER_ID );  END;"
   Else
      OraDatabase.ExecuteSQL _
      "BEGIN  UnRipple_Package( :PV_ID, :RTAG_ID, :USER_ID );  END;"
   End If

   objEH.CatchORA ( OraSession )

   OraDatabase.Parameters.Remove "PV_ID"
   OraDatabase.Parameters.Remove "RTAG_ID"
   OraDatabase.Parameters.Remove "USER_ID"

End Sub
'------------------------------------------------------------------------------------------------------------------------------------
Sub Get_Form_Details( nPv_id, ByRef objDetails )
   Dim rsTemp, Query_String
   Query_String = _
   " SELECT * "&_
   "  FROM package_versions pv, packages pkg"&_
   " WHERE pv.pkg_id = pkg.pkg_id"&_
   "   AND pv_id = "& nPv_id

   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
   If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) Then
      objDetails.Item("pkg_name")              = rsTemp("pkg_name")
      objDetails.Item("pkg_version")           = rsTemp("pkg_version")
      objDetails.Item("pkg_label")             = rsTemp("pkg_label")
      objDetails.Item("src_path")              = rsTemp("src_path")
      objDetails.Item("pv_description")        = rsTemp("pv_description")
      objDetails.Item("pv_overview")           = rsTemp("pv_overview")
      objDetails.Item("v_ext")                 = rsTemp("v_ext")
      objDetails.Item("is_deployable")         = rsTemp("is_deployable")
      objDetails.Item("is_build_env_required") = rsTemp("is_build_env_required")
      objDetails.Item("build_type")            = rsTemp("build_type")
      objDetails.Item("bs_id")                 = rsTemp("bs_id")
      objDetails.Item("ripple_field")          = rsTemp("ripple_field")
      If isNull(rsTemp("major_limit")) Then
        objDetails.Item("major_limit")         = "0"
      Else
        objDetails.Item("major_limit")         = rsTemp("major_limit")
      End If
      If isNull(rsTemp("minor_limit")) Then
        objDetails.Item("minor_limit")         = "0"
      Else
        objDetails.Item("minor_limit")         = rsTemp("minor_limit")
      End If
      If isNull(rsTemp("patch_limit")) Then
        objDetails.Item("patch_limit")         = "0"
      Else
        objDetails.Item("patch_limit")         = rsTemp("patch_limit")
      End If
      If isNull(rsTemp("build_number_limit")) Then
        objDetails.Item("build_number_limit")  = "0"
      Else
        objDetails.Item("build_number_limit")  = rsTemp("build_number_limit")
      End If
   End If

   rsTemp.Close()
   Set rsTemp = Nothing
End Sub
'----------------------------------------------------------------------------------------------------------------------
Sub RenderRippleTypeCombo( cRippleType, cDLocked )

   Dim isEditable

   ' DEVI-49267 - ripple type needs to be changeable by team leaders post release so the permission constraint on
   ' this is relaxed to non-critical info level (See definition of Is_Page_Editable() in common_subs.asp)
   isEditable = Is_Page_Editable ( isDLocked )

   Query_String = "select * from ripple_field_states"

   If (isEditable) Then
      Response.Write "<select name='ripple_type_combo' id='rtc' class='form_item' onChange='changeToRippleType(this.options[this.selectedIndex].value)'>"
   Else
      Response.Write "<select name='ripple_type_combo' id='rtc' class='form_item' disabled>"
   End If

   Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))

   While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
      If cRippleType = rsTemp.Fields("state_acronym") Then
         Response.write "<option value='"& rsTemp.Fields("state_acronym") &"' selected>"& rsTemp.Fields("state_name") &"</option>"
      ElseIf IsNull(cRippleType) AND rsTemp.Fields("state_acronym") = "b" Then 'If nothing selected, select Build Number
         Response.write "<option value='"& rsTemp.Fields("state_acronym") &"' selected>"& rsTemp.Fields("state_name") & "</option>"
      Else
         Response.write "<option value='"& rsTemp.Fields("state_acronym") &"'>"& rsTemp.Fields("state_name") & "</option>"
      End If
      rsTemp.MoveNext
   WEnd

   rsTemp.Close()
   Set rsTemp = nothing

   Response.Write "</select>"

End Sub
'------------------------------------------------------------------------------------------------------------------------------------
Sub PegPackageVersion (applyPegging)

   objEH.TryORA ( OraSession )
   On Error Resume Next

   ' try and clean up the pegged_versions table of any stranded rows (should never happen but this will fix it anyway)
   ' This means, remove any and all pegging rows whose values are not in an existing release somewhere
   OraDatabase.ExecuteSQL _
   " delete from pegged_versions"&_
   " where (rtag_id, pv_id) IN ("&_
   " select rtag_id, pv_id from pegged_versions"&_
   " minus"&_
   " select rtag_id, pv_id from release_content)"

   If Err.Number = 0 Then

      ' Delete the pegging row for the requested RTAG_ID/PV_ID
      OraDatabase.ExecuteSQL _
      "DELETE FROM PEGGED_VERSIONS WHERE RTAG_ID = " & parRtag_id & " AND PV_ID = " & parPv_id

      ' And if the user has requested PEGGING to be turned on then Add the PEGGING
      If applyPegging = True AND Err.Number = 0 Then
         OraDatabase.ExecuteSQL _
         "INSERT INTO PEGGED_VERSIONS VALUES(" & parRtag_id & "," & parPv_id & ")"
      End If

      If Err.Number = 0 Then

         ' Touch the release so that the state icons are re-evaluated
         OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER

         OraDatabase.ExecuteSQL "BEGIN Touch_Release( :RTAG_ID ); END;"

         OraDatabase.Parameters.Remove "RTAG_ID"
      End If
   End If

   objEH.CatchORA ( OraSession )

End Sub
'------------------------------------------------------------------------------------------------------------------------------------
Sub AdvisoryRipplePackageVersion (applyAdvisoryRipple)

   objEH.TryORA ( OraSession )
   On Error Resume Next

   ' Delete the adv. rip. row for the requested RTAG_ID/PV_ID
   OraDatabase.ExecuteSQL _
   "DELETE FROM ADVISORY_RIPPLE WHERE RTAG_ID = " & parRtag_id & " AND PV_ID = " & parPv_id

   ' And if the user has requested advisory ripple to be turned on then Add it
   If applyAdvisoryRipple = True AND Err.Number = 0 Then
      OraDatabase.ExecuteSQL _
      "INSERT INTO ADVISORY_RIPPLE VALUES(" & parRtag_id & "," & parPv_id & ")"
   End If

   If Err.Number = 0 Then

      ' Touch the release so that the state icons are re-evaluated
      OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER

      OraDatabase.ExecuteSQL "BEGIN Touch_Release( :RTAG_ID ); END;"

      OraDatabase.Parameters.Remove "RTAG_ID"
   End If

   objEH.CatchORA ( OraSession )

End Sub

'----------------------------------------------------------------------------------------------------------------------
%>
<%
'------------------------------- RUN BEFORE PAGE RENDER ----------------------------

Call Get_Form_Details( parPv_id, objFormCollector )

Call Get_Pkg_Short_Info( parPv_id, NULL, NULL, NULL, NULL, NULL, isDLocked )

'-------------------------------------
'Start Process Submission
If CBool(QStrPar("action"))  AND  objAccessControl.UserLogedIn Then

   Call UpdateRippleType()


   ' Changes to DO NOT RIPPLE Status -----------------------------------------
   If NOT CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "1" Then
      Call RipplePackage(True)
   End If

   If CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "0" Then
      Call RipplePackage(False)
   End If

   ' Changes to PEGGED Status ------------------------------------------------
   If NOT CBool(QStrPar("peggedFlag")) AND Request("FRpegged") = "1" Then
      Call PegPackageVersion(True)
   End If

   If CBool(QStrPar("peggedFlag")) AND Request("FRpegged") = "0" Then
      Call PegPackageVersion(False)
   End If

   ' Changes to ADVISORY RIPPLE Status ---------------------------------------
   If NOT CBool(QStrPar("advRipFlag")) AND Request("FRadvrip") = "1" Then
      Call AdvisoryRipplePackageVersion(True)
   End If

   If CBool(QStrPar("advRipFlag")) AND Request("FRadvrip") = "0" Then
      Call AdvisoryRipplePackageVersion(False)
   End If


   Call OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )
   Call CloseWindow

End If
'End Process Submission
'--------------------------------------------------------------------------------------------
%>
<html>
<head>
<title>Release Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
<link rel="stylesheet" href="images/navigation.css" type="text/css">
<script language="JavaScript" src="images/common.js"></script>
<!-- TIPS -->
<script language="JavaScript" src="images/tipster.js"></script>
<script language="JavaScript" src="images/_help_tips.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function isNum(passedVal)
{
  if (passedVal == "")
  {
    return false
  }
  for(i=0; i<passedVal.length; i++)
  {
    if (passedVal.charAt(i) < "0")
    {
      return false
    }
    if (passedVal.charAt(i) > "9")
    {
      return false
    }
  }
  return true
}
function valid(form)
{
  if (!isNum(rippleproperties.Major.value))
  {
    alert("Invalid major number")
    return false
  }
  return true
}
function changeToRippleType(val)
{
  if ( val.match("L") )
  {
    document.getElementById("limits_row").style.visibility="visible"
  }
  else
  {
    document.getElementById("limits_row").style.visibility="hidden"
    document.getElementById("Major").value  = "0"
    document.getElementById("Minor").value  = "0"
    document.getElementById("Patch").value  = "0"
    document.getElementById("Build").value  = "0"
  }
}
function loader()
{
  changeToRippleType(document.getElementById("rtc").options[document.getElementById("rtc").selectedIndex].value)
}
if (window.addEventListener)
{
  window.addEventListener("load", loader, false)
}
else if (window.attachEvent)
{
  window.attachEvent("onload", loader)
}
else if (document.getElementById)
{
  window.onload=loader
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<!-- TIPS LAYERS -------------------------------------->
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
<!----------------------------------------------------->
<form onSubmit="return valid(this)" name="rippleproperties" id="rp" method="post" action="<%=scriptName%>">
   <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
      <tr>
         <td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="icons/i_pkg_ripple_type.gif" width="21" height="21" hspace="5" border="0"></td>
         <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Ripple Properties </td>
         <td background="images/lbox_bg_blue.gif" align="right" width="50%">
            <input type="submit" name="btn" value="Submit" class="form_btn_comp">
            <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
         </td>
         <td background="images/lbox_bg_blue.gif" align="right" width="1%" nowrap>
            <img src="images/h_trsp_dot.gif" width="5" height="22">
         </td>
      </tr>
      <tr>
         <td height="100%" width="1%">&nbsp;</td>
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
               <tr>
                  <td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
                  <td width="1%" nowrap class="form_group" valign="bottom"></td>
                  <td nowrap width="1%">&nbsp; </td>
                  <td nowrap width="100%">&nbsp;</td>
               </tr>
               <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%>
               <tr>
                  <td>&nbsp;</td>
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Pegged Version?<%=Quick_Help ( "pegged_version" )%></td>
                  <%
                  Dim FRpeggedYES, FRpeggedNO, FRpegDisabled

                  FRpeggedYES = ""
                  FRpeggedNO = ""
                  FRpegDisabled = "disabled='disabled'"

                  ' Allow pegging/un-pegging to occur for locked/released versions only, and by users who have the appropriate permission
                  If (objAccessControl.IsVisible( "PegPackageVersions" )) AND isDLocked = "Y" Then
                     FRpegDisabled = ""
                  End If

                  Dim rsQryPegged, peggedFlag
                  Set rsQryPegged = OraDatabase.DbCreateDynaset( "SELECT COUNT(*) as record_count FROM PEGGED_VERSIONS WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))

                  If rsQryPegged("record_count") = 0  Then
                     FRpeggedNO = "checked"
                     peggedFlag = False
                  Else
                     FRpeggedYES = "checked"
                     peggedFlag = True
                  End If

                  rsQryPegged.Close()
                  Set rsQryPegged = nothing

                  %>
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
                     Yes<input name="FRpegged" type="radio" value="1" <%=FRpegDisabled%> <%=FRpeggedYES%> >&nbsp;&nbsp;
                     No<input name="FRpegged" type="radio" value="0"  <%=FRpegDisabled%> <%=FRpeggedNO%>  >&nbsp;&nbsp;
                  </td>
                  <td background="images/bg_form_lightbluedark.gif">
                     <span class='err_alert'><b>WARNING!</span>
                     <font size='1'>
                        <br>
                        When set to Yes, this package version is never rippled in the current release regardless of the other ripple settings below.
                     </font></b>
                  </td>
               </tr>
               <%End If%>
               <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%>
               <tr>
                  <td>&nbsp;</td>
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Advisory Ripple Version?<%=Quick_Help ( "advisory_ripple_version" )%></td>
                  <%
                  Dim FRadvripYES, FRadvripNO, FRadvripDisabled

                  FRadvripYES = ""
                  FRadvripNO = ""
                  FRadvripDisabled = "disabled='disabled'"

                  ' Allow setting of advisory ripple to occur only by users who have the appropriate permission
                  If (objAccessControl.IsVisible( "AdvRipPackageVersions" )) AND isDLocked = "Y" Then
                     FRadvripDisabled = ""
                  End If

                  Dim rsQryAdvRip, advRipFlag
                  Set rsQryAdvRip = OraDatabase.DbCreateDynaset( "SELECT COUNT(*) as record_count FROM ADVISORY_RIPPLE WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))

                  If rsQryAdvRip("record_count") = 0  Then
                     FRadvripNO = "checked"
                     advRipFlag = False
                  Else
                     FRadvripYES = "checked"
                     advRipFlag = True
                  End If

                  rsQryAdvRip.Close()
                  Set rsQryAdvRip = nothing

                  %>
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
                     Yes<input name="FRadvrip" type="radio" value="1" <%=FRadvripDisabled%> <%=FRadvripYES%> >&nbsp;&nbsp;
                     No<input name="FRadvrip" type="radio" value="0"  <%=FRadvripDisabled%> <%=FRadvripNO%>  >&nbsp;&nbsp;
                  </td>
                  <td background="images/bg_form_lightbluedark.gif">
                     <span class='err_alert'><b>WARNING!</span>
                     <font size='1'>
                        <br>
                        When set to Yes, a new version of this package will not cause a ripple of higher level packages in the current release.
                     </font></b>
                  </td>

               </tr>
               <%End If%>
               <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%>
               <tr>
                  <td>&nbsp;</td>
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Build Inclusion?<%=Quick_Help ( "ripple_build" )%></td>
                  <%
                  FRripplebuildYES = ""
                  FRripplebuildNO = ""
                  ' disabled="disabled" indicates the pv has been excluded indirectly
                  ' this is due to another pv (the root_pv_id) being excluded directly
                  ' allowing it to be included is somewhat pointless
                  ' fixing the root cause is a somewhat better approach
                  Dim disabled
                  disabled="disabled"

                  Dim rsQryRipple, rippleFlag
                  Set rsQryRipple = OraDatabase.DbCreateDynaset( "SELECT root_pv_id FROM DO_NOT_RIPPLE WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0))

                  If rsQryRipple.RecordCount = 0  Then
                     FRripplebuildYES = "checked"
                     rippleFlag = True
                     ' do not disable the default
                     disabled=""
                  Else
                     If isNull(rsQryRipple("root_pv_id")) Then
                        ' pv has been excluded directly
                        ' ie has a null pv_id
                        ' once fixed, pv should be included ie do not disable
                        disabled=""
                     End If
                     FRripplebuildNO = "checked"
                     rippleFlag = False
                  End If

                  rsQryRipple.Close()
                  Set rsQryRipple = nothing

                  %>
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
                     Yes<input name="FRripplebuild" type="radio" value="1" <%=FRripplebuildYES%>  <%=disabled%>>&nbsp;&nbsp;
                     No<input name="FRripplebuild" type="radio" value="0" <%=FRripplebuildNO%>>&nbsp;&nbsp;
                  </td>
                  <td background="images/bg_form_lightbluedark.gif">
                     <span class='err_alert'><b>WARNING!</span>
                     <font size='1'>
                        <br>
                        When set to No, this package and <u>all</u> packages which depend on this package, either directly or indirectly,<br>
                        will be excluded from the build. When the Yes option is disabled, indicates this package has been excluded indirectly.
                     </font></b>
                  </td>
               </tr>
               <%End If%>
               <tr>
                  <td>&nbsp;</td>
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Ripple Type?<%=Quick_Help ( "ripple_type" )%></td>
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
                    &nbsp;&nbsp;<% Call RenderRippleTypeCombo( objFormCollector.Item("ripple_field"), isDLocked )%>&nbsp;&nbsp;
                  </td>
                  <td background="images/bg_form_lightbluedark.gif">
                     <span class='err_alert'><b>WARNING!</span>
                     <font size='1'>
                        <br>
                        This enables a package to advertise how it will be numbered when rippled.<br>
                        THIS IS PRIMARILY INTENDED TO CATER FOR PACKAGES WHICH DO NOT SUPPORT A NON ZERO PATCH/BUILD NUMBER,<br>
                        AND FOR PRODUCTS WHERE CONSTANTLY RIPPLING A PATCH/BUILD NUMBER IS DISLIKED BY A CUSTOMER.
                     </font></b>
                  </td>
               </tr>
               <tr id="limits_row" style="visibility:hidden; position:static">
                  <td>&nbsp;</td>
                  <td nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Version Field Limits</td>
                  <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt" align="right">
                     Major&nbsp;&nbsp;<input name="Major" id="Major" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("major_limit")%>">&nbsp;&nbsp;<br>
                     Minor&nbsp;&nbsp;<input name="Minor" id="Minor" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("minor_limit")%>">&nbsp;&nbsp;<br>
                     Patch&nbsp;&nbsp;<input name="Patch" id="Patch" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("patch_limit")%>">&nbsp;&nbsp;<br>
                     Build&nbsp;&nbsp;<input name="Build" id="Build" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("build_number_limit")%>">&nbsp;&nbsp;
                  </td>
                  <td background="images/bg_form_lightbluedark.gif">
                     <span class='err_alert'><b>WARNING!</span>
                     <font size='1'>
                        <br>
                        A field (major/minor/patch/build number) may be assigned non zero limits to determine how it will be numbered when rippled.<br>
                        Prior to reaching a limit, the rightmost field able to be incremented will be when rippled.<br>
                        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>
                        A field may be assigned to zero to fix the field (to 0 or 000 for the build number field) when rippled.
                     </font></b>
                  </td>
               </tr>
               <tr>
                  <td>&nbsp;</td>
                  <td nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
                  <td nowrap> <p>&nbsp;</p></td>
                  <td nowrap>&nbsp;</td>
               </tr>
            </table>
        </td>
      </tr>
      <tr>
         <td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
         <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
      </tr>
   </table>
<input type="hidden" name="pv_id" value="<%=parPv_id%>">
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
<input type="hidden" name="rippleFlag" value="<%=rippleFlag%>">
<input type="hidden" name="peggedFlag" value="<%=peggedFlag%>">
<input type="hidden" name="advRipFlag" value="<%=advRipFlag%>">
<input type="hidden" name="action" value="true">
</form>
</body>
</html>
<%
'------------- RUN AFTER PAGE RENDER ---------------
Set objFormCollector = Nothing
'---------------------------------------------------
%>

<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->