Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
Option explicit
Response.Expires = 0   ' always load the page, dont store
%>
<%
'=====================================================
'               Update Unit Test Acceptance
'=====================================================
%>
<!--#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="_tabs.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 parTest_id
Dim rsQry
Dim rsUsr
Dim isDLocked
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
parPv_id = Request("pv_id")
parTest_id = Request("test_id")
parRtag_id = Request("rtag_id")
'----------------------------------------------
%>
<%
Sub Get_This_Unit_Test ( nTest_id, nPv_id, oRS )
   Dim Query_String
   Query_String = _
   "   SELECT tt.TEST_TYPE_NAME,"&_
   "         ut.*"&_
   "     FROM UNIT_TESTS ut,"&_
   "           TEST_TYPES tt"&_
   "    WHERE ut.TEST_TYPES_FK = tt.TEST_TYPE_ID"&_
   "      AND ut.PV_ID = :PV_ID"&_
   "      AND ut.TEST_ID = :TEST_ID"
   Query_String = Replace( Query_String, ":TEST_ID", nTest_id )
   Query_String = Replace( Query_String, ":PV_ID", nPv_id )

   Set oRS = OraDatabase.CreateDynaset( Query_String, cint(0))
End Sub

Function SQL_Get_Users ( nUser_id )
   SQL_Get_Users = _
   " SELECT usr.user_id, usr.full_name,"&_
   "        DECODE(usr.user_id, "& nUser_id &", 'selected', NULL) AS selected"&_
   "   FROM USERS usr"&_
   "  WHERE usr.disabled = 'N'"&_
   " ORDER BY UPPER(usr.full_name)"

End Function

Sub Update_Unit_Test_Acceptance ( nTest_id, nPv_id, sAccepted, sAcceptanceDate, sReviewComments)
   OraDatabase.Parameters.Add "TEST_ID",          nTest_id,                ORAPARM_INPUT,    ORATYPE_NUMBER
   OraDatabase.Parameters.Add "PV_ID",            nPv_id,                  ORAPARM_INPUT,    ORATYPE_NUMBER
   OraDatabase.Parameters.Add "ACCEPTED",         sAccepted,               ORAPARM_INPUT,    ORATYPE_VARCHAR2
   OraDatabase.Parameters.Add "REVIEW_DATE",      sAcceptanceDate,         ORAPARM_INPUT,    ORATYPE_VARCHAR2
   OraDatabase.Parameters.Add "ACCEPTED_BY",      objAccessControl.UserId, ORAPARM_INPUT,    ORATYPE_NUMBER
   OraDatabase.Parameters.Add "REVIEW_COMMENTS",  sReviewComments,         ORAPARM_INPUT,    ORATYPE_VARCHAR2

   objEH.TryORA ( OraSession )
   On Error Resume Next

   OraDatabase.ExecuteSQL _
   "BEGIN  Update_Unit_Test_Acceptance  ( :TEST_ID,"&_
   "                                      :PV_ID,"&_
   "                                      :ACCEPTED,"&_
   "                                      :REVIEW_DATE,"&_
   "                                      :ACCEPTED_BY,"&_
   "                                      :REVIEW_COMMENTS,"&_
   "                                      'N'"&_
   "                                    );  END;"

   objEH.CatchORA ( OraSession )

End Sub
%>
<%
'------------ Action Requirements -------------------
'Process submition
If CBool(Request("action")) AND objAccessControl.UserLogedIn Then
   Call Update_Unit_Test_Acceptance ( parTest_id, parPv_id, Request("accepted"), Request("acceptance_date"), Request("review_comments") )
   Call OpenInParentWindow ("fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id )
   'Call CloseWindow

End If
Call Get_Pkg_Short_Info(  parPv_id, NULL, NULL, NULL, NULL, NULL, isDLocked )
Call Get_This_Unit_Test ( parTest_id, parPv_id, rsQry )
%>
<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>
<!--#include file="_menu_def.asp"-->
<!-- TIPS -->
<script language="JavaScript" src="images/tipster.js"></script>
<script language="JavaScript" src="images/_help_tips.js"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
<!-- TIPS LAYERS -------------------------------------->
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
<!----------------------------------------------------->
<form action="<%=scriptName%>" method="post" name="unittest" onSubmit="MM_validateForm('accepted','Accepted field','R','acceptance_date','Review Date','RisDate','test_summary','Test Summary','maxLength:4000');return document.MM_returnValue;">
  <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
    <tr>
      <td width="1%" background="images/lbox_bg_orange.gif"><img src="images/i_unit_test_off.gif" width="18" height="25" hspace="5" border="0"></td>
      <td width="1%" background="images/lbox_bg_blue.gif" nowrap class="wform_ttl">&nbsp;Unit  Test</td>
     <td width="100%" background="images/lbox_bg_blue.gif" align="right" nowrap class="wform_ttl">
      <input type="submit" name="btn" value="Save" class="form_btn">
      <input type="reset" name="btn" value="Close" class="form_btn" 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="0" cellpadding="0">
          <tr>
            <td width="1%" nowrap class="sublbox_hitem"><img src="images/h_trsp_dot.gif" width="10" height="30"><%If Request("save_stat") <> "" Then%>Saving complete.<%End If%></td>
            <td width="100%" align="right" valign="bottom">
         <!-- TABS ------------------------------------->
         <%
         If isDLocked = "Y" Then
            Call Generate_Tab_Menu ( TABarray6D, "Acceptance", "blue" )
         Else
            Call Generate_Tab_Menu ( TABarray6, "Acceptance", "blue" )
         End If
         %>
         </td>
          </tr>
          <tr>
            <td background="images/lbox_bg_blue.gif"></td>
            <td background="images/lbox_bg_blue.gif">&nbsp;</td>
          </tr>
        </table>
        <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="100%">&nbsp; </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Accepted</td>
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt">
         <select name="accepted" class="form_item">
            <option></option>
            <option value="<%=enumUNIT_TEST_ACCEPTED%>" <%If rsQry("test_accepted") = enumUNIT_TEST_ACCEPTED Then%>selected<%End If%>>Yes</option>
            <option value="<%=enumUNIT_TEST_NOTACCEPTED%>" <%If rsQry("test_accepted") = enumUNIT_TEST_NOTACCEPTED Then%>selected<%End If%>>No</option>
            </select></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Review
              Date</td>
            <td nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><input name="acceptance_date" type="text" class="form_item" id="acceptance_date" value="<%If Not IsNull(rsQry("acceptance_date")) Then%><%=EuroDate ( rsQry("acceptance_date") ) %><%Else%><%=EuroDate (Date) %><%End If%>" size="20" maxlength="10">
            </td>
          </tr>
          <tr>
            <td width="1%">&nbsp;</td>
            <td width="1%" valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Comments / Issue# <%=Quick_Help ( "ut_review_comments" )%></td>
            <td width="100%" valign="top" nowrap background="images/bg_form_lightbluedark.gif" class="form_txt"><textarea cols="80" rows="20" name="review_comments" class="form_item" id="review_comments"><%=rsQry("review_comments")%></textarea>
            </td>
          </tr>
          <tr>
            <td width="1%">&nbsp;</td>
            <td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></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>
  <input type="hidden" name="save_stat" value="true">
  <input type="hidden" name="action" value="true">
  <input type="hidden" name="pv_id" value="<%=parPv_id%>">
  <input type="hidden" name="test_id" value="<%=parTest_id%>">
  <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
</form>
</body>
</html>


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