Rev 185 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%Option explicitResponse.Expires = 0 ' always load the page, dont store%><%'=====================================================' Change Owner'=====================================================%><!--#include file="common/conf.asp"--><!--#include file="common/globals.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"--><!--#include file="common/formating.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 parPPv_id ' pv_id of parent'Dim parRtag_idDim parRfileDim parView_idDim parBase_view_idDim bPreventSubmit'------------ Constants Declaration -----------'------------ Constants Declaration -----------Const imgPkgLocked = "<img src='images/i_locked.gif' width='7' height='10' hspace='4' align='absmiddle'>"Const imgPkgLockSpacer = "<img src='images/spacer.gif' width='7' height='10' hspace='4' align='absmiddle'>"'------------ Variable Init -------------------Set pkgInfoHash = CreateObject("Scripting.Dictionary")parPv_id = QStrPar("pv_id")parPPv_id = QStrPar("ppv_id")parRtag_id = QStrPar("rtag_id")parRfile = Request("rfile")parView_id = QStrPar("view_id")parBase_view_id = QStrPar("base_view_id")bPreventSubmit = false'----------------------------------------------%><%Sub Get_Pkg_Information ( NNpv_id)Dim rsTemp, Query_StringQuery_String = _" SELECT pkg.pkg_id, pkg.pkg_name, pv.pkg_version, pv.dlocked,pv.modified_stamp,um.full_name as modifier,pv.created_stamp,uc.full_name as creator"&_" FROM packages pkg, package_versions pv, users um, users uc"&_" WHERE pkg.pkg_id = pv.pkg_id"&_" AND pv.modifier_id = um.user_id (+)" &_" AND pv.creator_id = uc.user_id (+)" &_" AND pv.pv_id = "& NNpv_idSet rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) ThenpkgInfoHash.Add "pkg_id", (rsTemp.Fields("pkg_id"))pkgInfoHash.Add "pkg_name", (rsTemp.Fields("pkg_name"))pkgInfoHash.Add "pkg_version", (rsTemp.Fields("pkg_version"))pkgInfoHash.Add "dlocked", (rsTemp.Fields("dlocked"))pkgInfoHash.Add "modified_stamp", (rsTemp.Fields("modified_stamp"))pkgInfoHash.Add "modifier", (rsTemp.Fields("modifier"))pkgInfoHash.Add "created_stamp", (rsTemp.Fields("created_stamp"))pkgInfoHash.Add "creator", (rsTemp.Fields("creator"))End IfrsTemp.CloseSet rsTemp = nothingEnd Sub'----------------------------------------------Sub Add_Missing_Dependency(RtagId, pvId, viewId)OraDatabase.Parameters.Add "RTAG_ID", RtagId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "PV_ID", pvId, ORAPARM_INPUT, ORATYPE_VARCHAR2OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBEROraDatabase.Parameters.Add "VIEW_ID", viewId, ORAPARM_INPUT, ORATYPE_NUMBERobjEH.TryORA ( OraSession )' check if the package already exists in a pending or wip stateIf PackageExists(RtagId, pvId, "planned") ThenCall RaiseMsg ( enum_WMSG_ERROR, "Package " & pkgInfoHash.Item ("pkg_name") & " " & pkgInfoHash.Item ("pkg_version") & " already exists in a pending state")ElseIf PackageExists(RtagId, pvId, "work_in_progress") ThenCall RaiseMsg ( enum_WMSG_ERROR, "Package " & pkgInfoHash.Item ("pkg_name") & " " & pkgInfoHash.Item ("pkg_version") & " already exists as a WIP")End IfOraDatabase.ExecuteSQL _"BEGIN PK_PLANNED.REMOVE_PACKAGE ( :PV_ID, :RTAG_ID, :USER_ID ); END;"If Err.Number = 0 ThenOraDatabase.ExecuteSQL _"BEGIN PK_RELEASE.ADD_PACKAGE ( :PV_ID, :VIEW_ID, :RTAG_ID, :USER_ID ); END;"End IfobjEH.CatchORA ( OraSession )OraDatabase.Parameters.Remove "RTAG_ID"OraDatabase.Parameters.Remove "PV_ID"OraDatabase.Parameters.Remove "USER_ID"OraDatabase.Parameters.Remove "VIEW_ID"End SubFunction Release_Groups ( SSrtag_id, SSpkg_id )Release_Groups = _"SELECT vi.view_id, vi.view_name, bv.hint"&_" FROM views vi,"&_" ("&_" SELECT DISTINCT rc.BASE_VIEW_ID, '> ' AS hint"&_" FROM release_content rc,"&_" package_versions pv"&_" WHERE rc.pv_id = pv.pv_id"&_" AND pv.pkg_id IN (" & SSpkg_id & ")"&_" ) bv "&_"WHERE"&_" UPPER(vi.base_view) = 'Y'"&_" AND bv.BASE_VIEW_ID (+) = vi.VIEW_ID "&_"ORDER BY vi.view_name ASC"End Function%><%'Process submitionIf CBool(QStrPar("action")) AND objAccessControl.UserLogedIn ThenCall Add_Missing_Dependency(parRtag_id,parPv_id,parView_id)Call OpenInParentWindow ( "dependencies.asp?pv_id="& parPPv_id &"&rtag_id="& parRtag_id )Call CloseWindowEnd If%><%Call Get_Pkg_Information ( parPv_id)%><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/tipster.js"></script><script language="JavaScript" src="images/_help_tips.js"></script><script language="JavaScript" src="images/common.js"></script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();"><form name="addmissingdep" 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="images/i_add_deps.gif" width="22" height="25" hspace="5"></td><td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl"> Add Missing Dependency</td><td background="images/lbox_bg_blue.gif" align="right" width="50%"><input type="submit" name="btn" value="Add" style="width:50" class="form_btn_comp"><input type="reset" name="btn" value="Cancel" style="width:50" 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">Details of Dependency that will be Added:</td><td nowrap width="100%"> </td><td nowrap width="100%"> </td></tr><tr><td width="1%"> </td><td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Package</td><td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"><%=imgPkgLockSpacer%><%=pkgInfoHash.Item("pkg_name")%></td></tr><tr><td width="1%"> </td><td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Version</td><td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"><%If pkgInfoHash.Item("dlocked") = "Y" Then%><%=imgPkgLocked%><%Else%><%=imgPkgLockSpacer%><%End If%><%=pkgInfoHash.Item("pkg_version")%></td></tr><tr><td width="1%"> </td><td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Last Modified</td><td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"><%=imgPkgLockSpacer%><%=EuroDateTime(pkgInfoHash.Item ("modified_stamp")) & " by " & pkgInfoHash.Item ("modifier")%></td></tr><tr><td width="1%"> </td><td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Created</td><td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"><%=imgPkgLockSpacer%><%=EuroDateTime(pkgInfoHash.Item ("created_stamp")) & " by " & pkgInfoHash.Item ("creator")%></td></tr><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">Select Destination View</td><td nowrap width="100%"> </td></tr><tr><td width="1%"> </td><td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif" valign=top>Base View</td><td nowrap width="100%" background="images/bg_form_lightbluedark.gif"><table border=0 cellpadding=0 cellspacing=0 class="rep_small"><tr><td><select name="view_id" class="form_item"><option></option><%Dim iDefault_View_id: iDefault_View_id = -1If Not IsNull(parBase_view_id) Then iDefault_View_id = parBase_view_idDim rsRelGroupsDim bSelected: bSelected=FalseSet rsRelGroups = OraDatabase.DbCreateDynaset( Release_Groups( parRtag_id,pkgInfoHash.Item ("pkg_id")), cint(0))While ((NOT rsRelGroups.BOF) AND (NOT rsRelGroups.EOF))If (NOT IsNull(rsRelGroups("hint"))) AND (NOT bSelected) ThenResponse.write "<option selected value='"& rsRelGroups("view_id") &"'>"& rsRelGroups("hint") & rsRelGroups("view_name") &"</option>"bSelected=TrueElseResponse.write "<option value='"& rsRelGroups("view_id") &"'>"& rsRelGroups("hint") & rsRelGroups("view_name") &"</option>"End IfrsRelGroups.MoveNextWEndrsRelGroups.Closeset rsRelGroups = nothing%></select></td></tr><tr><td>NOTE: '>' is a suggestion of where to place this dependency.It denotes views where it has been placed in other releases.</td></tr></table></td></tr><tr><input type="hidden" name="pv_id" value="<%=parPv_id%>"><input type="hidden" name="rtag_id" value="<%=parRtag_id%>"><input type="hidden" name="ppv_id" value="<%=parPPv_id%>"><input type="hidden" name="rfile" value="<%=parRfile%>"><input type="hidden" name="action" value="true"></tr></table></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%" wrap class="form_group" valign="bottom">WARNING:<br>The destination release may not satisfy any or all the dependencies that come withthis dependency you are about to add. It is your responsibility to rectify this in thedestination release.</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></form><!-- TIPS LAYERS --------------------------------------><div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div><!-----------------------------------------------------></body></html><!-- DESTRUCTOR -------><!--#include file="common/destructor.asp"-->