<%@LANGUAGE="VBSCRIPT"%> <% Option explicit Response.Expires = 0 ' always load the page, dont store %> <% '===================================================== ' Ripple Properties '===================================================== %> <% ' Set rfile parameter. This is a return page after Login Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" ) '------------ ACCESS CONTROL ------------------ %> <% '------------ 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 "" 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 "" ElseIf IsNull(cRippleType) AND rsTemp.Fields("state_acronym") = "b" Then 'If nothing selected, select Build Number Response.write "" Else Response.write "" End If rsTemp.MoveNext WEnd rsTemp.Close() Set rsTemp = nothing Response.Write "" 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 '-------------------------------------------------------------------------------------------- %> Release Manager
 Ripple Properties
  <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%> <% 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 %> <%End If%> <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%> <% 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 %> <%End If%> <%If NOT IsNull(parRtag_id) AND parRtag_id <> "" Then%> <% 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 %> <%End If%>
   
  Pegged Version?<%=Quick_Help ( "pegged_version" )%> Yes <%=FRpeggedYES%> >   No <%=FRpeggedNO%> >   WARNING!
When set to Yes, this package version is never rippled in the current release regardless of the other ripple settings below.
  Advisory Ripple Version?<%=Quick_Help ( "advisory_ripple_version" )%> Yes <%=FRadvripYES%> >   No <%=FRadvripNO%> >   WARNING!
When set to Yes, a new version of this package will not cause a ripple of higher level packages in the current release.
  Build Inclusion?<%=Quick_Help ( "ripple_build" )%> Yes <%=disabled%>>   No>   WARNING!
When set to No, this package and all packages which depend on this package, either directly or indirectly,
will be excluded from the build. When the Yes option is disabled, indicates this package has been excluded indirectly.
  Ripple Type?<%=Quick_Help ( "ripple_type" )%>   <% Call RenderRippleTypeCombo( objFormCollector.Item("ripple_field"), isDLocked )%>   WARNING!
This enables a package to advertise how it will be numbered when rippled.
THIS IS PRIMARILY INTENDED TO CATER FOR PACKAGES WHICH DO NOT SUPPORT A NON ZERO PATCH/BUILD NUMBER,
AND FOR PRODUCTS WHERE CONSTANTLY RIPPLING A PATCH/BUILD NUMBER IS DISLIKED BY A CUSTOMER.
 

 

 
<% '------------- RUN AFTER PAGE RENDER --------------- Set objFormCollector = Nothing '--------------------------------------------------- %>