Subversion Repositories DevTools

Rev

Rev 6877 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                    FIXED ISSUES                   |
'|                                                   |
'=====================================================
%>
<%
Option explicit
' Good idea to set when using redirect
Response.Expires = 0   ' always load the page, dont store
%>
<!--#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="_action_buttons.asp"-->
<!--#include file="common/_package_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_login_optional.asp"-->
<!--#include file="_access_control_general.asp"-->
<%
'------------ Variable Definition -------------
Dim pageIsEditable
Dim sectionIsEditable
Dim criticalSectionIsEditable
Dim showPrevVerLinks : showPrevVerLinks = TRUE 
'------------ Constants Declaration -----------
'------------ Variable Init -------------------
'----------------------------------------------
'-----------------------------------------------------------------------------------------------------------------
Sub fillCommentsWithDifferences ( parPv_id )
   DIM outputString
   DIM rsTemp

   If pkgInfoHash.Item("comments") = "" or isnull(pkgInfoHash.Item("comments")) Then

      OraDatabase.Parameters.Add "PV_ID", parPv_id,    ORAPARM_INPUT, ORATYPE_NUMBER

      If (pkgInfoHash.Item ("last_pv_id") = "") OR IsNull(pkgInfoHash.Item ("last_pv_id")) Then
         OraDatabase.Parameters.Add "OLD_PV_ID",    0,    ORAPARM_INPUT, ORATYPE_NUMBER
      Else
         OraDatabase.Parameters.Add "OLD_PV_ID",    pkgInfoHash.Item ("last_pv_id"),    ORAPARM_INPUT, ORATYPE_NUMBER
      End If

      Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery ( "diff_dependencies.sql" ), cint(0))
      Dim style, icon

      While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))

         Select Case CInt(rsTemp("status"))
         Case enumDB_NUM_DIFF_UPDATED
            outputString = outputString & "[UPDATED] " & rsTemp("pkg_name") &" to "& rsTemp("pkg_version") &" ("& rsTemp("previous_version") &")"& VBNewLine

            Case enumDB_NUM_DIFF_NEW
            outputString = outputString & "[NEW] " & rsTemp("pkg_name") &" "& rsTemp("pkg_version") & VBNewLine

         Case enumDB_NUM_DIFF_REMOVED
            outputString = outputString & "[REMOVED] " & rsTemp("pkg_name") &" "& rsTemp("pkg_version") & VBNewLine

         End Select

            rsTemp.MoveNext
      WEnd

      ' An error occured when outputString was longer than 4000 bytes, so this truncates it and adds "..."
      If LenB(outputString) > 4000 Then
         outputString = Left(outputString, 3995)
         outputString = Left(outputString, InStrRev(outputString, vbNewLine)) & vbNewLine & "..."
      End If

      objEH.TryORA ( OraSession )
      On Error Resume Next

      OraDatabase.ExecuteSQL _
      " UPDATE PACKAGE_VERSIONS"&_
      " SET COMMENTS = '"& outputString &"'"&_
      " WHERE PV_ID = :PV_ID "

      objEH.CatchORA ( OraSession )

      pkgInfoHash.Item("comments") = outputString

      rsTemp.Close
      Set rsTemp = nothing

      OraDatabase.Parameters.Remove "PV_ID"
      OraDatabase.Parameters.Remove "OLD_PV_ID"
   End If
End Sub
'-----------------------------------------------------------------------------------------------------------------


'------------------ MAIN LINE --------------------
pageIsEditable = Is_Page_Editable ( pkgInfoHash.Item ("dlocked") )
sectionIsEditable = Is_Section_Editable ()
criticalSectionIsEditable = Is_Critical_Section_Editable ( pkgInfoHash.Item ("dlocked") )
'-------------------------------------------------


If (Request("resetNotes") = "1") AND (parPv_id <> "") Then
   objEH.TryORA ( OraSession )
   On Error Resume Next
   OraDatabase.ExecuteSQL " UPDATE package_versions "&_
                          " SET release_notes_info = '"& enum_RELEASE_NOTES_NOT_FOUND_IN_ARCHIVE &"'"&_
                          " ,modified_stamp = systimestamp" &_
                          " ,modifier_id = " & objAccessControl.UserId &_
                          " WHERE pv_id = "& parPv_id
   objEH.CatchORA ( OraSession )

   ' Really need to log an action too

   ' Really I just want to get rid of the resetNotes bit.
   Call Destroy_All_Objects
   Response.Redirect ("fixed_issues.asp?pv_id="&parPv_id&"&rtag_id="&parRtag_id)
End If

%>
<html>
<title><%=Title(Request("rtag_id"))%></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" src="scripts/remote_scripting.js?ver=<%=VixVerNum%>"></script>
<!--#include file="_jquery_includes.asp"-->
<!-- TIPS -->
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
<!-- DROPDOWN MENUS -->
<!--#include file="_menu_def.asp"-->
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
<script type="application/javascript" src="jquery/iframeResizer.min.js?ver=<%=VixVerNum%>"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
<!-- HEADER -->
<!--#include file="_header.asp"-->
<!-- BODY ---->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
      <td class='bg_bage'>
      <!-- LEFT -->
      <!--#include file="_environment.asp"-->
      </td>
      <td width="1" bgcolor="#999999"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
      <td valign="top" width="100%">
      <!-- MIDDLE -->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width='1%' class='bg_dialog'><IMG height=35 src="images/spacer.gif" width=15></td>
          <td width='100%' class='bg_dialog'><%Call RenderActionBar(parRtag_id,parPv_id)%></td>
          <td width='1%' class='bg_dialog'><IMG height=1 src="images/spacer.gif" width=15></td>
        </tr>
        <tr>
          <td background="images/bg_lght_gray.gif"><IMG height="45" src="images/spacer.gif" width=1></td>
          <td background="images/bg_lght_gray.gif"><%Call RenderStatus(parRtag_id,parPv_id)%></td>
          <td background="images/bg_lght_gray.gif">&nbsp;</td>
        </tr>
        <tr>
          <td background="images/bg_lght_gray.gif">&nbsp;</td>
          <td valign="bottom" background="images/bg_lght_gray.gif">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><IMG height="1" src="images/spacer.gif" width="0" alt="tab-left-margin" ></td>
                <td>
              <!-- TABS ------------------------------------->
              <%Call Generate_Tab_Menu ( TABarray1, "Release Notes", "orange" )%>
              </td>
              </tr>
            </table>
          </td>
          <td background="images/bg_lght_gray.gif">&nbsp;</td>
        </tr>
        <tr class='bg_panel' style="height:35px;">
          <td></td>
          <td>
          <!-- TAB ACTION BUTTONS ------------------------------------->
          <%Call Action_Buttons ( "Release Notes" )%>
          </td>
          <td></td>
        </tr>
        <tr>
          <td></td>
          <td valign="top">
         <!-- DETAILS ------------------------------------------------->
         <br>
         <%
         If (pkgInfoHash.Item ("dlocked") = "Y") Then
            If (InStr(pkgInfoHash.Item ("release_notes_info"),"MSG:") > 0) Then
               Select Case CStr( pkgInfoHash.Item ("release_notes_info") )
               Case enum_RELEASE_NOTES_GENERATING
                  Call DisplayInfo ( "GENERATING_RELEASE_NOTES", "400" )
               Case enum_RELEASE_NOTES_NOT_FOUND_IN_ARCHIVE
                  Call DisplayInfo ( "NOT_FOUND_IN_PKG_ARCHIVE_RELEASE_NOTES", "400" )
               Case enum_RELEASE_NOTES_FAILED
                  Call DisplayInfo ( "FAILED_GENERATING_RELEASE_NOTES", "400" )
               Case enum_RELEASE_NOTES_NO_PREVIOUS_VERSION
                  Call DisplayInfo ( "NO_PREVIOUS_VERSION_RELEASE_NOTES", "400" )
               Case enum_RELEASE_NOTES_PLACEHOLDER_PACKAGE
                  Call DisplayInfo ( "RELEASE_NOTES_PLACEHOLDER_PACKAGE", "400" )
               End Select
            End If
         Else
            Call fillCommentsWithDifferences ( parPv_id )
         End If
         %>
         <!--#include file="_release_notes.asp"-->
         <!-- END DETAILS ------------------------------------------------->
         </td>
          <td>&nbsp;</td>
        </tr>
      </table>
      <!-- END MIDDLE -------->
      </td>
   </tr>
</table>
<!-- FOOTER -->
<!--#include file="_footer.asp"-->
</body>
</html>