<%@LANGUAGE="VBSCRIPT"%> <% '===================================================== '| | '| Edit Project View Details | '| | '===================================================== %> <% Option explicit ' Good idea to set when using redirect Response.Expires = 0 ' always load the page, dont store %> <% ' Set rfile parameter. This is a return page after Login Call objPMod.StoreParameter ( "rfile", RequestDefault("rfile","rtree.asp") ) objPMod.PersistInQryString("proj_id") '------------ ACCESS CONTROL ------------------ %> <% '------------ Variable Definition ------------- Dim rsQry Dim parProjId Dim parModeCode Dim pvIdList, pvIds, PVS, i, aFullList Dim ProblemsString Dim ProblemInfo Dim rfile '------------ Constants Declaration ----------- 'Const imgPkgLocked = "" '------------ Variable Init ------------------- parProjId = Request("proj_id") parModeCode = Request("mode_code") objPMod.PersistInQryString("proj_id") rfile = RequestDefault("rfile", "dependencies.asp") Set ProblemInfo = Server.CreateObject("Scripting.Dictionary") '---------------------------------------------- Sub DestroyPackage ( nPvId, cOverrideWarnings, outProblemsString ) OraDatabase.Parameters.Add "PV_ID", nPvId, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "OVERRIDE_WARNINGS", cOverrideWarnings, ORAPARM_INPUT, ORATYPE_CHAR OraDatabase.Parameters.Add "PROBLEM_STRING", NULL, ORAPARM_OUTPUT, ORATYPE_VARCHAR2 OraDatabase.Parameters("PROBLEM_STRING").MinimumSize = 1000 'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn") objEH.TryORA ( OraSession ) On Error Resume Next OraDatabase.ExecuteSQL _ "BEGIN "&_ " PK_PACKAGE.DESTROY_PACKAGE ( :PV_ID, :OVERRIDE_WARNINGS, :PROBLEM_STRING ); "&_ "END; " objEH.CatchORA ( OraSession ) outProblemsString = OraDatabase.Parameters("PROBLEM_STRING").Value OraDatabase.Parameters.Remove "PV_ID" OraDatabase.Parameters.Remove "OVERRIDE_WARNINGS" OraDatabase.Parameters.Remove "PROBLEM_STRING" End Sub '---------------------------------------------- Sub RemovePackage ( nPvId, cOverrideWarnings, outProblemsString ) Dim ReturnCode 'Response.Write "
RemovePackage:" & nPvId & "
" OraDatabase.Parameters.Add "PV_ID", nPvId, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "RTAG_ID", DB_RTAG_ID, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId,ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "FORCE_REMOVE", cOverrideWarnings, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "RETURN_CODE", NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER objEH.TryORA ( OraSession ) On Error Resume Next OraDatabase.ExecuteSQL _ "BEGIN "&_ " :RETURN_CODE := PK_ENVIRONMENT.REMOVE_PACKAGE ( :PV_ID, :RTAG_ID, :USER_ID, :FORCE_REMOVE );"&_ "END; " objEH.CatchORA ( OraSession ) ReturnCode = OraDatabase.Parameters("RETURN_CODE").Value If ( ReturnCode <> 0 ) Then outProblemsString = "- Unexpected error" End If OraDatabase.Parameters.Remove "PV_ID" OraDatabase.Parameters.Remove "RTAG_ID" OraDatabase.Parameters.Remove "USER_ID" OraDatabase.Parameters.Remove "FORCE_REMOVE" OraDatabase.Parameters.Remove "RETURN_CODE" End Sub '---------------------------------------------- Sub MovePackage(nPvId, newRtagId) OraDatabase.Parameters.Add "PV_ID", nPvId, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "CURRENT_RTAG_ID", DB_RTAG_ID, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "NEW_RTAG_ID", newRtagId, ORAPARM_INPUT, ORATYPE_NUMBER OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER 'Response.write nPvId &"-"& cOverrideWarnings &"-"& Request("btn") objEH.TryORA ( OraSession ) On Error Resume Next OraDatabase.ExecuteSQL _ "BEGIN "&_ " PK_PACKAGE.MOVE_PACKAGE ( :PV_ID, :CURRENT_RTAG_ID, :NEW_RTAG_ID, :USER_ID ); "&_ "END; " objEH.CatchORA ( OraSession ) OraDatabase.Parameters.Remove "PV_ID" OraDatabase.Parameters.Remove "CURRENT_RTAG_ID" OraDatabase.Parameters.Remove "NEW_RTAG_ID" OraDatabase.Parameters.Remove "USER_ID" End Sub '------------ RUN BEFORE PAGE RENDER ---------- ' --- Enter Form Validation Rule Changes here... ---- '---------------------------------------------------- ' --- RUN onPostBack --- If Request("action") <> "" Then Dim decision Dim problem : problem = false Dim mode, pvid decision = Left(Request("decision"), 1) 'Gets the decision based on the combo box selection aFullList = Split ( Replace( Request("pvIds"), " ", "" ), "," ) If decision = 0 Then Call OpenInWindow ( rfile & "?rtag_id="&DB_RTAG_ID ) ElseIf decision = 1 Then ' Destroy or Remove-from-release ' If the package is 'locked' then it will be removed from the release ' Otherwise the package will be destroyed For Each PVS In aFullList If PVS <> "" Then mode = Mid(PVS,1,1) pvid = Mid(PVS,2) If mode = "U" Then Call DestroyPackage(pvid, "N", ProblemsString) If mode = "L" Then Call RemovePackage (pvid, "N", ProblemsString) If ProblemsString <> "" Then ProblemInfo.Add pvid, ProblemsString problem = true End If End If Next ElseIf decision = 2 Then For Each PVS In aFullList If PVS <> "" Then mode = Mid(PVS,1,1) pvid = Mid(PVS,2) Call MovePackage(pvid,Request("FRrtag_id")) End If Next End If If objEH.Finally AND NOT problem Then Call OpenInWindow ( "_change_release_mode.asp?mode_code=" & parModeCode & "&rtag_id="&DB_RTAG_ID ) End If End If '---------------------------------------------- %> Release Manager <% '-- FROM START --------------------------------------------------------------------------------------------------------- objFormComponent.FormName = "FormName" objFormComponent.Action = ScriptName Call objFormComponent.FormStart() %> <% Call objFormComponent.FormEnd() '-- FROM END ---------------------------------------------------------------------------------------------------------------- %>

 

<%If parModeCode = 5 Then%>

EDIT RELEASE BEFORE ARCHIVING

<%ElseIf parModeCode = 6 Then%>

EDIT RELEASE BEFORE PRESERVING

<%Else%>

EDIT RELEASE BEFORE CLOSING

<%End If%>
<%If ProblemInfo.Count > 0 Then%> Problems encountered <%End If%>
<%If ProblemInfo.Count > 0 Then%> <%End If%> <% Dim currState currState = "" OraDatabase.Parameters.Add "RTAG_ID", DB_RTAG_ID, ORAPARM_INPUT, ORATYPE_NUMBER Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("CheckWIPS.sql") , cint(0) ) OraDatabase.Parameters.Remove "RTAG_ID" '--- Render rows --- Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF) Dim vlink, pvidFlag pvid = CStr(rsQry("pv_id")) vlink = "dependencies.asp?rtag_id=" & DB_RTAG_ID & "&pv_id=" & pvid 'Add the pv_ids to the Array pvidFlag = "U" If rsQry("dlocked") = "Y" Then pvidFlag = "L" End If PVS = PVS + pvidFlag + pvid + "," ' -------- GROUP BY BASE VIEW ----------------- If CStr(currState) <> CStr(rsQry("state")) Then %> <% currState = CStr(rsQry("state")) End If %> <%If ProblemInfo.Count > 0 Then%> <%End If%> <% rsQry.MoveNext If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then%> <%End If Loop rsQry.Close() Set rsQry = nothing %>
State Package Version LckProblem
<%=rsQry("state")%>
<%=rsQry("pkg_name")%> ><%=rsQry("pkg_version")%> <%If pvidFlag = "L" Then Response.Write imgPkgLocked End If %> <%=NewLine_To_BR(ProblemInfo.Item(pvid))%>
   
 
Select Decision: Select Destination: <%=objFormComponent.SubmitButton ( "OK", "class='form_btn' id='FormOk' disabled" )%>  <%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", rfile&"?rtag_id="&DB_RTAG_ID )%> <%=objPMod.ComposeHiddenTags()%> <%If Request("FRrtag_id") <> "" Then%> <%End If%> > >