Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0    ' always load the page, dont store
%>
<%
'=====================================================
'                                       Build Standard
'=====================================================
%>
<!--#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 Login
Call 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_id
Dim BuildStandard
Dim rsQry, query
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parPv_id = QStrPar("pv_id")
'----------------------------------------------
%>
<%
'------------------------------------------------------------------------------------------------------------------------------------
Function GetCurrentBuildStandard ()
        Dim rsTemp, Query_String
        Query_String = _
        " SELECT bs_id"&_
        " FROM package_versions"&_
        " WHERE pv_id = "& Request("pv_id")
        Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
        
        If (NOT rsTemp.EOF) AND (NOT rsTemp.BOF) Then
                GetCurrentBuildStandard = rsTemp("bs_id")
        End If
        
        rsTemp.Close
        Set rsTemp = Nothing
End Function
'------------------------------------------------------------------------------------------------------------------------------------
Sub UpdateChangeType ( )
        Dim rsTemp, Query_String
        Query_String = _
        " SELECT bs_id, is_build_env_required"&_
        " FROM package_versions"&_
        " WHERE pv_id = "& Request("pv_id")
        Set rsTemp = OraDatabase.CreateDynaset( Query_String, cint(0))
        'update fields
        rsTemp.Edit
        rsTemp.Fields("bs_id").Value = Request("bs_id")
        
        If Request("bs_id") = 3 Then
                rsTemp.Fields("is_build_env_required").Value = "N"
        Else
                rsTemp.Fields("is_build_env_required").Value = ""
        End If  
        rsTemp.Update
        
        OraSession.BeginTrans
        
        OraDatabase.ExecuteSQL _
        "DELETE FROM PACKAGE_BUILD_INFO WHERE PV_ID ="&Request("pv_id")
        
        OraDatabase.ExecuteSQL _
        "DELETE FROM PACKAGE_BUILD_ENV WHERE PV_ID ="&Request("pv_id")
        
        OraSession.CommitTrans  
        
        rsTemp.Close
        Set rsTemp = nothing
        
        
        '/* Log Action */
        If Request("bs_id") = "1" Then
                Call Log_Action ( Request("pv_id"), "build_standard_update", "Build Standard Update: JATS" )
                
        ElseIf Request("bs_id") = "2" Then
                Call Log_Action ( Request("pv_id"), "build_standard_update", "Build Standard Update: ANT" )
                
        ElseIf Request("bs_id") = "3" Then
                Call Log_Action ( Request("pv_id"), "build_standard_update", "Build Standard Update: NONE" )
                
        End If
        
End Sub
'------------------------------------------------------------------------------------------------------------------------------------
%>
<%
'Process submition
If CBool(QStrPar("action")) AND objAccessControl.UserLogedIn Then
        Call UpdateChangeType ( )
        Call OpenInParentWindow ("fixed_issues.asp?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
        Call CloseWindow
Else
        BuildStandard = GetCurrentBuildStandard ()
End If
%>
<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>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<form name="reason" 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/s_notes_off.gif" width="20" height="24" hspace="5" border="0"></td>
      <td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">&nbsp;Build Standard </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%">&nbsp;</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 nowrap width="100%">&nbsp; </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt"> 
              <table width="100%"  border="0" cellspacing="0" cellpadding="3">
                <tr>
                  <td width="1"><input name="bs_id" type="radio" value="1" <%If BuildStandard = "1" Then%>checked<%End If%>></td>
                  <td width="100%" class="form_field">JATS</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td class="form_txt">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="2"><hr width="100%" size="1" noshade></td>
                </tr>
                <tr>
                  <td><input name="bs_id" type="radio" value="2" <%If BuildStandard = "2" Then%>checked<%End If%>></td>
                  <td class="form_field">ANT</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td class="form_txt">&nbsp;</td>
                </tr>
                <tr>
                  <td colspan="2"><hr width="100%" size="1" noshade></td>
                </tr>
<%

query = "       select * from"&_ 
                "       package_versions"&_ 
                "       where pkg_id =  (select pv.pkg_id from package_versions pv, packages pkg"&_
                "       where pkg.pkg_id = pv.pkg_id and pv.pv_id ="&Request("pv_id")&")"

Set rsQry = OraDatabase.CreateDynaset( query, cint(0))


If objAccessControl.IsActive("CheckNoneOnNewPackage") And rsQry.RecordCount = 1 Then

%>                              
                <tr>
                  <td><input name="bs_id" type="radio" value="3" <%If BuildStandard = "3" Then%>checked<%End If%>></td>
                  <td class="form_field">NONE</td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td class="form_txt">&nbsp;</td>
                </tr>                           
                <tr>
                  <td colspan="2"><hr width="100%" size="1" noshade></td>
                </tr>                           
<%
End If

rsQry.Close()
Set rsQry = Nothing

%>                              


              </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">            </td>
          </tr>
          <tr> 
            <td width="1%">&nbsp;</td>
            <td nowrap width="100%"> 
              <p>&nbsp;</p>
            </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>
</body>
</html>


<!-- DESTRUCTOR ------->
<!--#include file="common/destructor.asp"-->