Subversion Repositories DevTools

Rev

Rev 6579 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'               Obsolete Patch
'=====================================================
%>
<!--#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="controls/ERGFormComponent/classFormComponent.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<!--#include file="common/_form_window_common.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_id
Dim patchRecCount
Dim rsTemp
Dim parRfile
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parPv_id = QStrPar("pv_id")
parRfile = QStrPar("rfile")
'----------------------------------------------
%>
<%
'----------------------------------------------------------------------------------------------------
Sub Run_onMakeOfficial ( nPv_id, nRtag_id )

   Dim objWSH, proj_id, Qry

   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL " UPDATE package_versions "&_
                          " SET release_notes_info = '"& enum_RELEASE_NOTES_GENERATING &"'"&_
                          " WHERE pv_id = "& nPv_id

   objEH.CatchORA ( OraSession )

End Sub
'----------------------------------------------------------------------------------------------------
Sub MakeRelease ( NNpv_id, NNrtag_id )

   OraDatabase.Parameters.Add "PV_ID",    NNpv_id,                 ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "RTAG_ID",  NNrtag_id,               ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER

   On Error Resume Next
   objEH.ErrorRedirect = FALSE
   objEH.TryORA ( OraSession )

   OraDatabase.ExecuteSQL _
       "BEGIN "&_
       " PK_ENVIRONMENT.MAKE_RELEASE ( :PV_ID, :RTAG_ID, :USER_ID );"&_
       "END; "

   objEH.CatchORA ( OraSession )

   OraDatabase.Parameters.Remove "PV_ID"
   OraDatabase.Parameters.Remove "RTAG_ID"
   OraDatabase.Parameters.Remove "USER_ID"

   '/* Log Action */
   'Call Log_Action ( NNpv_id, "makeofficial", NULL )

End Sub
'-----------------------------------------------------------------------------------------

Sub MakeBulkReleasePatches ( NNPatch_id_list, NNrtagId )
   Dim pvId, iLoop
   pvId = split(NNPatch_id_list, ",")


   For iLoop = LBound(pvId) to UBound(pvId)
     pvId(iLoop) = Trim(pvId(iLoop))
   Next


   For iLoop = LBound(pvId) to UBound(pvId)

      Call MakeRelease(pvId(iLoop), NNrtagId )
      Call Run_onMakeOfficial(pvId(iLoop), NNrtagId)

   Next

End Sub
%>
<%
'Process submission
'------------ Action Requirements -------------------
If CBool(QStrPar("action"))   AND  objAccessControl.UserLogedIn  Then
   Call MakeBulkReleasePatches ( Request("patch_id_list"), Request("rtag_id") )
   If objEH.Finally Then
      Call OpenInParentWindow ( "patches.asp?pv_id="& parPv_id &"&rtag_id="& Request("rtag_id") )
      Call Destroy_All_Objects
      Response.End
   End If
End If
%>
<html>
   <head>
      <title>Release Manager</title>
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
      <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?ver=<%=VixVerNum%>" type="text/css">
      <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
      <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
      <script language="javascript">
function checkAllAuto()
{
  var args = arguments;
  start_point:
  for (var i=0;i<document.forms[0].elements.length;i++)
  {

     found = false;
     var e=document.forms[0].elements[i];
     if ((e.name != 'checkallauto') && (e.type=='checkbox'))
        e.checked=document.forms[0].checkallauto.checked;
  }
}
            </script>
   </head>
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
      <%
'-- FROM START ---------------------------------------------------------------------------------------------------------------
objFormComponent.FormName = "FormSearch"
objFormComponent.FormClass = "form_tight"
objFormComponent.Action = scriptName
Call objFormComponent.FormStart()
%>
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
         <!-- INCLUDE PATCHES +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
         <%
         OraDatabase.Parameters.Add "PV_ID",    parPv_id, ORAPARM_INPUT, ORATYPE_NUMBER

         Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("BulkPatchesRelease.sql"), cint(0))

         OraDatabase.Parameters.Remove "PV_ID"

         patchRecCount = rsTemp.RecordCount
         %>
         <tr>
            <td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
               <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
               <!--#include file="messages/_msg_inline.asp"-->
               <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
               <table width="100%" border="0" cellspacing="1" cellpadding="2">
                  <tr>
                     <td width="33%" colspan="3" nowrap class="body_colb">Available Patches To Make Official<br>
                        <div style="min-height:300px;max-height:500px;overflow:auto;">
                        <table width="265" border="0">
                           <tr>
                              <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field"><input type="checkbox" name="checkallauto" value="Check All" onclick="checkAllAuto();"></td>
                              <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field"><b>Select All</b></td>
                              <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field"></td>
                           </tr>
                           <tr>
                              <td width="20" background="images/bg_form_lightbluedark.gif">&nbsp;</td>
                              <td width="90" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Package</td>
                              <td width="119" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Patch Version</td>
                           </tr>
                           <%While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))%>
                           <tr>
                              <%If (rsTemp("patch_id")) <> "0" Then %>
                              <td><input type="checkbox" name="patch_id_list" value="<%=rsTemp("patch_id")%>"></td>
                              <%Else%>
                              <td><input type="checkbox" name="patch_id_list" value="<%=rsTemp("ppatch_id")%>"></td>
                              <%End If%>
                              <td nowrap class="form_txt"><%=rsTemp("pkg_name")%></td>
                              <td width="18" nowrap class="form_txt"><%=rsTemp("pkg_version")%></td>
                           </tr>
                           <%rsTemp.MoveNext
                           WEnd

                           rsTemp.Close
                           Set rsTemp = nothing
                           %>
                        </table>
                        </div>
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
         <tr>
            <td align="right">
               <input type="submit" name="btn" value="Submit" class="form_btn_comp">
               <input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame()">
            </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="action" value="true">
      <%
Call objFormComponent.FormEnd()
'-- FROM END ----------------------------------------------------------------------------------------------------------------
%>
   </body>
</html>
<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->