<%@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 Query_String Dim isDLocked Dim isNotSdk '------------ Constants Declaration ----------- '------------ Variable Init ------------------- 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 selectedRippleName, selectedRippleState selectedRippleName = rippleFieldName(selectedRippleType, selectedRippleState) '/* Log Action */ Call Log_Action ( Request("pv_id"), "ripple_type_update", selectedRippleName) 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 PersistRippleStop (flag) Dim rsTemp, Query_String Query_String = _ " SELECT persist_ripple_stop, ripple_stop"&_ " FROM release_content"&_ " WHERE pv_id = :PV_ID AND rtag_id = :RTAG_ID" OraDatabase.Parameters.Add "PV_ID", parPv_id, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0)) Dim sValue, sValueP, textValue sValue = NULL sValueP = NULL textValue = "clear_persist_ripple_stop" If flag Then textValue = "set_persist_ripple_stop" sValue = "s" sValueP = "Y" End If 'update fields rsTemp.Edit() rsTemp.Fields("persist_ripple_stop").Value = sValueP rsTemp.Fields("ripple_stop").Value = sValue rsTemp.Update() ' Determine the location of th epackage-version Query_String = _ "SELECT proj.PROJ_NAME ||' / '|| rt.RTAG_NAME AS ReleaseLocation" &_ " FROM PROJECTS proj,RELEASE_TAGS rt" &_ " WHERE rt.PROJ_ID = proj.PROJ_ID AND rt.RTAG_ID = :RTAG_ID" Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0)) Dim ReleaseLocation : ReleaseLocation = "Unknown" If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then ReleaseLocation = rsTemp.Fields("ReleaseLocation") End If OraDatabase.Parameters.Remove "PV_ID" OraDatabase.Parameters.Remove "RTAG_ID" rsTemp.Close() Set rsTemp = nothing '/* Log Action */ Call Log_Action ( Request("pv_id"), textValue, "Location: " & ReleaseLocation) End Sub '------------------------------------------------------------------------------------------------------------------------------------ Sub Get_Form_Details( nRtag_id, 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("ripple_field") = rsTemp("ripple_field") objDetails.Item("dlocked") = rsTemp("dlocked") 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 ' ' Release Based Properties objDetails.Item("is_sdkpkg") = FALSE If nRtag_id <> "" Then Query_String = _ " SELECT * "&_ " FROM RELEASE_CONTENT rc"&_ " WHERE rc.rtag_id = " & nRtag_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("is_sdkpkg") = (NOT IsNull(rsTemp("sdktag_id"))) End If rsTemp.Close() Set rsTemp = Nothing End If End Sub '---------------------------------------------------------------------------------------------------------------------- Sub RenderRippleTypeCombo( cRippleType, cDLocked ) Dim isEditable Dim ii Dim bFlag ' 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 ) If IsNull(cRippleType) Then cRippleType = "b" End If If (isEditable) Then Response.Write "" End If For ii=0 to ubound(rippleFieldValues) Dim val, name, selected val = rippleFieldValues(ii) name = rippleFieldName(val, bFlag) selected = iif(cRippleType = val, "selected", "") Response.write "" Next 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( parRtag_id, parPv_id, objFormCollector ) isDLocked = objFormCollector.Item("dlocked") isNotSdk = NOT objFormCollector.Item("is_sdkpkg") '------------------------------------- 'Start Process Submission If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then Call UpdateRippleType() ' Changes to the Persistent Ripple Stop ----------------------------------- If NOT CBool(QStrPar("prippleStopFlag")) AND Request("FRprippleStop") = "1" Then Call PersistRippleStop(True) End If If CBool(QStrPar("prippleStopFlag")) AND Request("FRprippleStop") = "0" Then Call PersistRippleStop(False) End If ' 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
<%If NOT IsNull(parRtag_id) AND parRtag_id <> "" AND isNotSdk Then%> <% Dim FRPrippleStopYES, FRPrippleStopNO, FRprippleStopDIS FRPrippleStopYES = "" FRPrippleStopNO = "" FRprippleStopDIS = "disabled='disabled'" ' Allow persistent ripple stop to be set If (canShowControlInProject( "AdvRipPackageVersions" )) AND isDLocked = "Y" Then FRprippleStopDIS = "" End If Dim rsQryPrippleStop, prippleStopFlag Set rsQryPrippleStop = OraDatabase.DbCreateDynaset( "SELECT PERSIST_RIPPLE_STOP FROM RELEASE_CONTENT WHERE RTAG_ID ="& parRtag_id &"AND PV_ID ="& parPv_id, cint(0)) If rsQryPrippleStop.RecordCount <> 0 Then If IsNull(rsQryPrippleStop("PERSIST_RIPPLE_STOP")) Then FRPrippleStopNO = "checked" prippleStopFlag = False Else FRPrippleStopYES = "checked" prippleStopFlag = True End If End If rsQryPrippleStop.Close() Set rsQryPrippleStop = nothing %> <% 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 (canShowControlInProject( "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 (canShowControlInProject( "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 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)) If rsQryRipple.RecordCount = 0 Then FRripplebuildYES = "checked" rippleFlag = True ' do not disable the default disabled="" Else If rsQryRipple("root_pv_id") < 0 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%> <%If isNotSdk Then %> <%End If%>
Persistent Ripple Stop? Yes <%=FRPrippleStopYES%> >   No <%=FRPrippleStopNO%> >   WARNING!
When set to Yes, this package version will not be rippled, until it has been released by a user. New versions of the the package will be marked so as to prevent futher rippling.
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 then this package has been excluded indirectly.
This setting is normally controlled by the build system.
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 '--------------------------------------------------- %>