Rev 127 | Blame | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%Option explicitResponse.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 LoginCall 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_idDim queryDim rsQry, rsTempDim checkedDim FRripplebuildYES, FRripplebuildNODim objFormCollectorDim Query_StringDim isDLocked'------------ Constants Declaration -----------'------------ Variable Init -------------------Set objFormCollector = CreateObject("Scripting.Dictionary")parPv_id = QStrPar("pv_id")'----------------------------------------------%><%'------------------------------------------------------------------------------------------------------------------------------------Sub UpdateRippleType ( )Dim rsTemp, Query_StringDim storedRippleTypeDim storedMajorLimitDim storedMinorLimitDim storedPatchLimitDim storedBuildNumberLimitDim selectedRippleTypeselectedRippleType = 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 zerosenteredMajorLimit = CInt(Request("Major"))Dim enteredMinorLimitenteredMinorLimit = CInt(Request("Minor"))Dim enteredPatchLimitenteredPatchLimit = CInt(Request("Patch"))Dim enteredBuildLimitenteredBuildLimit = 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").ValuestoredMajorLimit = rsTemp("major_limit").ValueIf ( IsNull(storedMajorLimit) ) ThenstoredMajorLimit = "0"End IfstoredMinorLimit = rsTemp("minor_limit").ValueIf ( IsNull(storedMinorLimit) ) ThenstoredMinorLimit = "0"End IfstoredPatchLimit = rsTemp("patch_limit").ValueIf ( IsNull(storedPatchLimit) ) ThenstoredPatchLimit = "0"End IfstoredBuildNumberLimit = rsTemp("build_number_limit").ValueIf ( IsNull(storedBuildNumberLimit) ) ThenstoredBuildNumberLimit = "0"End If'normalise for comparison purposesstoredMajorLimit = CInt( storedMajorLimit )storedMinorLimit = CInt( storedMinorLimit )storedPatchlimit = CInt( storedPatchLimit )storedBuildNumberLimit = CInt( storedBuildNumberLimit )If (storedRippleType <> selectedRippleType) OR IsNull(storedRippleType) Then'update fieldsrsTemp.Edit()rsTemp.Fields("ripple_field").Value = selectedRippleTypersTemp.Update()Dim anotherQrySet 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 = nothingEnd IfIf ( storedMajorLimit <> enteredMajorLimit ) Then'update fieldsrsTemp.Edit()If ( enteredMajorLimit <> "0" ) ThenrsTemp.Fields("major_limit").Value = enteredMajorLimitElsersTemp.Fields("major_limit").Value = NULLEnd IfrsTemp.Update()'/* Log Action */Call Log_Action ( Request("pv_id"), "major_limit_update", enteredMajorLimit )End IfIf ( storedMinorLimit <> enteredMinorLimit ) Then'update fieldsrsTemp.Edit()If ( enteredMinorLimit <> "0" ) ThenrsTemp.Fields("minor_limit").Value = enteredMinorLimitElsersTemp.Fields("minor_limit").Value = NULLEnd IfrsTemp.Update()'/* Log Action */Call Log_Action ( Request("pv_id"), "minor_limit_update", enteredMinorLimit )End IfIf ( storedPatchLimit <> enteredPatchLimit ) Then'update fieldsrsTemp.Edit()If ( enteredPatchLimit <> "0" ) ThenrsTemp.Fields("patch_limit").Value = enteredPatchLimitElsersTemp.Fields("patch_limit").Value = NULLEnd IfrsTemp.Update()'/* Log Action */Call Log_Action ( Request("pv_id"), "patch_limit_update", enteredPatchLimit )End IfIf ( storedBuildNumberLimit <> enteredBuildLimit ) Then'update fieldsrsTemp.Edit()If ( enteredBuildLimit <> "0" ) ThenrsTemp.Fields("build_number_limit").Value = enteredBuildLimitElsersTemp.Fields("build_number_limit").Value = NULLEnd IfrsTemp.Update()'/* Log Action */Call Log_Action ( Request("pv_id"), "build_number_limit_update", enteredBuildLimit )End IfrsTemp.Close()Set rsTemp = nothingEnd Sub'------------------------------------------------------------------------------------------------------------------------------------Sub RipplePackage (flag)OraDatabase.Parameters.Add "PV_ID", parPv_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBERobjEH.TryORA ( OraSession )On Error Resume NextIf flag ThenOraDatabase.ExecuteSQL _"BEGIN Ripple_Package( :PV_ID, :RTAG_ID, :USER_ID ); END;"ElseOraDatabase.ExecuteSQL _"BEGIN UnRipple_Package( :PV_ID, :RTAG_ID, :USER_ID ); END;"End IfobjEH.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_StringQuery_String = _" SELECT * "&_" FROM package_versions pv, packages pkg"&_" WHERE pv.pkg_id = pkg.pkg_id"&_" AND pv_id = "& nPv_idSet rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))If (NOT rsTemp.BOF ) AND (NOT rsTemp.EOF) ThenobjDetails.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")) ThenobjDetails.Item("major_limit") = "0"ElseobjDetails.Item("major_limit") = rsTemp("major_limit")End IfIf isNull(rsTemp("minor_limit")) ThenobjDetails.Item("minor_limit") = "0"ElseobjDetails.Item("minor_limit") = rsTemp("minor_limit")End IfIf isNull(rsTemp("patch_limit")) ThenobjDetails.Item("patch_limit") = "0"ElseobjDetails.Item("patch_limit") = rsTemp("patch_limit")End IfIf isNull(rsTemp("build_number_limit")) ThenobjDetails.Item("build_number_limit") = "0"ElseobjDetails.Item("build_number_limit") = rsTemp("build_number_limit")End IfEnd IfrsTemp.Close()Set rsTemp = NothingEnd 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) ThenResponse.Write "<select name='ripple_type_combo' id='rtc' class='form_item' onChange='changeToRippleType(this.options[this.selectedIndex].value)'>"ElseResponse.Write "<select name='ripple_type_combo' id='rtc' class='form_item' disabled>"End IfSet rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)If cRippleType = rsTemp.Fields("state_acronym") ThenResponse.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 NumberResponse.write "<option value='"& rsTemp.Fields("state_acronym") &"' selected>"& rsTemp.Fields("state_name") & "</option>"ElseResponse.write "<option value='"& rsTemp.Fields("state_acronym") &"'>"& rsTemp.Fields("state_name") & "</option>"End IfrsTemp.MoveNextWEndrsTemp.Close()Set rsTemp = nothingResponse.Write "</select>"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 SubmissionIf CBool(QStrPar("action")) AND objAccessControl.UserLogedIn ThenCall UpdateRippleType()If NOT CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "1" ThenCall RipplePackage(True)End IfIf CBool(QStrPar("rippleFlag")) AND Request("FRripplebuild") = "0" ThenCall RipplePackage(False)End IfCall OpenInParentWindow ( "fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"&hidenv=true" )Call CloseWindowEnd 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 resizedif (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"> </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"> 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%"> </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%"> </td><td nowrap width="100%"> </td></tr><tr><td> </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 approachDim disableddisabled="disabled"Dim rsQryRipple, rippleFlagSet 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 ThenFRripplebuildYES = "checked"rippleFlag = True' do not disable the defaultdisabled=""ElseIf 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 disabledisabled=""End IfFRripplebuildNO = "checked"rippleFlag = FalseEnd IfrsQryRipple.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%>> No<input name="FRripplebuild" type="radio" value="0" <%=FRripplebuildNO%>> </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><tr><td> </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"> <% Call RenderRippleTypeCombo( objFormCollector.Item("ripple_field"), isDLocked )%> </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> </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 <input name="Major" id="Major" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("major_limit")%>"> <br>Minor <input name="Minor" id="Minor" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("minor_limit")%>"> <br>Patch <input name="Patch" id="Patch" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("patch_limit")%>"> <br>Build <input name="Build" id="Build" type="text" class="form_item" size="8" value="<%=objFormCollector.Item("build_number_limit")%>"> </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> </td><td nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td><td nowrap> <p> </p></td><td nowrap> </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="action" value="true"></form></body></html><%'------------- RUN AFTER PAGE RENDER ---------------Set objFormCollector = Nothing'---------------------------------------------------%><!-- DESTRUCTOR -------><!--#include file="common/destructor.asp"-->