Subversion Repositories DevTools

Rev

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

<%
'=====================================================
'|                                                   |
'|                 RELEASE NOTES                     |
'|                                                   |
'=====================================================
%>
<%
'------------ Variable Definition -------------
Dim rsCQ
Dim rsDepIss
Dim SQLstr
Dim fixedIssDict
Dim notesIssDict
Dim issArr()
Dim depIssDict
Dim sDocTitle
Dim rsQry, rsTemp
Dim iss_db_id, G1_template, G1_style, currG1
Dim retVal
Dim baseURL
Dim rsProjId
Dim rsPkgMetrics
Dim rsCodeReviewURL
Dim vcsInfoCollector
'------------ Constants Declaration -----------
Const enumLoc_iss_db = 0
Const enumLoc_iss_id = 1
Const enumLoc_iss_num = 2
Const enumLoc_summary = 3
Const enumLoc_status = 4
Const enumLoc_priority = 5
Const enumLoc_issue_type = 6
'------------ Variable Init -------------------
Set rsCQ = Server.CreateObject("ADODB.Recordset")
Set fixedIssDict = CreateObject("Scripting.Dictionary")
Set notesIssDict = CreateObject("Scripting.Dictionary")
Set depIssDict = CreateObject("Scripting.Dictionary")
Set vcsInfoCollector = CreateObject("Scripting.Dictionary")
'----------------------------------------------
%>
<%
'----------------------------------------------------------------------------------------------------------------------------------------
Function asDepIss ( SSiss_db_id, SScolumn )
   If NOT depIssDict.Exists (SSiss_db_id) Then Exit Function

   asDepIss = issArr ( SScolumn, CInt( depIssDict.Item (SSiss_db_id) ) )
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function FixedIssues ( parPv_id )
   Dim sqlstr, rsTemp
   sqlstr = "SELECT pv_id FROM cq_issues WHERE pv_id = "& parPv_id &" AND iss_state = "& enumISSUES_STATE_FIXED
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))

   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
      FixedIssues = TRUE
   Else
      FixedIssues = FALSE
   End If

   rsTemp.Close()
   Set rsTemp = nothing
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function SQL_Package_Information ( nPv_id )
   SQL_Package_Information = _
   " SELECT *"&_
   "   FROM PACKAGE_VERSIONS pv"&_
   "  WHERE pv.pv_id = "& nPv_id
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function SQL_Dependency_Issues ( NNpv_id )
   SQL_Dependency_Issues = _
   " SELECT pkg.pkg_name, pv.pkg_version, pv.pv_id, cqi.iss_db, cqi.iss_id, cqi.iss_state, pv.comments AS reasons"&_
   "     FROM cq_issues cqi,"&_
   "          package_dependencies dep,"&_
   "          packages pkg,"&_
   "          package_versions pv"&_
   "    WHERE dep.pv_id = "& NNpv_id &_
   "      AND dep.dpv_id = cqi.pv_id(+)"&_
   "      AND dep.dpv_id = pv.pv_id(+)"&_
   "      AND pv.pkg_id = pkg.pkg_id"&_
   "   ORDER BY UPPER(pkg.pkg_name) ASC, cqi.iss_state DESC"
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function SQL_Additional_Notes ( nPv_id )
   SQL_Additional_Notes = ReadFile( rootPath & "queries\additional_notes.sql" )
   SQL_Additional_Notes = Replace( SQL_Additional_Notes, ":PV_ID", nPv_id )
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function SQL_Unit_Tests ( nPv_id )
   SQL_Unit_Tests = ReadFile( rootPath & "queries\unit_tests.sql" )
   SQL_Unit_Tests = Replace( SQL_Unit_Tests, ":PV_ID", nPv_id )
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
' Function returns the number of imported clearquest issues
' and builds a string suitable for querying the clearquest issues database
Function Get_Package_Issues ( NNpv_id, SSsql, DDfixedIss, DDnotesIssDict, nIssState )
   Dim rsTemp, sqlstr, DEVIiss, retVal

   If IsObject(DDfixedIss) Then
      ' Find this package issues
      sqlstr = "SELECT iss_db, iss_id, iss_state, notes FROM CQ_ISSUES WHERE pv_id="& NNpv_id &"  AND iss_state = "& nIssState
   Else
      ' Find dependency issues
      sqlstr = "SELECT iss_db, iss_id, iss_state, notes FROM CQ_ISSUES WHERE  pv_id IN ( "&_
               " SELECT dpv_id FROM package_dependencies WHERE pv_id = "& NNpv_id &_
               " )"
   End If

   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
   retVal = rsTemp.RecordCount

   DEVIiss  = "-1"

   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
      If CInt(rsTemp("iss_db")) = CInt(enumCLEARQUEST_DEVI_ID) Then
         DEVIiss = DEVIiss &","& rsTemp("iss_id")
      End If

      If IsObject(DDfixedIss) Then
         ' Store only Fixed Issues
         If CInt(rsTemp("iss_state")) = CInt(enumISSUES_STATE_FIXED) AND _
           DDfixedIss.Exists(Cstr(rsTemp("iss_db") &"."& rsTemp("iss_id"))) = false Then DDfixedIss.Add Cstr(rsTemp("iss_db") &"."& rsTemp("iss_id")), ""
      End If

      If IsObject(DDnotesIssDict) Then
         ' Store Notes
         If Not IsNull(rsTemp("notes")) AND (rsTemp("notes") <> "") AND _
           DDnotesIssDict.Exists(Cstr(rsTemp("iss_db") &"."& rsTemp("iss_id"))) = false Then DDnotesIssDict.Add Cstr(rsTemp("iss_db") &"."& rsTemp("iss_id")), Cstr(rsTemp("notes"))
      End If

      rsTemp.MoveNext
   WEnd

   ' Construct SQL statement for CQ database
   SSsql = ReadFile( rootPath & "queries\cq_issues.sql" )
   SSsql = Replace( SSsql, "/*enumCLEARQUEST_DEVI_ID*/", enumCLEARQUEST_DEVI_ID)
   SSsql = Replace( SSsql, "/*DEVIiss*/", DEVIiss)

   rsTemp.Close()
   Set rsTemp = nothing

   Get_Package_Issues = retVal

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
' Function returns the number of imported jira issues
' and builds a string suitable for querying the jira issues database
Function Get_JIRA_Package_Issues ( NNpv_id, SSsql, DDfixedIss, DDnotesIssDict, nIssState )
   Dim rsTemp, sqlstr, JIRAIss, retVal

   JIRAIss = "'-1'"
   sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id

   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
   retVal = rsTemp.RecordCount

   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
      JIRAIss = JIRAIss &",'"& rsTemp("iss_key")&"'"
      rsTemp.MoveNext
   WEnd

   SSsql = "SELECT I.pkey AS iss_num, I.summary, ISS.pname AS state,  IT.pname as IssueType, PR.pname as Priority, I.RESOLUTION "&_
           " FROM jiraissue I, issuestatus ISS, issuetype IT, priority PR "&_
           " WHERE I.pkey IN ("& JIRAIss &") "&_
           " AND I.issuestatus = ISS.ID "&_
           " AND IT.ID = I.issuetype "&_
           " AND PR.ID = I.PRIORITY "

   rsTemp.Close()
   Set rsTemp = nothing

   Get_JIRA_Package_Issues = retVal

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Sub LastPvId (PvId)
   Dim sqlstr

   sqlstr = "SELECT pv_id, pkg_version, comments, last_pv_id FROM PACKAGE_VERSIONS WHERE PV_ID= "& PvId

   Set rsQry = OraDatabase.DbCreateDynaset( sqlstr, cint(0) )

End Sub
'----------------------------------------------------------------------------------------------------------------------------------------
Function  Get_JIRA_Issues ( SSsql, OOrsCQ )
   If OOrsCQ.State = 1 Then
      OOrsCQ.Close()
   End If



   On Error Resume Next
   OOrsCQ.ActiveConnection = JIRA_conn
   OOrsCQ.Source = SSsql
   OOrsCQ.CursorType = 0
   OOrsCQ.CursorLocation = 3
   OOrsCQ.LockType = 3
   OOrsCQ.Open()


   Get_JIRA_Issues = Err.Number

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function  Get_CQ_Issues ( SSsql, OOrsCQ )
   If OOrsCQ.State = 1 Then
      OOrsCQ.Close()
   End If

   On Error Resume Next
   OOrsCQ.ActiveConnection = CQ_conn
   OOrsCQ.Source = SSsql
   OOrsCQ.CursorType = 0
   OOrsCQ.CursorLocation = 2
   OOrsCQ.LockType = 3
   OOrsCQ.Open()

   Get_CQ_Issues = Err.Number

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function Get_Dependency_CQ_Issues ( SSsql, OOrsCQ, DDdepIss, AAiss )
   Dim recCnt
   If OOrsCQ.State = 1 Then
      OOrsCQ.Close()
   End If

   OOrsCQ.ActiveConnection = CQ_conn
   OOrsCQ.Source = SSsql
   OOrsCQ.CursorType = 0
   OOrsCQ.CursorLocation = 2
   OOrsCQ.LockType = 3

   On Error Resume Next
   OOrsCQ.Open()

   ' Exit with error if error occurs
   Get_Dependency_CQ_Issues = Err.Number
   If Err.Number <> 0 Then Exit Function


   recCnt = 1

   While ((NOT OOrsCQ.BOF) AND (NOT OOrsCQ.EOF))
      ReDim Preserve AAiss( 6, recCnt )
      'If NOT DDdepIss.Exists Cstr(rsTemp("iss_db") &"."& rsTemp("iss_id")) Then
         DDdepIss.Add Cstr(OOrsCQ("iss_db") &"."& OOrsCQ("iss_id")), Cstr(recCnt)
      'End If
      AAiss( enumLoc_iss_db, recCnt )    = OOrsCQ("iss_db")
      AAiss( enumLoc_iss_id, recCnt )    = OOrsCQ("iss_id")
      AAiss( enumLoc_iss_num, recCnt )   = OOrsCQ("iss_num")
      AAiss( enumLoc_summary, recCnt )   = OOrsCQ("summary")
      AAiss( enumLoc_status, recCnt )    = OOrsCQ("status")
      AAiss( enumLoc_priority, recCnt )    = OOrsCQ("priority")
      AAiss( enumLoc_issue_type, recCnt ) = OOrsCQ("issue_type")

      recCnt = recCnt + 1
      OOrsCQ.MoveNext
   WEnd

   OOrsCQ.Close()
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function FormatPath ( SSpath )

   If (SSpath = "") Then
      FormatPath = ""
      Exit Function
   End If

   If (InStr(1, LCase(SSpath), "http") = 1) OR (InStr(1, LCase(SSpath), "www") = 1) Then
      ' Source path is URL
      FormatPath = "<a href='"& SSpath &"' class='txt_linked'>"& SSpath &"</a>"
   Else
      FormatPath = SSpath
   End If

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Sub Group_By ( rsG, styleG, currG )
   If rsG = currG Then Exit Sub
   Response.write styleG
   'currG = rsG
End Sub
'----------------------------------------------------------------------------------------------------------------------------------------
Sub CheckUnitTestsState ( nPv_id, outMSG, outMSG_ID, outNote, outTestsFound )
   Dim sqlstr, rsTemp
   sqlstr = ReadFile( rootPath & "queries\unit_test_entries_check.sql" )
   sqlstr = Replace( sqlstr, ":PV_ID", nPv_id)
   sqlstr = Replace( sqlstr, ":enumTEST_TYPE_NOT_DONE", enumTEST_TYPE_NOT_DONE)

   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))

   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
      outMSG = rsTemp("msg")
      outMSG_ID = CInt(rsTemp("msg_id"))
      outNote = rsTemp("test_summary")
      outTestsFound = FALSE

      If IsNull(rsTemp("msg")) Then outTestsFound = TRUE
   End If

   rsTemp.Close()
   Set rsTemp = nothing
End Sub
'----------------------------------------------------------------------------------------------------------------------------------------
Function FormatAccepted ( sAccepted, nTest_id )
   Dim tempSTR
   If IsNull(nTest_id) Then Exit Function

   tempSTR = ""

   If pageIsEditable Then
      tempSTR = "<select name='acc"& nTest_id &"' class='form_item'>"
   Else
      tempSTR = "<select name='acc"& nTest_id &"' class='form_item' disabled>"
   End If

   If sAccepted = enumUNIT_TEST_ACCEPTED Then
      tempSTR = tempSTR  &"<option></option>"&_
                     "<option value='"& enumUNIT_TEST_ACCEPTED &"' SELECTED>Yes</option>"&_
                     "<option value='"& enumUNIT_TEST_NOTACCEPTED &"'>No</option>"

   ElseIf sAccepted = enumUNIT_TEST_NOTACCEPTED Then
      tempSTR = tempSTR  &"<option></option>"&_
                     "<option value='"& enumUNIT_TEST_ACCEPTED &"'>Yes</option>"&_
                     "<option value='"& enumUNIT_TEST_NOTACCEPTED &"' SELECTED>No</option>"

   Else
      tempSTR = tempSTR  &"<option SELECTED></option>"&_
                     "<option value='"& enumUNIT_TEST_ACCEPTED &"'>Yes</option>"&_
                     "<option value='"& enumUNIT_TEST_NOTACCEPTED &"'>No</option>"

   End If

   tempSTR = tempSTR & "</select>"

   FormatAccepted = tempSTR

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function SQL_CodeReview ( nPv_id )
   SQL_CodeReview = _
   "   SELECT cr.date_of_review, cr.time_spent, cr.review_reason, cr.rteam_domain_expert,"&_
   "          cr.rteam_language_expert, cr.rteam_peer_developer, cr.rteam_author,"&_
   "          cr.files_reviewed, cr.review_results, cr.issues_raised,"&_
   "          cr.review_comments, cr.fnc_s_meets_functionality,"&_
   "          cr.fnc_c_meets_functionality"&_
   "     FROM code_reviews cr"&_
   "    WHERE cr.pv_id = "& nPv_id
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function SQL_Build_Env ( nPv_id )
   SQL_Build_Env = _
   " SELECT pv.*, bm.BM_ID,"&_
   "         bm.BM_NAME,"&_
   "         pkgbinfo.BSA_ID"&_
   "     FROM PACKAGE_BUILD_INFO pkgbinfo,"&_
   "           BUILD_MACHINES bm,"&_
   "           PACKAGE_VERSIONS pv"&_
   "    WHERE pkgbinfo.BM_ID = bm.BM_ID"&_
   "    AND pv.PV_ID = pkgbinfo.PV_ID"&_
   "      AND pkgbinfo.PV_ID = "& nPv_id  &_
   "   ORDER BY UPPER(bm.BM_NAME) "
End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function DecodeOverallResult ( ByVal cCheck )
   If cCheck = "" OR IsNull(cCheck) Then cCheck = 0

   Select Case CInt( cCheck )
      Case enumCODE_REVIEW_ACCEPTED
         DecodeOverallResult = "Accepted"
      Case enumCODE_REVIEW_MINOR_UPDATES
         DecodeOverallResult = "Minor updates required"
      Case enumCODE_REVIEW_MAJOR_REWORK
         DecodeOverallResult = "Major rework required"
      Case Else
         DecodeOverallResult = ""
   End Select

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Function GetBuildType ( nBuildType )

   If (NOT IsNull(nBuildType)) OR (NOT nBuildType = "") Then

      If ( CInt(nBuildType) = enumDB_BUILD_TYPE_NONE ) Then
         GetBuildType = "Build type not specified!"
      Else
         GetBuildType = GetBuildTypeString( nBuildType )
      End If

   Else
      GetBuildType = GetBuildTypeString( nBuildType )

   End If

   '' Wrap around brackets
   GetBuildType = "("& GetBuildType &")"

End Function
'----------------------------------------------------------------------------------------------------------------------------------------
Sub GetPackageMetrics (NNpv_id, rsTemp)

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

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

   OraDatabase.Parameters.Remove "PV_ID"

End Sub
'----------------------------------------------------------------------------------------------------------------------------------------
Sub GetCodeReviewURLs (NNpv_id, rsTemp)

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

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

   OraDatabase.Parameters.Remove "PV_ID"

End Sub


'---------------------------------------------------------------
Sub Query_Config_Spec (NNRtag_id, NNPv_id)
   OraDatabase.Parameters.Add "RTAG_ID", NNRtag_id,   ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "PV_ID", NNPv_id,   ORAPARM_INPUT, ORATYPE_NUMBER
   If NNRtag_id <> "" Then
      If pkgInfoHash.Item ("dlocked") <> "Y" Then
         Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec.sql"), cint(0))
      Else
         Set rsQry = OraDatabase.DbCreateDynaset( Replace(GetQuery("config_spec.sql"), "PV.LAST_PV_ID", "PV.PV_ID"), cint(0))
      End If
   Else
      If pkgInfoHash.Item ("dlocked") <> "Y" Then
         Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("config_spec_nortag.sql"), cint(0))
      Else
         Set rsQry = OraDatabase.DbCreateDynaset( Replace(GetQuery("config_spec_nortag.sql"), "PV.LAST_PV_ID", "PV.PV_ID"), cint(0))
      End If
   End If
   OraDatabase.Parameters.Remove "RTAG_ID"
   OraDatabase.Parameters.Remove "PV_ID"
End Sub

'---------------------------------------------------------------
' Returns the jats extraction commands
Sub Jats_Extract_Command (ByRef sjats_cmds(), ByRef ajats_cmd_test, ByRef sjats_cmds_qh, ByRef sjats_extractable)
   Dim dlocked: dlocked = pkgInfoHash.Item("dlocked")
   Dim pkg_vcs_tag: pkg_vcs_tag = Get_Pkg_Vcs_Tag(Request("pv_id"))
   Dim ii: ii = -1
   Dim baseCmd
   sjats_extractable = false

   ' if not released then use last package version vcs tag and branch else use current vcs tag
   If dlocked <> "Y" Then
     ' not released, so get last package version id

     Dim last_version_valid: last_version_valid = NOT IsNull(pkgInfoHash.Item ("previous_version"))
     Dim last_pv_id: last_pv_id = pkgInfoHash.Item("last_pv_id")
     Dim last_pkg_vcs_tag: last_pkg_vcs_tag = Get_Pkg_Vcs_Tag(last_pv_id)
     Dim VcsType

     If (last_version_valid AND last_pkg_vcs_tag <> "") Then
        VcsType = Mid(last_pkg_vcs_tag, 1, InStr(1, last_pkg_vcs_tag, "::") - 1 )
        sjats_cmds_qh = VcsType
        baseCmd =  "jats vcsrelease -extract -label """ & last_pkg_vcs_tag & """"
        ii = ii+1 : sjats_cmds(ii) = baseCmd

         ' ClearCase extraction may get a project specific branch appended
         ' This will be used to automatically branch the files in the package
         '
         If (VcsType = "CC") Then
             sjats_extractable = true
             Call Query_Config_Spec (Request("rtag_id"), last_pv_id)
             Dim config_branch: config_branch = rsQry("config_spec_branch")
             If NOT IsNull(config_branch) AND (config_branch <> "") Then
                 ii = ii+1 : sjats_cmds(ii) = baseCmd & " -branch " & config_branch
             End If
         End If

         If (VcsType = "SVN") Then
            sjats_extractable = true
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tag"
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Tip"
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Work"
            ii = ii+1 : sjats_cmds(ii) = baseCmd & " -devMode=Exact"
         End If
     Else
         ii = ii+1 : sjats_cmds(ii) = "No Previous version to extract"
     End If

     baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
     ii = ii+1 : sjats_cmds(ii) = baseCmd
     
   Else
    ' released
    sjats_cmds_qh = vcsInfoCollector.Item("vcs_tag")

    if ( sjats_cmds_qh = "CC" OR sjats_cmds_qh = "SVN" ) Then
        sjats_extractable = true
        baseCmd =  "jats vcsrelease -extract -label """ & pkg_vcs_tag & """"
        ii = ii+1 : sjats_cmds(ii) = baseCmd
    Else
        baseCmd =  "Cannot be extracted with JATS"
        ii = ii+1 : sjats_cmds(ii) = baseCmd
    End If

   End If

   ' Test Command
   if sjats_extractable Then
        ajats_cmd_test = "jats vcsrelease -test -label """ & pkg_vcs_tag & """"
   Else
        ajats_cmd_test = "Cannot be extracted with JATS"
   End If

   ReDim Preserve sjats_cmds(ii)
   rsQry.Close()
   Set rsQry = nothing

End Sub

'---------------------------------------------------------------
' Returns the VCS tag for the specified package version
' Note: ORAPARM_OUTPUT default size is 127 bytes. This is too short for some
'
Function Get_Pkg_Vcs_Tag(apv_id)
   OraDatabase.Parameters.Add "PV_ID", apv_id, ORAPARM_INPUT, ORATYPE_NUMBER
   OraDatabase.Parameters.Add "RETURN_CODE","xxxx", ORAPARM_OUTPUT, ORATYPE_VARCHAR2
   OraDatabase.Parameters("RETURN_CODE").MinimumSize = 200
   On Error Resume Next
        OraDatabase.ExecuteSQL ("BEGIN   :RETURN_CODE := PK_RMAPI.RETURN_VCS_TAG( :PV_ID );   END;")
        Get_Pkg_Vcs_Tag = OraDatabase.Parameters("RETURN_CODE").Value
   On Error Goto 0
   OraDatabase.Parameters.Remove "PV_ID"
   OraDatabase.Parameters.Remove "RETURN_CODE"
End Function

'----------------------------------------------------------------------------------------------------------------------------------------


'----------------------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------------ MAIN LINE --------------------
'-------------------------------------------------
%>
<!-- PACKAGE INFORMATION --------------------------------------------------------------------------------------------------------------->
   <fieldset class="fset"><legend class="body_colb"><img src='images/s_info.gif' width='21' height='24' hspace='4' border='0' align='absmiddle'>Package Information</legend>
   <a name="PACKAGE_INFORMATION"></a>
   <table width="100%" border="0" cellspacing="1" cellpadding="2">
      <tr>
         <td align="right" valign="bottom">
            <%If pageIsEditable Then%>
               <a href='javascript:;' onClick="MM_openBrWindow('_wform_pkg_info.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','PackageInfo','resizable=yes,width=650,height=690')" class="txt_linked">Edit<img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
            <%End If%>
         </td>
      </tr>
   </table>
   <table width="100%" border="0" cellspacing="1" cellpadding="2">
      <%
      Set rsQry = OraDatabase.DbCreateDynaset( SQL_Package_Information ( parPv_id ), cint(0))
      
      Call get_vcs_info_for_package( rsQry("pkg_label"), rsQry("build_type"), rsQry("vcs_type_id"), rsQry("dlocked"), vcsInfoCollector )
      
      %>

      <%
        ' State
        Dim sstate
        Dim bcan_unlock
        Dim stitle
        Dim bis_patch
        Dim slockonclick: slockonclick=""

        bis_patch = not IsNull(pkgInfoHash.Item ("is_patch")) 
        If bis_patch Then
          ' the user can unlock a patch if they have permission
          ' packages can be unlocked by the btnUnlockRelease button
          bcan_unlock = objAccessControl.IsDataActive ("PROJECTS", DB_PROJ_ID, "EditProjects") AND objAccessControl.IsActive("UnlockPatch")
        Else
          bcan_unlock = objAccessControl.IsActive("EditCriticalInfoForLockedPackage")
        End If

        Select Case pkgInfoHash.Item ("dlocked")
            Case "Y"  sstate = "Released"
            Case "N"  sstate = "Not Released"
            Case "P"  sstate = "Not Released. Pending approval"
            Case "A"  sstate = "Not Released. Aproved for build"
            Case "R"  sstate = "Not Released. Rejected"
            Case Else sstate = "Not Released. Invalid State"
        End Select
            
        If bcan_unlock  Then
          If (pkgInfoHash.Item ("dlocked") = "Y") Then
            ' Unlock patch.
            stitle="Unlock the patch"
            shref="_s_unlock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
          ElseIf (pkgInfoHash.Item ("dlocked") = "N") Then
            ' lock patch.
            stitle="Lock the patch. Release requirements are not applied."
            shref="_s_lock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
          Else
            ' unlock patch.
            stitle="Unlock the patch"
            shref="_s_unlock_package.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id
            bcan_unlock = FALSE
          End If
        End if

      %>

      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top">
         <% If bcan_unlock Then
              If (slockonclick = "") Then%>
                <a class='body_txt' title='<%=stitle%>' href='<%=shref%>' > <strong>Status:</strong><img src='images/i_edit.gif' width='12' height='12' border='0' ></a>
         <%   Else %>
                <a href='<%=shref%>' onClick='<%=slockonclick%>' class='body_txt' title='<%=stitle%>'> <strong>Status:</strong> <img src='images/i_edit.gif' width='12' height='12' border='0' ></a>
         <%   End If %>
         <% Else %>
              <b><strong>Status:</strong></b>
         <% End If %>
         </td>
         <td bgcolor=#f5f5f5 class="sublbox_txt"><%=sstate%></td>
      </tr>

      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Deployable:</b></td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">
            <%If IsNull( rsQry("is_deployable") ) Then%>No<%Else%>Yes<%End If%>
         </td>
      </tr>

      <tr>
         <td width="1%" nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Short Description:</b></td>
         <td witdh="100%" bgcolor=#f5f5f5 class="sublbox_txt">
            <%If IsNull( rsQry("pv_description") ) Then%>
               <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pv_description") ) )%>
            <%End If%>
         </td>
      </tr>
      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Package Overview:</b> </td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">
            <%If IsNull( rsQry("pv_overview") ) Then%>
               <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pv_overview") ) )%>
            <%End If%>
         </td>
      </tr>

      <%
        Dim shref
        Dim smail
        Dim sonclick

        ' Owner:
        sonclick="MM_openBrWindow('_wform_change_owner.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id &"','ChangeOwner','resizable=yes,width=400,height=200')"
        smail = pkgInfoHash.Item ("owner_email")
        shref = "mailto:"& smail
      %>
      
      <tr>
        <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top">
          <%If objAccessControl.UserLogedIn() Then%>
            <a href='javascript:;' onClick=<%=sonclick%> class='body_txt'>
            <strong>Owner:</strong><img src='images/i_edit.gif' width='12' height='12' border='0' alt='Change owner'>
            </a>&nbsp;
          <%Else%>
            <strong>Owner:</strong><img src='images/i_edit_disable.gif' width='12' height='12' border='0' alt='Change owner'>
          <%End If%>
        </td>         
        <td bgcolor=#f5f5f5 class="sublbox_txt">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table1">
            <tr class="sublbox_txt">
              <td><%=pkgInfoHash.Item ("owner")%></td>         
              <td><a href=<%=shref%> class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align=right alt=<%=smail%>></a></td>         
            </tr>  
          </table>
        </td>
      </tr>
      
      <%
        ' Created:
        smail = pkgInfoHash.Item ("creator_email")
        shref = "mailto:"& smail
      %>
      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Created:</b></td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">            
           <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table3">
             <tr class="sublbox_txt">
               <td><%=EuroDate(pkgInfoHash.Item ("created_stamp"))&" by "& pkgInfoHash.Item ("creator")%></td>         
               <td><a href=<%=shref%> class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align=right alt=<%=smail%>></a></td>
             </tr>  
           </table>
         </td>
      </tr>

      <%
        ' Last Modified:
        smail = pkgInfoHash.Item ("modifier_email")
        shref = "mailto:"& smail
      %>
      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Last Modified:</b></td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">
           <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table4">
             <tr class="sublbox_txt">
               <td><%=EuroDateTime(pkgInfoHash.Item ("modified_stamp")) &" by "& pkgInfoHash.Item ("modifier")%></td>
               <td><a href=<%=shref%> class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align=right alt=<%=smail%>></a></td>
             </tr>  
           </table>
         </td>
      </tr>

      <%
        ' Added to Release
        smail = pkgInfoHash.Item ("insertor_email")
        shref = "mailto:"& smail
        If IsNull(pkgInfoHash.Item ("is_patch"))  AND  (Request("rtag_id") <> "") AND (pkgInfoHash.Item ("insertor") <> "") Then
      %>
      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Added to Release:</b></td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">
           <table width="100%" border="0" cellspacing="0" cellpadding="0" ID="Table2">
             <tr class="sublbox_txt">
               <td><%=EuroDate(pkgInfoHash.Item ("insert_stamp")) &" by "& pkgInfoHash.Item ("insertor")%></td>
               <td><a href=<%=shref%> class='txt_linked'><img src='images/bt_send_email.gif' width='36' height='13' hspace='3' border='0' align=right alt=<%=smail%>></a></td>         
             </tr>  
           </table>
         </td>
      </tr>
      <%End If%>
      
      <%If (vcsInfoCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG) OR (vcsInfoCollector.Item("vcs_tag") = enum_VCS_CVS_TAG) Then%>
         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
            </td>
         </tr>

         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Source Path:</b> </td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%If IsNull( rsQry("src_path") ) Then%>
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("src_path") ) )%>
               <%End If%>
            </td>
         </tr>

         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Label:</b></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%If IsNull( rsQry("pkg_label") ) Then%>
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pkg_label") ) )%>
               <%End If%>
            </td>
         </tr>
      <%ElseIf vcsInfoCollector.Item("vcs_tag") = enum_VCS_SUBVERSION_TAG Then%>
         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
            </td>
         </tr>

         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Source Path:</b> </td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%If IsNull( rsQry("src_path") ) Then%>
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("src_path") ) )%>
               <%End If%>
            </td>
         </tr>

         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Tag:</b></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%If IsNull( rsQry("pkg_label") ) Then%>
                  <span class='err_alert'>Required!</span><%Else%><%=NewLine_To_BR ( To_HTML( rsQry("pkg_label") ) )%>
               <%End If%>
            </td>
         </tr>

      <%ElseIf vcsInfoCollector.Item("vcs_tag") = enum_VCS_UNCONTROLLED_TAG Then%>
         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%=NewLine_To_BR ( To_HTML( vcsInfoCollector.Item("vcs_name") ) )%>
            </td>
         </tr>
      <%Else%>
         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Version Control System:</b></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <span class='err_alert'>Required!</span>
            </td>
         </tr>
      <%End If%>

      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Base View:</b></td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">
            <%=Get_Pkg_Base_View ( parPv_id, parRtag_id )%>
         </td>
      </tr>

      <tr>
         <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top">
            <b>Build Standard:</b>
         </td>
         <%
         If pkgInfoHash.Item ("bs_id") <> "" Then
            If pkgInfoHash.Item ("bs_id") = "1" Then
               Response.write "<td bgcolor=#f5f5f5 class='sublbox_txt'>JATS<br></td>"

            ElseIf pkgInfoHash.Item ("bs_id") = "2" Then
               Response.write "<td bgcolor=#f5f5f5 class='sublbox_txt'>ANT<br></td>"

            ElseIf pkgInfoHash.Item ("bs_id") = "3" Then
               Response.write "<td bgcolor=#f5f5f5 class='sublbox_txt'>NONE<br></td>"
            End If
         Else
            If vcsInfoCollector.Item("vcs_tag") <> enum_VCS_UNCONTROLLED_TAG Then
               Response.write "<td bgcolor=#f5f5f5 class='sublbox_txt'><span class='err_alert'>Required!</span><br></td>"
            Else
               Response.write "<td bgcolor=#f5f5f5 class='sublbox_txt'>Unspecified<br></td>"
            End If
         End If
         %>
      </tr>
      <%If (NOT IsNull(pkgInfoHash.Item ("bs_id"))) AND (pkgInfoHash.Item ("bs_id") <> "3") Then%>
         <tr>
            <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>Build Environment:</b> </td>
            <%
            '--- Get Build Env Details
            Set rsTemp = OraDatabase.DbCreateDynaset( SQL_Build_Env ( parPv_id ), cint(0))
            %>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
               <%If rsTemp.RecordCount = 0 Then%>
                  <%If rsQry("is_build_env_required") = enumDB_NO Then%>
                     Not Required
                  <%Else%>
                     <span class='err_alert'>Required!</span>
                  <%End If%>
               <%Else%>
                  <%If (IsNull( rsQry("is_build_env_required") ) AND (rsQry("comments") <> "Rippled Build.")) Then%>
                     <span class='err_alert'>Required!</span>
                  <%ElseIf rsQry("is_build_env_required") = enumDB_NO Then%>
                     Not Required.
                  <%Else%>
                     <table width="40%"  border="0" cellspacing="0" cellpadding="1">
                        <%
                        currG1 = 0
                        While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
                           'retVal = Lookup_Document ( rsQry("doc_num"), sDocTitle, NULL, NULL, NULL  )
                        %>
                           <%If currG1 <> CInt(rsTemp("bm_id")) Then%>
                              <tr>
                                 <td colspan="2" nowrap class="sublbox_txt">
                                    <%=rsTemp("bm_name")%>&nbsp;<%=GetBuildType( rsTemp("bsa_id") )%>
                                 </td>
                              </tr>
                              <%currG1 = CInt(rsTemp("bm_id"))
                           End If
                           rsTemp.MoveNext
                        WEnd
                        %>
                        <tr>
                           <td width="5%"></td>
                           <td width="95%"></td>
                        </tr>
                     </table>
                  <%End If%>
               <%End If%>
            </td>
         </tr>
      <%End If%>

      <%
      ' Get JATS extraction commands
      Dim  sjats_cmd_test, sjats_cmds_qh, sjats_extractable
      ReDim sjats_cmds(6)
      call Jats_Extract_Command(sjats_cmds, sjats_cmd_test, sjats_cmds_qh, sjats_extractable)
      %>

      
      <%If IsNull(pkgInfoHash.Item ("is_patch")) Then%>
         <tr>
            <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
            <%
            ' Previous Version
            sonclick="MM_openBrWindow(""_wform_change_previous_version.asp?rfile="& scriptName &"&pv_id="& parPv_id &"&rtag_id="& parRtag_id &""",""ChangeOwner"",""resizable=yes,width=400,height=200"")"
            If objAccessControl.IsActive("ChangePreviousVersion") Then
            %>
               <a href='javascript:;' onClick=<%=sonclick%> class='body_txt'>
               <strong>Previous Version:</strong><img src='images/i_edit.gif' width='12' height='12' border='0' alt='Edit'>
               </a>
            <%Else%>
               <strong>Previous Version:</strong><img src='images/i_edit_disable.gif' width='12' height='12' border='0' alt='Edit'>
            <%End If%>
            </td>

            <%
              Dim sprevious_version_value
              sprevious_version_value = ""
              If IsNull(pkgInfoHash.Item ("previous_version")) Then
                sprevious_version_value = "Unknown!"
              Else
                sprevious_version_value = pkgInfoHash.Item ("previous_version")
              End If

              ' Previous pkg vcs tag
              Dim last_pv_id
              Dim rsQryPV, rsQryVT
              Set rsQryPV = OraDatabase.DbCreateDynaset( "SELECT last_pv_id from package_versions where pv_id ="&parPv_id , cint(0))
              Dim slast_vcs_tag
              last_pv_id = rsQryPV("last_pv_id")
              If (pv_id_exists(last_pv_id)) Then
                slast_vcs_tag = Get_Pkg_Vcs_Tag(last_pv_id)
              End If
              %>
                <td bgcolor=#f5f5f5 class="sublbox_txt">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr class="sublbox_txt">
                      <td width=15% colspan=2 nowrap class="sublbox_txt">
                        <%=sprevious_version_value%>
                      </td>
                      <td colspan="2" nowrap class="sublbox_txt">
                      <% If sjats_extractable Then
                        response.write( NewLine_To_BR ( To_HTML(slast_vcs_tag) ))
                      Else
                        response.write("Cannot be extracted with JATS")
                      End If
                      response.write(Quick_Help ( "PreviousVcsTag" ))
                      %>
                      </td>
                    </tr>  
                  </table>
                </td>
         </tr>
      <%End If%>
      <%
      Dim iLastSignificantPVID
      Dim old_pkg_vcs_tag
      Dim old_previous_version_value
      iLastSignificantPVID = getLastSignificantPVID(pkgInfoHash.Item("pv_id"), pkgInfoHash.Item("last_pv_id"))

      If (pv_id_exists(iLastSignificantPVID) = TRUE) Then
        Dim rsQryLPV
        Set rsQryLPV = OraDatabase.DbCreateDynaset( "SELECT pkg_version from package_versions where pv_id ="&iLastSignificantPVID , cint(0))
        old_previous_version_value = rsQryLPV("pkg_version")
        old_pkg_vcs_tag = Get_Pkg_Vcs_Tag(iLastSignificantPVID)
      %>
         <tr>
            <td width="20%" bgcolor=#e4e9ec class="sublbox_txt"><strong>Previous Significant Version:</strong></td>
            <td bgcolor=#f5f5f5 class="sublbox_txt">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr class="sublbox_txt">
                  <td width=15% colspan=2 nowrap class="sublbox_txt">
                    <%=old_previous_version_value%>
                  </td>
                  <td colspan=2 nowrap class="sublbox_txt">
                      <% If sjats_extractable Then
                        response.write( NewLine_To_BR ( To_HTML(old_pkg_vcs_tag) ))
                      Else
                        response.write("Cannot be extracted with JATS")
                      End If
                      response.write(Quick_Help ( "PreviousSignificantVcsTag" ))
                      %>
                  </td>
                </tr>
              </table>
            </td>
         </tr>
      <%End If%>

      <tr>
         <td width="20%" bgcolor=#e4e9ec class="sublbox_txt" valign="top">
           <strong>JATS extraction commands:</strong>
                <%=Quick_Help ( "JatsExtraction_" & sjats_cmds_qh )%>
         </td>
         <td>
         <table class="embedded_table">
         <% Dim ii : For ii = 0 to UBound(sjats_cmds) %>
             <tr><td bgcolor=#f5f5f5 class="sublbox_txt">
               <%=NewLine_To_BR ( To_HTML(sjats_cmds(ii)) )%>
             </td>
         <% Next %>
         </td>
         </tr>
         </table>
      </tr>
      <tr>
         <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
           <strong>JATS Test:</strong><%=Quick_Help ( "JatsTest" )%>
         </td>
         <td bgcolor=#f5f5f5 class="sublbox_txt">
           <%=NewLine_To_BR ( To_HTML(sjats_cmd_test) )%>
         </td>
      </tr>

      <%
      ' Beyond Compare difference command
      Dim prevVcsTag
      Dim curVcsTag
      Dim sBcCmd

      prevVcsTag = Get_Pkg_Vcs_Tag(iLastSignificantPVID)
      curVcsTag = Get_Pkg_Vcs_Tag(parPv_id)
      sBcCmd = ""

      If (IsNull(prevVcsTag) OR prevVcsTag = "" ) Then
            sBcCmd = "No prior label to compare against"
      ElseIf (IsNull(curVcsTag) OR curVcsTag = "" ) Then
            sBcCmd = "Current VCS tag not yet specified"
      ElseIf (not sjats_extractable) Then
            sBcCmd = "Cannot be extracted with JATS"
      Else
            sBcCmd = "jats vcsdiff -old=" & prevVcsTag & " -new=" & curVcsTag
      End If
      sBcCmd = NewLine_To_BR( To_HTML (sBcCmd) )

      ' Codestriker commands - Only for ClearCase
      Dim sCsCmd
      sCsCmd = ""

      If vcsInfoCollector.Item("vcs_tag") = enum_VCS_CLEARCASE_TAG Then
         Dim oldLabel
         Dim old_vcs_tag
         If (pv_id_exists(iLastSignificantPVID) = TRUE) Then
            old_vcs_tag = get_vcs_tag(iLastSignificantPVID)
            If (old_vcs_tag = enum_VCS_CLEARCASE_TAG) Then
               oldLabel = get_Pkg_Label(iLastSignificantPVID)
               sCsCmd = NewLine_To_BR ( To_HTML( Codestriker_Command (oldLabel, pkgInfoHash.Item("pkg_label")) ) )
           End If
         End If
      End If%>
               
      <tr>
        <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
          <strong>Codestriker command:</strong><%=Quick_Help ( "Codestriker" )%>
        </td>
        <td bgcolor=#f5f5f5 class="sublbox_txt">
          <%=sCsCmd%>
        </td>
      </tr>
      <tr>
        <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
          <strong>Beyond Compare command:</strong><%=Quick_Help ( "BeyondCompare" )%>
        </td>
        <td bgcolor=#f5f5f5 class="sublbox_txt">
          <%=sBcCmd%>
        </td>
      </tr>
              

      <%If pkgInfoHash.Item("is_deployable") = "Y" Then
         OraDatabase.Parameters.Add "PV_ID", pkgInfoHash.Item ("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
         Set rsTemp = OraDatabase.DbCreateDynaset( GetQuery("DeploymentManagerReference.sql"), cint(0))
         If rsTemp.RecordCount = 0 Then%>
            <tr>
               <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>SBOM Information:</b></td>
               <%If pkgInfoHash.Item("product_state") = 3 Then%>
                  <td bgcolor=#f5f5f5 class="err_alert"><b>Ready For Deployment!</b></td>
               <%ElseIf pkgInfoHash.Item("product_state") = 2 Then%>
                  <td bgcolor=#f5f5f5 class="err_alert"><b>Ready For Testing!</b></td>
               <%ElseIf pkgInfoHash.Item("product_state") = 1 Then%>
                  <td bgcolor=#f5f5f5 class="err_alert"><b>Ready For Integration!</b></td>
               <%ElseIf pkgInfoHash.Item("product_state") = 5 Then%>
                  <td bgcolor=#f5f5f5 class="err_alert"><b>Ready For Integration and Deployment!</b></td>
               <%ElseIf IsNull(pkgInfoHash.Item("product_state")) Then%>
                  <td bgcolor=#f5f5f5 class="err_alert"><b>Information Unavailable!</b></td>
               <%End If%>

            </tr>
         <%Else%>
            <tr>
               <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top"><b>SBOM Added/Updated:</b></td>
               <td bgcolor=#f5f5f5 class="sublbox_txt">
                  <%=rsTemp("branch_name")%> - <%=rsTemp("bom_name")%><%=VBNewLine%><%=rsTemp("version")%>
               </td>
            </tr>
         <%End If
         rsTemp.Close()
         Set rsTemp = Nothing
         OraDatabase.Parameters.Remove "PV_ID"
      End If
      %>
   </table>
   </fieldset>
   <br>

<!-- PACKAGE METRICS -------------------------------------------------------------------------------------------------------------------->
   <%If Request("rtag_id") <> "" Then%>
      <%
      Call GetPackageMetrics( parPv_id, rsPkgMetrics )
      %>
      <fieldset class="fset"><a href="javascript:;" onclick="ToggleDisplay('divPkgMetrics','pkg_metrics_filler')" class="lbl_link">
         <legend class="body_colb">
            <img src="images/i_metrics.gif" width="20" height="24" hspace="4" border="0" align="absmiddle" alt="Click to display Package Metrics">Package Metrics...
         </legend></a>
         <div name="pkg_metrics_filler" id="pkg_metrics_filler" style="display:block;" class="div_filler">
            <a href="javascript:;" onclick="ToggleDisplay('divPkgMetrics','pkg_metrics_filler')" class="txt_linked">Show...</a>
         </div>
         <div name="divPkgMetrics" id="divPkgMetrics" style="display:none;">
            <a name="PACKAGE_METRICS"></a>
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt" width="20%"><b>Autobuilt:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%If rsPkgMetrics("is_autobuildable") = "Y" Then%>Yes<%Else%>No<%End If%></td>
               </tr>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Unit Tested:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%If rsPkgMetrics("unit_tested") = "Y" Then%>Yes<%Else%>No<%End If%></td>
               </tr>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Autotested:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%If rsPkgMetrics("autotested") = "Y" Then%>Yes<%Else%>No<%End If%></td>
               </tr>
               <%If NOT IsNull(rsPkgMetrics("code_lines")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Code Lines:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("code_lines")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("comment_lines")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Comment Lines:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("comment_lines")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("blank_lines")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Blank Lines:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("blank_lines")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("branches")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Number of Branches:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("branches")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("branch_list")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Branch List:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("branch_list")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("code_files")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Code Files:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("code_files")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("ignored_files")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Ignored Files:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("ignored_files")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("makefiles")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Makefiles:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("makefiles")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("total_files")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Total Files:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("total_files")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("directories")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Number of Directories:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("directories")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("directory_depth")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Directory Depth:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("directory_depth")%></td>
               </tr>
               <%End If%>
               <%If NOT IsNull(rsPkgMetrics("created_stamp")) Then%>
               <tr>
                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt"><b>Metrics Collected:</b></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsPkgMetrics("created_stamp")%></td>
               </tr>
               <%End If%>
            </table>
         </div>
      </fieldset>
      <br>
      <%
      rsPkgMetrics.Close()
      Set rsPkgMetrics = nothing
      %>
   <%End If%>
<!-- PRODUCTS AFFECTED BY CHANGE -------------------------------------------------------------------------------------------------------->

<!-- REASON FOR DEPRECATION/DEPENDANCY DEPRECATED ----------------------------------------------------------------------------------------------------------------->
   <%If pkgInfoHash.Item("deprecated_state") = 6 Then %>

      <fieldset class="fset"><legend class="body_colb"><img src='images/s_notes.gif' width='21' height='24' hspace='4' border='0' align='absmiddle'>Reason for deprecation</legend>
         <a name="REASON_FOR_DEPRECATION"></a>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td bgcolor=#f5f5f5>

                  <%
                  Dim rsComment
                  Set rsComment = OraDatabase.DbCreateDynaset("SELECT * FROM DEPRECATED_PACKAGES WHERE RTAG_ID ="& Request("rtag_id") &" AND PKG_ID = "& pkgInfoHash.Item ("pkg_id") &"", cint(0))
                  If rsComment("comments") <> "" Then
                     Response.write "<table border='0' cellspacing='0' cellpadding='0'>"
                     Response.write "<tr>"
                     Response.write "<td class='sublbox_txt'>"& NewLine_To_BR((  rsComment("comments") ) ) &"<br></td>"
                     Response.write "</tr>"
                     Response.write "</table>"
                  'Else
                  '   If FixedIssues ( parPv_id ) Then
                  '      Response.write "<span class='sublbox_txt'>Not specified.</span><br>"
                  '   Else
                  '      Response.write "<span class='err_alert'>Required!</span><br>"
                  '   End If
                  End If
                  rsComment.Close()
                  Set rsComment = nothing
                  %>
               </td>
            </tr>
         </table>
      </fieldset>
      <br><br>
   <%End If%>
<!-- SBOM PRIORITY/CRITICALITY  --------------------------------------------------------------------------------------------------------->
   <%If NOT pageIsEditable AND pkgInfoHash.Item ("is_deployable") = "Y" Then%>
      <fieldset class="fset"><legend class="body_colb"><img src='icons/i_prod_sbom_priority.gif' hspace='4' border='0' align='absmiddle'>SBOM Priority</legend>
         <a name="SBOM_PRIORITY"></a>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td class="body_colb"></td>
               <td align="right" valign="bottom">
                  <%If (pkgInfoHash.Item ("dlocked") = "Y") Then%>
                     <a href='javascript:;' onClick="MM_openBrWindow('_wform_sbom_priority.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','SBOMPriority','resizable=yes,width=400,height=400')" class="txt_linked">Edit<img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                  <%End If%>
               </td>
            </tr>
         </table>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td bgcolor=#f5f5f5>
                  <%If pkgInfoHash.Item ("sbom_priority") <> "" Then%>
                     <table border='0' cellspacing='0' cellpadding='0'>
                        <tr>
                           <td class='sublbox_txt'>
                              <%
                              If pkgInfoHash.Item ("sbom_priority") = "C" Then
                                 Response.write "<b><font color='red'>Critical.</font></b>"
                              ElseIf pkgInfoHash.Item ("sbom_priority") = "I" Then
                                 Response.write "<b>Important.</b>"
                              ElseIf pkgInfoHash.Item ("sbom_priority") = "R" Then
                                 Response.write "Routine"
                              ElseIf pkgInfoHash.Item ("sbom_priority") = "L" Then
                                 Response.write "Low"
                              End If
                              %>
                           </td>
                        </tr>
                     </table>
                  <%Else%>
                     <span class='err_alert'>Required!</span><br>
                  <%End If%>
               </td>
            </tr>
         </table>
      </fieldset>
      <br><br>
   <%End If%>
<!-- CHANGE TYPE  ----------------------------------------------------------------------------------------------------------------------->
   <%If pkgInfoHash.Item ("build_type") = "A" Then%>
      <fieldset class="fset"><legend class="body_colb"><img src='icons/i_pkg_change_type.gif' hspace='4' border='0' align='absmiddle'>Change Type</legend>
         <a name="CHANGE_TYPE"></a>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td class="body_colb"></td>
               <td align="right" valign="bottom">
                  <%If (pkgInfoHash.Item ("dlocked") <> "A")  AND (pkgInfoHash.Item ("dlocked") <> "Y") AND criticalSectionIsEditable Then%>
                     <a href='javascript:;' onClick="MM_openBrWindow('_wform_change_type.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','ChangeType','resizable=yes,width=530,height=290')" class="txt_linked">Edit<img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                  <%End If%>
               </td>
            </tr>
         </table>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td bgcolor=#f5f5f5>
                  <%
                  If pkgInfoHash.Item ("change_type") <> "" Then
                     Response.write "<table border='0' cellspacing='0' cellpadding='0'>"
                     Response.write "<tr>"
                     If pkgInfoHash.Item ("change_type") = "M" Then
                        Response.write "<td class='sublbox_txt'>Major Change.<br></td>"
                     ElseIf pkgInfoHash.Item ("change_type") = "N" Then
                        Response.write "<td class='sublbox_txt'>Minor Change.<br></td>"
                     ElseIf pkgInfoHash.Item ("change_type") = "P" Then
                        Response.write "<td class='sublbox_txt'>Patch Change.<br></td>"
                     End If
                     Response.write "</tr>"
                     Response.write "</table>"
                  Else
                     Response.write "<span class='err_alert'>Required!</span><br>"
                  End If
                  %>
               </td>
            </tr>
         </table>
      </fieldset>
      <br><br>
   <%End If%>



<!-- RIPPLE PROPERTIES  ----------------------------------------------------------------------------------------------------------------------->
   <%If IsNull(pkgInfoHash.Item ("is_patch")) Then%>
      <fieldset class="fset"><legend class="body_colb"><img src='icons/i_pkg_ripple_type.gif' hspace='4' border='0' align='absmiddle' height='25' width='25'>Ripple Properties</legend>
         <a name="RIPPLE_PROPERTIES"></a>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td class="body_colb"></td>
               <td align="right" valign="bottom">
                  <%If (objAccessControl.IsVisible( "RipplePackage" ) AND pageIsEditable) OR criticalSectionIsEditable OR objAccessControl.IsVisible( "PegPackageVersions" ) Then%>
                     <a href='javascript:;' onClick="MM_openBrWindow('_wform_ripple_properties.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','RippleType','resizable=yes,width=800,height=500')" class="txt_linked">Edit<img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                  <%End If%>
               </td>
            </tr>
         </table>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">

            <%If Request("rtag_id") <> "" Then
               Dim rsQryPegged
               Dim isPegged
               Set rsQryPegged = OraDatabase.DbCreateDynaset( "SELECT * FROM PEGGED_VERSIONS WHERE RTAG_ID ="& Request("rtag_id") &"AND PV_ID ="& Request("pv_id"), cint(0))

               If rsQryPegged.RecordCount = 0  Then
                  isPegged = FALSE%>
               <%Else
                  isPegged = TRUE %>
                  <tr>
                     <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
                        <strong>Is Pegged</strong>
                        <%=Quick_Help ( "pegged_version" )%>
                     </td>
                     <td bgcolor=#f5f5f5 class="sublbox_txt">Yes</td>
                  </tr>
               <%End If%>
               <%rsQryPegged.Close()
               Set rsQryPegged = nothing
            End If%>

            <%If isPegged = FALSE Then%>
               <tr>
                  <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
                     <strong>Build Inclusion</strong>
                     <%=Quick_Help ( "ripple_build" )%>
                  </td>
                  <%If Request("rtag_id") <> "" Then
                     Dim rsQryRipple
                     Set rsQryRipple = OraDatabase.DbCreateDynaset( "SELECT * FROM DO_NOT_RIPPLE WHERE RTAG_ID ="& Request("rtag_id") &"AND PV_ID ="&Request("pv_id"), cint(0))
                        If rsQryRipple.RecordCount = 0  Then %>
                        <td bgcolor=#f5f5f5 class="sublbox_txt">Yes</td>
                     <%Else%>
                        <td bgcolor=#f5f5f5 class="sublbox_txt">No</td>
                     <%End If%>
                     <%rsQryRipple.Close()
                     Set rsQryRipple = nothing
                  End If%>
               </tr>
               <tr>
                  <td width="20%" bgcolor=#e4e9ec class="sublbox_txt">
                     <strong>Ripple Type</strong>
                     <%=Quick_Help ( "ripple_type" )%>
                  </td>
                  <td width="80%" bgcolor=#f5f5f5>
                     <p>
                        <%
                        Response.write "<table border='0' cellspacing='0' cellpadding='0'>"
                        Response.write "<tr>"
                        Response.write "<td class='sublbox_txt'>"
                        Dim anotherQry, selectedRippleType
                        selectedRippleType = pkgInfoHash.Item ("ripple_field")
                        Set anotherQry = OraDatabase.DbCreateDynaset( "SELECT state_name from ripple_field_states WHERE state_acronym ='"& selectedRippleType &"'", cint(0))
                        If anotherQry.RecordCount = 0  Then
                           Response.write "<span class='err_alert'>Required!</span>"
                        Else
                        Response.write( anotherQry.Fields("state_name").Value )
                        End If
                        anotherQry.Close()
                        Set anotherQry = nothing
                        If ( selectedRippleType = "L" ) Then
                        Dim qry
                        Set qry = OraDatabase.DbCreateDynaset( "SELECT major_limit, minor_limit, patch_limit, build_number_limit from package_versions where pv_id="& Request("pv_id"), cint(0))
                        Response.write " "
                        If isNull(qry("major_limit")) Then
                           Response.write("0")
                        Else
                           Response.write( qry.Fields( "major_limit" ).Value )
                        End If
                        Response.write ", "
                        If isNull(qry("minor_limit")) Then
                           Response.write("0")
                        Else
                           Response.write( qry.Fields( "minor_limit" ).Value )
                        End If
                        Response.write ", "
                        If isNull(qry("patch_limit")) Then
                           Response.write("0")
                        Else
                           Response.write( qry.Fields( "patch_limit" ).Value )
                        End If
                        Response.write ", "
                        If isNull(qry("build_number_limit")) Then
                           Response.write("0")
                        Else
                           Response.write( qry.Fields( "build_number_limit" ).Value )
                        End If
                        qry.Close()
                        Set qry = nothing
                        End If
                        Response.Write "<br></td>"
                        Response.write "</tr>"
                        Response.write "</table>"
                        %>
                     </p>
                  </td>
               </tr>
            <%End If%>
         </table>
      </fieldset>
      <br>
      <br>
   <%End If%>




<!-- REASON FOR RELEASE ----------------------------------------------------------------------------------------------------------------->
   <fieldset class="fset"><legend class="body_colb"><img src='images/s_notes.gif' width='21' height='24' hspace='4' border='0' align='absmiddle'>Reason for this version</legend>
      <a name="REASON_FOR_THIS_RELEASE"></a>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <tr>
            <td align="right" valign="bottom">
               <%If pageIsEditable Then%>
                  <form name="updateversions" method="post" action="_update_versions.asp">
                     <input type="submit" name="btn" value="Update Dependencies" class="form_btn" onClick="return confirmAction('Current comments would be deleted. Do you wish to continue?')">
                     <a href='javascript:;' onClick="MM_openBrWindow('_wform_reason_for_version.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','ReasonForRelease','resizable=yes,width=500,height=270')" class="txt_linked">Edit<img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                     <input name="pv_id" type="hidden" value="<%=parPv_id%>">
                     <input name="rtag_id" type="hidden" value="<%=parRtag_id%>">
                  </form>
               <%End If%>
            </td>
         </tr>
      </table>

      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <tr>
            <td bgcolor=#f5f5f5>
            <%If pkgInfoHash.Item ("comments") <> "" Then%>
               <table border='0' cellspacing='0' cellpadding='0'>
                  <tr>
                     <td class='sublbox_txt'> <%Response.Write( NewLine_To_BR(pkgInfoHash.Item("comments")) )%><br></td>
                  </tr>
               </table>
            <%ElseIf FixedIssues ( parPv_id ) Then%>
               <span class='sublbox_txt'>Not specified.</span><br>
            <%Else%>
               <span class='err_alert'>Required!</span><br>
            <%End If%>
            </td>
         </tr>
      </table>
   </fieldset>
   <br><br>
<!-- REASON FOR NON_RIPPLE RELEASE ----------------------------------------------------------------------------------------------------------------->
   <%If pkgInfoHash.Item ("comments") = "Rippled Build." Then%>

      <fieldset class="fset"><legend class="body_colb"><img src='images/s_notes.gif' width='21' height='24' hspace='4' border='0' align='absmiddle'>Reason for last non-ripple build</legend>

         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td bgcolor=#f5f5f5>
                  <%
                  'Dim rsQry
                  Call LastPvId(pkgInfoHash.Item ("pv_id"))

                  While rsQry("comments") = "Rippled Build."
                     Call LastPvId(rsQry("last_pv_id"))
                  Wend

                  If pkgInfoHash.Item ("comments") <> "" Then
                     Response.write "<table border='0' cellspacing='0' cellpadding='0'>"
                     Response.write "<tr>"
                     Response.write "<td class='sublbox_txt'><b>Package Version:</b> <b>"& NewLine_To_BR(( rsQry ("pkg_version") ) ) &"</b><br></td>"
                     Response.write "</tr>"
                     Response.write "<tr>"
                     Response.write "<td class='sublbox_txt'>"& NewLine_To_BR(( rsQry ("comments") ) ) &"<br></td>"
                     Response.write "</tr>"

                     Response.write "</table>"%>

                     <table width="100%" border="0" cellspacing="1" cellpadding="2">
                        <tr>
                           <td valign="top" class="sublbox_txt"><b>Fixed Issues For Last Non-Ripple Build</b></td>
                           <td align="right" valign="top">
                              <%If pageIsEditable Then%>
                                 <a href="javascript:;" onClick="MM_openBrWindow('_wform_import_issues.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&skip_open=true','FindIssue','scrollbars=yes,resizable=yes,width=750,height=600')" class="txt_linked">Import Fixed Issues from ClearQuest<img src="images/i_download.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                              <%End If%>
                           </td>
                        </tr>
                     </table>
                     <%Call Get_Package_Issues ( parPv_id, SQLstr, fixedIssDict, notesIssDict, enumISSUES_STATE_FIXED )
                     If (retVal > 0) Then
                        retVal = Get_CQ_Issues ( SQLstr, rsCQ )
                        If retVal = 0 Then%>
                           <table width="100%" border="0" cellspacing="1" cellpadding="3">
                              <tr>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field" align="center">Fixed</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;Id&nbsp;</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;DB&nbsp;</td>
                                 <td bgcolor=#e4e9ec nowrap width="100%" class="form_field">Summary</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;Type&nbsp;</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Priority</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Status</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Note</td>
                                 <td bgcolor=#e4e9ec nowrap width="1" class="form_field">&nbsp;</td>
                              </tr>
                              <%If ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF)) Then%>
                                 <%While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))%>
                                    <tr>
                                       <td align="center" nowrap bgcolor=#e4e9ec><img src="images/i_tick_black.gif" width="7" height="7" vspace="2"></td>
                                       <td bgcolor=#f5f5f5 nowrap class="form_item"><a href="javascript:;" onClick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueDetails','resizable=yes,width=580,height=500')" class="txt_linked"><%=rsCQ("iss_num")%></a></td>
                                       <td bgcolor=#f5f5f5 class="form_item">
                                            <%If rsCQ("iss_db") = enumCLEARQUEST_DEVI_ID Then%>
                                                DEVI
                                            <%Else%>
                                                UNKNOWN
                                            <%End If%></td>
                                       <td bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )%></td>
                                       <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("issue_type")%></td>
                                       <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("priority")%></td>
                                       <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("Status")%></td>
                                       <%If sectionIsEditable Then%>
                                           <%If notesIssDict.Exists (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id"))) Then%>
                                             <td align="center" bgcolor=#f5f5f5 class="form_item"><a href="javascript:;" onClick="MM_openBrWindow('_wform_issue_notes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueNotes','resizable=yes,width=400,height=250')"><img src="images/i_note_on.gif" width="11" height="12" border="0" title="<%=notesIssDict.Item (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id")))%>"></a></td>
                                          <%Else%>
                                             <td align="center" bgcolor=#f5f5f5 class="form_item"><a href="javascript:;" onClick="MM_openBrWindow('_wform_issue_notes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueNotes','resizable=yes,width=400,height=250')"><img src="images/i_note_off.gif" width="11" height="12" border="0" title="Add Note"></a></td>
                                          <%End If%>
                                       <%Else%>
                                          <%If notesIssDict.Exists (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id"))) Then%>
                                             <td align="center" bgcolor=#f5f5f5 class="form_item"><img src="images/i_note_on.gif" width="11" height="12" border="0" title="<%=notesIssDict.Item (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id")))%>"></td>
                                          <%Else%>
                                             <td align="center" bgcolor=#f5f5f5 class="form_item"><img src="images/i_note_off.gif" width="11" height="12" border="0"></td>
                                          <%End If%>
                                       <%End If%>
                                       <%If NOT pageIsEditable Then%>
                                          <td align="center" bgcolor=#f5f5f5 class="form_item"><img src="images/i_delete_disable.gif" width="13" height="12" hspace="2" border="0"></td>
                                       <%Else%>
                                          <td align="center" bgcolor=#f5f5f5 class="form_item"><a href="_remove_issue.asp?iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this issue from Release Manager');"><img src="images/i_delete.gif" width="13" height="12" hspace="2" border="0" alt="Delete this issue from the list"></a></td>
                                       <%End If%>
                                    </tr>
                                    <%rsCQ.MoveNext
                                 WEnd
                                 rsCQ.Close()%>
                              <%Else%>
                                 <tr>
                                    <td bgcolor=#e4e9ec nowrap>&nbsp;</td>
                                    <td bgcolor=#f5f5f5 nowrap></td>
                                    <td bgcolor=#f5f5f5 class="form_item"></td>
                                    <td bgcolor=#f5f5f5 class="form_item"></td>
                                    <td bgcolor=#f5f5f5 class="form_item"></td>
                                    <td bgcolor=#f5f5f5 class="form_item"></td>
                                    <td bgcolor=#f5f5f5 class="form_item"></td>
                                    <td bgcolor=#f5f5f5 class="form_item"></td>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item"></td>
                                 </tr>
                              <%End If%>
                           </table>
                        <%End If%>
                        <%If retVal <> 0 Then Response.write enumMSSQL_ERROR
                     End If
                  Else
                     If FixedIssues ( parPv_id ) Then
                        Response.write "<span class='sublbox_txt'>Not specified.</span><br>"
                     Else
                        Response.write "<span class='err_alert'>Required!</span><br>"
                     End If
                  End If

                  rsQry.Close()
                  Set rsQry = nothing
                  %>
               </td>
            </tr>
         </table>
      </fieldset>
      <br><br>
   <%End If%>
<!-- FIXED ISSUES ----------------------------------------------------------------------------------------------------------------------->
   <fieldset class="fset">
      <legend class="body_colb">
         <img src="images/s_bugs.gif" width="21" height="18" border="0" hspace="4" align="absmiddle">
         Issues
      </legend>
      <p class="body_colb"><a name="ISSUES"></a></p>
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
         <tr>
            <td valign="top" class="body_colb">JIRA Issues</td>
            <td align="right" valign="top">
               <%If pageIsEditable Then%>
                  <a href="javascript:;" onClick="MM_openBrWindow('_wform_import_jira_issues.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&skip_open=true','FindIssue','scrollbars=yes,resizable=yes,width=750,height=600')" class="txt_linked">
                     Import JIRA issues
                     <img src="images/i_download.gif" width="12" height="12" hspace="2" border="0" align="absmiddle">
                  </a>
               <%End If%>
            </td>

            <%retVal = Get_JIRA_Package_Issues ( parPv_id, SQLstr, fixedIssDict, notesIssDict, enumISSUES_STATE_FIXED )
            If (retVal > 0) Then
               retVal = Get_JIRA_Issues ( SQLstr, rsCQ )
               If (retVal = 0 AND rsCQ.RecordCount > 0) Then%>

                  <table width="100%" border="0" cellspacing="1" cellpadding="3">
                     <tr>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field" align="center">Fixed</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;Id&nbsp;</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;DB&nbsp;</td>
                        <td bgcolor=#e4e9ec nowrap width="100%" class="form_field">Summary</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;Type&nbsp;</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Priority</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Status</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Note</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">&nbsp;</td>
                     </tr>
                     <%If ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF)) Then%>
                        <%While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))%>
                           <tr>
                              <%If rsCQ("resolution") = 1 Then %>
                                 <td align="center" nowrap bgcolor=#e4e9ec>
                                    <img src="images/i_tick_black.gif" width="7" height="7" vspace="2">
                                 </td>
                              <%Else%>
                                 <td align="center" nowrap bgcolor=#e4e9ec></td>
                              <%End If%>
                              <td bgcolor=#f5f5f5 nowrap class="form_item">
                                 <a href="<%=JIRA_URL%>/browse/<%=rsCQ("iss_num")%>" target="_blank" class="txt_linked">
                                    <%=rsCQ("iss_num")%>
                                 </a>
                              </td>
                              <td bgcolor=#f5f5f5 class="form_item">JIRA</td>
                              <td bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("issuetype")%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("priority")%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("state")%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"></td>
                              <%If NOT pageIsEditable Then%>
                                 <td align="center" bgcolor=#f5f5f5 class="form_item">
                                    <img src="images/i_delete_disable.gif" width="13" height="12" hspace="2" border="0">
                                 </td>
                              <%Else%>
                                 <td align="center" bgcolor=#f5f5f5 class="form_item">
                                    <a href="_remove_jira_issue.asp?iss_link=<%=rsCQ("iss_num")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this issue from Release Manager');">
                                       <img src="images/i_delete.gif" width="13" height="12" hspace="2" border="0" alt="Delete this issue from the list">
                                    </a>
                                 </td>
                              <%End If%>
                           </tr>
                           <%rsCQ.MoveNext
                        WEnd
                        rsCQ.Close()%>
                     <%Else%>
                        <tr>
                           <td bgcolor=#e4e9ec nowrap>&nbsp;</td>
                           <td bgcolor=#f5f5f5 nowrap></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td align="center" bgcolor=#f5f5f5 class="form_item"></td>
                        </tr>
                     <%End If%>

                  </table>
               <%End If%>
               <%If retVal <> 0 Then Response.write enumMSSQL_ERROR%>
            <%End If%>

            <table width="100%" border="0" cellspacing="1" cellpadding="2">
               <tr>
                  <td valign="top" class="body_colb">Fixed Issues</td>
                  <td align="right" valign="top">
                     <%If pageIsEditable Then%>
                        <a href="javascript:;" onClick="MM_openBrWindow('_wform_import_issues.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&skip_open=true','FindIssue','scrollbars=yes,resizable=yes,width=750,height=600')" class="txt_linked">
                           Import Fixed Issues from ClearQuest
                           <img src="images/i_download.gif" width="12" height="12" hspace="2" border="0" align="absmiddle">
                        </a>
                     <%End If%>
                  </td>
               </tr>
            </table>

            <%retVal = Get_Package_Issues ( parPv_id, SQLstr, fixedIssDict, notesIssDict, enumISSUES_STATE_FIXED )
            If (retVal > 0) Then
               retVal = Get_CQ_Issues ( SQLstr, rsCQ )
               If retVal = 0 Then%>
                  <table width="100%" border="0" cellspacing="1" cellpadding="3">
                     <tr>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field" align="center">Fixed</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;Id&nbsp;</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;DB&nbsp;</td>
                        <td bgcolor=#e4e9ec nowrap width="100%" class="form_field">Summary</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Issue&nbsp;Type&nbsp;</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Priority</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Status</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">Note</td>
                        <td bgcolor=#e4e9ec nowrap width="1" class="form_field">&nbsp;</td>
                     </tr>
                     <%If ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF)) Then%>
                        <%While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))%>
                           <tr>
                              <td align="center" nowrap bgcolor=#e4e9ec><img src="images/i_tick_black.gif" width="7" height="7" vspace="2"></td>
                              <td bgcolor=#f5f5f5 nowrap class="form_item">
                                 <a href="javascript:;" onClick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueDetails','resizable=yes,width=580,height=500')" class="txt_linked">
                                    <%=rsCQ("iss_num")%>
                                 </a>
                              </td>
                              <td bgcolor=#f5f5f5 class="form_item">
                                 <%If rsCQ("iss_db") = enumCLEARQUEST_DEVI_ID Then%>
                                    DEVI
                                 <%Else%>
                                    UNKNOWN
                                 <%End If%>
                              </td>
                              <td bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("issue_type")%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("priority")%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("Status")%></td>
                              <%If sectionIsEditable AND pageIsEditable Then%>
                                 <%If notesIssDict.Exists (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id"))) Then%>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item">
                                       <a href="javascript:;" onClick="MM_openBrWindow('_wform_issue_notes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueNotes','resizable=yes,width=400,height=250')">
                                          <img src="images/i_note_on.gif" width="11" height="12" border="0" title="<%=notesIssDict.Item (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id")))%>">
                                       </a>
                                    </td>
                                 <%Else%>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item">
                                       <a href="javascript:;" onClick="MM_openBrWindow('_wform_issue_notes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueNotes','resizable=yes,width=400,height=250')">
                                          <img src="images/i_note_off.gif" width="11" height="12" border="0" title="Add Note">
                                       </a>
                                    </td>
                                 <%End If%>
                              <%Else%>
                                 <%If notesIssDict.Exists (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id"))) Then%>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item">
                                       <img src="images/i_note_on.gif" width="11" height="12" border="0" title="<%=notesIssDict.Item (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id")))%>">
                                    </td>
                                 <%Else%>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item">
                                       <img src="images/i_note_off.gif" width="11" height="12" border="0">
                                    </td>
                                 <%End If%>
                              <%End If%>
                              <%If NOT pageIsEditable Then%>
                                 <td align="center" bgcolor=#f5f5f5 class="form_item">
                                    <img src="images/i_delete_disable.gif" width="13" height="12" hspace="2" border="0">
                                 </td>
                              <%Else%>
                                 <td align="center" bgcolor=#f5f5f5 class="form_item">
                                    <a href="_remove_issue.asp?iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this issue from Release Manager');">
                                       <img src="images/i_delete.gif" width="13" height="12" hspace="2" border="0" alt="Delete this issue from the list">
                                    </a>
                                 </td>
                              <%End If%>
                           </tr>
                           <%rsCQ.MoveNext
                        WEnd
                        rsCQ.Close()%>
                     <%Else%>
                        <tr>
                           <td bgcolor=#e4e9ec nowrap>&nbsp;</td>
                           <td bgcolor=#f5f5f5 nowrap></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td bgcolor=#f5f5f5 class="form_item"></td>
                           <td align="center" bgcolor=#f5f5f5 class="form_item"></td>
                        </tr>
                     <%End If%>

                  </table>
               <%End If%>
               <%If retVal <> 0 Then Response.write enumMSSQL_ERROR%>
            <%End If%>

            <table width="100%" border="0" cellspacing="1" cellpadding="2">
               <tr>
                  <td valign="top" class="body_colb">Outstanding Issues</td>
                  <td align="right" valign="top">
                     <%If pageIsEditable Then%>
                        <a href="javascript:;" onClick="MM_openBrWindow('_wform_import_issues.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','FindIssue','scrollbars=yes,resizable=yes,width=750,height=600')" class="txt_linked">
                           Import Outstanding Issues from ClearQuest
                           <img src="images/i_download.gif" width="12" height="12" hspace="2" border="0" align="absmiddle">
                        </a>
                     <%End If%>
                  </td>
               </tr>
            </table>

            <%retVal = Get_Package_Issues ( parPv_id, SQLstr, fixedIssDict, notesIssDict, enumISSUES_STATE_IMPORTED )
            If (retVal > 0) Then
               retVal = Get_CQ_Issues ( SQLstr, rsCQ )
               If retVal = 0 Then%>
                  <table width="100%" border="0" cellspacing="1" cellpadding="2">
                     <form name="fixedissues" method="get" action="_update_issues_state.asp">
                        <tr>
                           <%If pageIsEditable Then%>
                              <td bgcolor=#e4e9ec nowrap width="1%" class="form_field" align="center">Fixed</td>
                           <%End If%>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Issue&nbsp;Id&nbsp;</td>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Issue DB&nbsp;</td>
                           <td bgcolor=#e4e9ec nowrap width="100%" class="form_field">Summary</td>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Issue&nbsp;Type&nbsp;</td>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Priority</td>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Status</td>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Note</td>
                           <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">&nbsp;</td>
                        </tr>
                        <%If ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF)) Then%>
                           <%While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))%>
                              <tr>
                                 <%If pageIsEditable Then%>
                                    <td align="center" nowrap bgcolor=#e4e9ec>
                                       <input type="checkbox" name="FRfixed" value="<%=rsCQ("iss_db") &"."& rsCQ("iss_id")%>">
                                    </td>
                                 <%End If%>
                                 <td bgcolor=#f5f5f5 nowrap class="form_item">
                                    <a href="javascript:;" onClick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueDetails','resizable=yes,width=580,height=500')" class="txt_linked">
                                       <%=rsCQ("iss_num")%>
                                    </a>
                                 </td>
                                 <td bgcolor=#f5f5f5 class="form_item">
                                    <%If rsCQ("iss_db") = enumCLEARQUEST_DEVI_ID Then%>
                                       DEVI
                                    <%Else%>
                                       UNKNWOWN
                                    <%End If%>
                                 </td>
                                 <td bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )%></td>
                                 <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("issue_type")%></td>
                                 <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("priority")%></td>
                                 <td nowrap bgcolor=#f5f5f5 class="form_item"><%=rsCQ("Status")%></td>
                                 <%If sectionIsEditable AND pageIsEditable Then%>
                                    <%If notesIssDict.Exists (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id"))) Then%>
                                       <td align="center" bgcolor=#f5f5f5 class="form_item">
                                          <a href="javascript:;" onClick="MM_openBrWindow('_wform_issue_notes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueNotes','resizable=yes,width=400,height=250')">
                                             <img src="images/i_note_on.gif" width="11" height="12" border="0" alt="<%=notesIssDict.Item (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id")))%>">
                                          </a>
                                       </td>
                                    <%Else%>
                                       <td align="center" bgcolor=#f5f5f5 class="form_item">
                                          <a href="javascript:;" onClick="MM_openBrWindow('_wform_issue_notes.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>','IssueNotes','resizable=yes,width=400,height=250')">
                                             <img src="images/i_note_off.gif" width="11" height="12" border="0" alt="Add Note">
                                          </a>
                                       </td>
                                    <%End If%>
                                 <%Else%>
                                    <%If notesIssDict.Exists (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id"))) Then%>
                                       <td align="center" bgcolor=#f5f5f5 class="form_item">
                                          <img src="images/i_note_on.gif" width="11" height="12" border="0" alt="<%=notesIssDict.Item (Cstr(rsCQ("iss_db") &"."& rsCQ("iss_id")))%>">
                                       </td>
                                    <%Else%>
                                       <td align="center" bgcolor=#f5f5f5 class="form_item">
                                          <img src="images/i_note_off.gif" width="11" height="12" border="0">
                                       </td>
                                    <%End If%>
                                 <%End If%>
                                 <%If NOT pageIsEditable Then%>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item">
                                       <img src="images/i_delete_disable.gif" width="13" height="12" hspace="2" border="0">
                                    </td>
                                 <%Else%>
                                    <td align="center" bgcolor=#f5f5f5 class="form_item">
                                       <a href="_remove_issue.asp?iss_db=<%=rsCQ("iss_db")%>&iss_id=<%=rsCQ("iss_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this issue from Release Manager');">
                                          <img src="images/i_delete.gif" width="13" height="12" hspace="2" border="0" alt="Delete this issue from the list">
                                       </a>
                                    </td>
                                 <%End If%>
                              </tr>
                              <%rsCQ.MoveNext
                           WEnd
                           rsCQ.Close()%>
                           <%If pageIsEditable Then%>
                              <tr>
                                 <td align="center" nowrap bgcolor=#e4e9ec>
                                    <input type="submit" name="Apply" value="Apply" class="form_btn">
                                 </td>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                                 <td></td>
                              </tr>
                           <%End If%>
                        <%Else%>
                           <tr>
                              <%If pageIsEditable Then%>
                                 <td bgcolor=#e4e9ec nowrap>&nbsp;</td>
                              <%End If%>
                              <td bgcolor=#f5f5f5 nowrap></td>
                              <td bgcolor=#f5f5f5 class="form_item"></td>
                              <td bgcolor=#f5f5f5 class="form_item"></td>
                              <td bgcolor=#f5f5f5 class="form_item"></td>
                              <td bgcolor=#f5f5f5 class="form_item"></td>
                              <td bgcolor=#f5f5f5 class="form_item"></td>
                              <td bgcolor=#f5f5f5 class="form_item"></td>
                              <td align="center" bgcolor=#f5f5f5 class="form_item"></td>
                           </tr>
                        <%End If%>
                        <input name="pv_id" type="hidden" value="<%=parPv_id%>">
                        <input name="rtag_id" type="hidden" value="<%=parRtag_id%>">
                     </form>
                  </table>
               <%End If%>
               <%If retVal <> 0 Then Response.write enumMSSQL_ERROR%>
            <%End If%>
<!-- DEVI-050133 Although it would seem to the human eye that the following row and table closing tags are needed, -->
<!--             they do in fact cause the page to be rendered incorrectly. Hence they are commented out for now   -->
<!--             until the true cause of the mis-rendering can be ascertained.                                    -->
<!--     </tr> -->
<!--  </table> -->
   </fieldset>
   <br><br>
<!-- DEPENDENCY ISSUES (NOT FOR PATCHES!) ------------------------------------------------------------------------------------------------------->

   <%If IsNull(pkgInfoHash.Item ("is_patch")) Then%>
      <fieldset class="fset"><legend class="body_colb"><img src="images/s_bugs.gif" width="21" height="18" border="0" hspace="4" align="absmiddle">Dependency Issues</legend>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">

            <%Call Get_Package_Issues ( parPv_id, SQLstr, NULL, NULL, NULL )
            If (retVal > 0) Then
               retVal = Get_Dependency_CQ_Issues ( SQLstr, rsCQ, depIssDict, issArr )
               If retVal = 0 Then%>
                  <%
                  currG1 = 0
                  G1_template = _
                  "<tr>"&_
                  "  <td colspan='7'><img src='images/spacer.gif' width='2' height='2'></td>"&_
                  "</tr>"&_
                  "<tr>"&_
                  "  <td colspan='7' bgcolor=#e4e9ec class='form_item'>/*DEP_NAME_VERSION*//*REASONS*/</td>"&_
                  "</tr>"
                  Set rsDepIss = OraDatabase.DbCreateDynaset( SQL_Dependency_Issues( parPv_id ), cint(0))
                  %>
                  <%If ((NOT rsDepIss.BOF) AND (NOT rsDepIss.EOF)) Then%>
                     <%While ((NOT rsDepIss.BOF) AND (NOT rsDepIss.EOF))%>
                        <%
                        iss_db_id = Cstr(rsDepIss("iss_db") &"."& rsDepIss("iss_id"))
                        G1_style = Replace(G1_template, "/*DEP_NAME_VERSION*/", "<SPAN class='envolPkg'><b>"& rsDepIss("pkg_name") &" "& rsDepIss("pkg_version") &"</b></SPAN>")
                        If IsNull(rsDepIss("iss_id")) Then
                           If IsNull(rsDepIss("reasons")) Then
                              G1_style = Replace(G1_style, "/*REASONS*/", "<br>Reason for this version is not specified.")
                           Else
                              G1_style = Replace(G1_style, "/*REASONS*/", "<br>"& NewLine_To_BR ( To_HTML ( rsDepIss("reasons") ) ) )
                           End If
                        Else
                           If IsNull(rsDepIss("reasons")) Then
                              G1_style = Replace(G1_style, "/*REASONS*/", "")
                           Else
                              G1_style = Replace(G1_style, "/*REASONS*/", "<br>"& NewLine_To_BR ( To_HTML ( rsDepIss("reasons") ) ) )
                           End If
                        End If

                        Call Group_By ( rsDepIss("pv_id"), G1_style, currG1 )
                        If NOT IsNull(rsDepIss("iss_id")) Then
                           If rsDepIss("pv_id") <> currG1 Then
                              currG1 = rsDepIss("pv_id")%>
                              <tr>
                                 <td bgcolor=#e4e9ec nowrap width="1%" class="form_field" align="center"></td>
                                 <td bgcolor=#e4e9ec nowrap width="1%" class="form_field" align="center">Fixed</td>
                                 <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Issue&nbsp;Id&nbsp;</td>
                                 <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Issue DB&nbsp;</td>
                                 <td bgcolor=#e4e9ec nowrap width="100%" class="form_field">Summary</td>
                                 <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Issue&nbsp;Type&nbsp;</td>
                                 <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Priority</td>
                              </tr>
                           <%End If%>
                           <tr>
                              <td bgcolor=#e4e9ec></td>
                              <td align="center" nowrap bgcolor=#f5f5f5>
                                 <%If CInt(rsDepIss("iss_state")) = enumISSUES_STATE_FIXED Then%>
                                    <img src="images/i_tick_black.gif" width="7" height="7" vspace="2">
                                 <%Else%>
                                    <img src="images/spacer.gif" width="7" height="7" vspace="2">
                                 <%End If%>
                              </td>
                              <td bgcolor=#f5f5f5 nowrap class="form_item"><a href="javascript:;" onClick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=asDepIss( iss_db_id, enumLoc_iss_db )%>&iss_id=<%=asDepIss( iss_db_id, enumLoc_iss_id )%>','IssueDetails','resizable=yes,width=580,height=500')" class="txt_linked"><%=asDepIss( iss_db_id, enumLoc_iss_num )%></a></td>
                              <td bgcolor=#f5f5f5 class="form_item">
                                    <%If asDepIss( iss_db_id, enumLoc_iss_db ) = enumCLEARQUEST_DEVI_ID Then%>
                                        DEVI
                                    <%Else%>
                                        UNKNOWN
                                    <%End If%></td>
                              <td bgcolor=#f5f5f5 class="form_item"><%=asDepIss( iss_db_id, enumLoc_summary)%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=asDepIss( iss_db_id, enumLoc_issue_type)%></td>
                              <td nowrap bgcolor=#f5f5f5 class="form_item"><%=asDepIss( iss_db_id, enumLoc_priority)%></td>
                           </tr>
                        <%End If%>
                        <%rsDepIss.MoveNext
                     WEnd
                     rsDepIss.Close()
                     Set rsDepIss = nothing%>
                  <%Else%>
                     <tr>
                        <td bgcolor=#e4e9ec nowrap>&nbsp;</td>
                        <td bgcolor=#f5f5f5></td>
                        <td bgcolor=#f5f5f5></td>
                        <td bgcolor=#f5f5f5 class="form_item"></td>
                        <td bgcolor=#f5f5f5 class="form_item"></td>
                        <td bgcolor=#f5f5f5 class="form_item"></td>
                        <td bgcolor=#f5f5f5 class="form_item"></td>
                     </tr>
                  <%End If%>
               <%End If%>
               <%If retVal <> 0 Then Response.write enumMSSQL_ERROR%>
            <%End If%>
         </table>
      </fieldset>
      <br><br>
   <%End If%>
<!-- UNIT TESTS --------------------------------------------------------------------------------------------------------------------->
   <%
   Dim testCheckMSG, testCheckMSG_ID, testCheckNote, testCheckTestsFound
   Call CheckUnitTestsState ( parPv_id, testCheckMSG, testCheckMSG_ID, testCheckNote, testCheckTestsFound  )
   Set rsQry = OraDatabase.DbCreateDynaset( SQL_Unit_Tests ( parPv_id ), cint(0))
   %>
   <fieldset class="fset"><legend class="body_colb"><img src="images/i_unit_test.gif" width="18" height="25" hspace="4" border="0" align="absmiddle" alt="">Unit Tests
      <%If testCheckMSG_ID = 0 Then%>
         &nbsp;&nbsp;<%=testCheckMSG%>
      <%End If%></legend>
      <a name="UNIT_TESTS"></a>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <tr>
            <td align="right" valign="bottom">
               <%If ( scriptName = "fixed_issues.asp" ) Then%>
                  <%If objAccessControl.UserLogedIn AND (pageIsEditable OR (pkgInfoHash.Item("dlocked") = "Y")) Then%>
                     <a href='javascript:;' onClick="MM_openBrWindow('_wform_unit_test.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','UnitTest','resizable=yes,width=700,height=550')" class="txt_linked">New Test<img src="images/i_new.gif" width="13" height="13" hspace="2" border="0" align="absmiddle" alt="Add new test."></a>
                  <%End If%>
                  <%If (NOT testCheckTestsFound) AND (testCheckMSG_ID = 0)  Then%>
                     <a href='_not_done_unit_test.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&notdone=Y' class='txt_linked'>Click here if Not Done!<img src="images/i_new.gif" width="13" height="13" hspace="2" border="0" align="absmiddle" alt="Add new test."></a>
                  <%End If%>
               <%End If%>
            </td>
         </tr>
      </table>
      <%If (NOT testCheckTestsFound) AND (testCheckMSG_ID = -1) Then%>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td bgcolor=#f5f5f5 class="form_item">
                  <%Call DisplayInfo ( "UNIT_TEST_NOT_DONE", 300 )%>
                  <span class="rep_small">Last Modified: <%=testCheckMSG%></span><br>
                  <%=NewLine_To_BR( To_HTML ( testCheckNote ) )%>
               </td>
            </tr>
         </table>
      <%End If%>

      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <form name="review" method="get" action="_update_unit_test_accepted_state.asp">
            <tr>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" valign="middle">&nbsp;Test Type&nbsp;</td>
               <td width="100%" nowrap bgcolor=#e4e9ec class="form_field" valign="middle">&nbsp;Test Summary&nbsp;</td>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" align="center" valign="middle">Test<br>Completed</td>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" align="center" valign="middle">&nbsp;Passed<br># / Total&nbsp;</td>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" align="center" valign="middle">&nbsp;Results&nbsp;</td>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" align="center" valign="middle">&nbsp;Accepted&nbsp;</td>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" align="center" valign="middle">Review<br>Completed</td>
               <td width="1%" nowrap bgcolor=#e4e9ec class="form_field" valign="middle">Comments /<br>Issue#</td>
               <td width="1%" bgcolor=#e4e9ec></td>
            </tr>
            <%While ((NOT rsQry.BOF) AND (NOT rsQry.EOF) )%>
               <tr>
                  <%If NOT pageIsEditable Then%>
                     <%If NOT IsNull(rsQry("test_id")) AND ( scriptName = "fixed_issues.asp") Then%>
                        <td nowrap bgcolor=#f5f5f5 class="form_item" valign="top"><a href="javascript:;" onClick="MM_openBrWindow('_wform_update_unit_test.asp?test_id=<%=rsQry("test_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','UpdateUT','resizable=yes,width=700,height=550')" class="txt_linked"><img src="images/i_test.gif" width="16" height="16" hspace="3" align="absmiddle" border="0"><%=rsQry("test_type_name")%></a></td>
                     <%Else%>
                        <td nowrap bgcolor=#f5f5f5 class="form_item" valign="top"><img src="images/i_test.gif" width="16" height="16" hspace="3" align="absmiddle"><%=rsQry("test_type_name")%></td>
                     <%End If%>
                  <%Else%>
                     <td nowrap bgcolor=#f5f5f5 class="form_item" valign="top"><a href="javascript:;" onClick="MM_openBrWindow('<%If Not IsNull(rsQry("test_id")) Then%>_wform_update_unit_test.asp<%Else%>_wform_unit_test.asp<%End If%>?test_id=<%=rsQry("test_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&test_type_id=<%=rsQry("test_type_id")%>','UpdateUT','resizable=yes,width=700,height=550')" class="txt_linked"><img src="images/i_test.gif" width="16" height="16" hspace="3" align="absmiddle" border="0"><%=rsQry("test_type_name")%></a></td>
                  <%End If%>
                  <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=NewLine_To_BR( To_HTML( rsQry("test_summary") ))%></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item" valign="top"><%If ( NOT IsNull(rsQry("tester")) ) Then%><%=EuroDate ( rsQry("completion_date") )%><br>by <a href="mailto:<%=rsQry("tester_email")%>" class="txt_linked"><%=rsQry("tester")%></a><%End If%></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item" valign="top" align="center"><%=rsQry("numof_test")%></td>

                  <%If CInt(rsQry("test_type_id")) = enumTEST_TYPE_AUTOMATIC Then%>
                     <td bgcolor=#f5f5f5 class="form_item" align="center" valign="top">
                        <%If NOT IsNull( rsQry("results_url") ) Then%>
                           <%If InStr( rsQry("results_url"), "http://" ) = 1 Then%>
                              <a href="<%=rsQry("results_url")%>" target="_blank"><img src="images/i_results.gif" width="15" height="16" border="0" alt="View test results"></a>
                           <%Else%>
                              <a href="<%=dpkg_archiveURL & pkgInfoHash.Item ("pkg_name") &"/"& pkgInfoHash.Item ("pkg_version") & rsQry("results_url")%>" target="_blank"><img src="images/i_results.gif" width="15" height="16" border="0" alt="View test results"></a>
                           <%End If%>
                        <%End If%>
                     </td>
                  <%Else%>
                     <td bgcolor=#f5f5f5 class="form_item"  align="center" valign="top">
                        <%If NOT IsNull( rsQry("results_attachment_name") ) Then%>
                           <%If pkgInfoHash.Item ("dlocked") = "Y" Then%>
                              <a href="<%=dpkg_archiveURL & pkgInfoHash.Item ("pkg_name") &"/"& pkgInfoHash.Item ("pkg_version") &"/"& rsQry("results_attachment_name")%>" target="_blank"><img src="images/i_results.gif" width="15" height="16" border="0" alt="View test results"></a>
                           <%Else%>
                              <a href="<%=TEMP_FOLDER &"/"& pkgInfoHash.Item ("pkg_name") &"/"& pkgInfoHash.Item ("pkg_version") &"/"& rsQry("results_attachment_name")%>" target="_blank"><img src="images/i_results.gif" width="15" height="16" border="0" alt="View test results"></a>
                           <%End If%>
                        <%End If%>
                     </td>
                  <%End If%>

                  <td nowrap bgcolor=#e4e9ec class="sublbox_txt" valign="top" align="center"><%=FormatAccepted( rsQry("test_accepted"), rsQry("test_id") )%></td>
                  <td nowrap bgcolor=#f5f5f5 class="form_item" valign="top"><%If NOT IsNull(rsQry("reviewee")) Then%><%=EuroDate ( rsQry("acceptance_date") )%><br>by <a href="mailto:<%=rsQry("reviewee_email")%>" class="txt_linked"><%=rsQry("reviewee")%></a><%End If%></td>
                  <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=NewLine_To_BR( To_HTML( rsQry("review_comments") ))%></td>

                  <%
                  If (  (    pageIsEditable _
                         AND (scriptName = "fixed_issues.asp") _
                         AND (IsNull(rsQry("test_accepted")) OR (rsQry("test_accepted") = enumUNIT_TEST_NOTACCEPTED))) _
                      OR _
                        (    objAccessControl.UserLogedIn _
                         AND (scriptName = "fixed_issues.asp") _
                         AND (pkgInfoHash.Item("dlocked") = "Y") _
                         AND (IsNull(rsQry("test_accepted")) OR (rsQry("test_accepted") = enumUNIT_TEST_NOTACCEPTED)) _
                         AND (rsQry("test_type_id") <> CStr(enumTEST_TYPE_AUTOBUILD_UTF))) ) Then
                  %>
                     <td bgcolor=#f5f5f5 valign="top"><%If NOT IsNull(rsQry("test_id")) Then%><a href="_remove_unit_test.asp?test_id=<%=rsQry("test_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this unit test');"><img src="images/i_delete.gif" alt="Remove this test." width="13" height="12" hspace="3" border="0"></a><%End If%></td>
                  <%Else%>
                     <td bgcolor=#f5f5f5 valign="top"></td>
                  <%End If%>
               </tr>
               <%
               rsQry.MoveNext
            WEnd
            %>
            <tr>
               <td class="form_field"></td>
               <td class="form_field"></td>
               <td class="form_field"></td>
               <td class="form_field"></td>
               <td class="form_field"></td>
               <td class="form_field" align="center">
                  <%If (testCheckTestsFound) AND (testCheckMSG_ID = 0) AND ( scriptName = "fixed_issues.asp" ) AND pageIsEditable Then%>
                     <input type="submit" name="Apply" value="Apply" class="form_btn">
                  <%End If%>
               </td>
               <td class="form_field"></td>
               <td class="form_field"></td>
               <td class="form_field"></td>
            </tr>
            <input name="pv_id" type="hidden" value="<%=parPv_id%>">
            <input name="rtag_id" type="hidden" value="<%=parRtag_id%>">
         </form>
      </table>
   </fieldset>
    <br><br>
<!-- CODE REVIEW ------------------------------------------------------------------------------------------------------------------->
   <fieldset class="fset"><legend class="body_colb"><img src='images/s_code_review.gif' width='21' height='23' hspace='4' border='0' align='absmiddle'>Code Review</legend>
      <a name="CODE_REVIEW" id="CODE_REVIEW"></a>
      <%Set rsQry = OraDatabase.DbCreateDynaset( SQL_CodeReview ( parPv_id ), cint(0))%>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <tr>
            <td align="right" valign="bottom">
               <%If ( scriptName = "fixed_issues.asp" ) Then%>
                  <%If objAccessControl.UserLogedIn AND (pageIsEditable OR (pkgInfoHash.Item("dlocked") = "Y")) Then%>
                     <a href='javascript:;' onClick="MM_openBrWindow('_wform_update_code_review.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','CodeReviewEdit','scrollbars=yes,status=yes,resizable=yes,width=950,height='+ ( screen.height - 100 ) +',top=0,left=0')" class="txt_linked">Edit<img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                  <%End If%>
                  <%If rsQry.RecordCount > 0 Then%>
                     <%If NOT IsNull(rsQry("date_of_review")) Then%>
                        &nbsp;
                        <a href='javascript:;' onClick="MM_openBrWindow('_wform_code_review.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','CodeReviewView','scrollbars=yes,status=yes,resizable=yes,width=950,height='+ ( screen.height - 100 ) +',top=0,left=0')" class="txt_linked">View<img src="images/i_open.gif" width="12" height="12" hspace="2" border="0" align="absmiddle"></a>
                     <%End If%>
                  <%End If%>
               <%End If%>
            </td>
         </tr>
      </table>
      <%If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then%>
         <%If NOT IsNull(rsQry("date_of_review")) Then%>
            <table width="100%"  border="0" cellspacing="1" cellpadding="4">
               <tr>
                  <td width="1%" align="right" nowrap bgcolor=#e4e9ec class="form_field">Date of Review</td>
                  <td width="1%" nowrap bgcolor=#f5f5f5 class="form_item"><%=EuroDate ( rsQry("date_of_review") )%>&nbsp;&nbsp;&nbsp;</td>
                  <td width="1%" align="right" nowrap bgcolor=#e4e9ec class="form_field">&nbsp;&nbsp;&nbsp;Time Spent:</td>
                  <td width="100%" bgcolor=#f5f5f5 class="form_item"><%=rsQry("time_spent")%> hrs </td>
               </tr>
               <tr>
                  <td align="right" valign="top" nowrap bgcolor=#e4e9ec class="form_field">Reason for Review</td>
                  <td colspan="3" bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR( To_HTML( rsQry("review_reason") ))%></td>
               </tr>
               <tr>
                  <td align="right" nowrap bgcolor=#e4e9ec class="form_field">Review Results </td>
                  <td colspan="3" bgcolor=#f5f5f5 class="form_item">
                  <%=DecodeOverallResult( rsQry("review_results") )%>
                  </td>
               </tr>
               <tr>
                  <td align="right" nowrap bgcolor=#e4e9ec class="form_field">Issues Raised </td>
                  <td colspan="3" bgcolor=#f5f5f5 class="form_item"><%=NewLine_To_BR( To_HTML( rsQry("issues_raised") ))%></td>
               </tr>
            </table>
         <%Else%>
            <table width="100%" border="0" cellspacing="1" cellpadding="2">
               <tr>
                  <td bgcolor=#f5f5f5><span class='sublbox_txt'>No details found.</span></td>
               </tr>
            </table>
         <%End If%>
      <%Else%>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td bgcolor=#f5f5f5><span class='sublbox_txt'>No details found.</span></td>
            </tr>
         </table>
      <%End If%>

      <!-- Code Review URL section for this version -->
      <%Call GetCodeReviewURLs( parPv_id, rsCodeReviewURL )%>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <tr>
            <td align="left" valign="top" class="body_colb">Code Review URL for this version</td>
            <td align="right" valign="top" <%If NOT IsNull(rsCodeReviewURL("url")) Then Response.Write("colspan='5'")%>>
               <%If (scriptName = "fixed_issues.asp") AND objAccessControl.UserLogedIn AND (pageIsEditable OR (pkgInfoHash.Item("dlocked") = "Y")) Then%>
                  <a href="javascript:;" onclick="MM_openBrWindow('_wform_edit_code_review_url.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','CodeReviewURLEdit','scrollbars=yes,status=yes,resizable=yes,width=930,height=185,top=0,left=0')" class="txt_linked">New<img src="images/i_new.gif" width="13" height="13" hspace="2" border="0" align="absmiddle"></a>
               <%End If%>
            </td>
         </tr>
         <%If IsNull(rsCodeReviewURL("full_url")) Then %>
            <tr>
               <td bgcolor=#f5f5f5 width="100%" class="form_item" colspan="2">
                  <span class='sublbox_txt'>No details found.</span>
               </td>
            </tr>
         <%Else%>
            <tr>
               <td bgcolor=#e4e9ec class="form_field">URL</td>
               <td bgcolor=#e4e9ec width="25%" class="form_field">Reason for Review</td>
               <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Date of Review</td>
               <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Last Modified</td>
               <td bgcolor=#e4e9ec nowrap width="18px" class="form_field"></td>
               <td bgcolor=#e4e9ec nowrap width="18px" class="form_field"></td>
            </tr>
            <%If ((NOT rsCodeReviewURL.BOF) AND (NOT rsCodeReviewURL.EOF)) Then
               While ((NOT rsCodeReviewURL.BOF) AND (NOT rsCodeReviewURL.EOF))%>
                  <tr>
                     <%If (Left(rsCodeReviewURL("url"),4) = "http") Then%>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="<%=rsCodeReviewURL("url")%>" target="_blank" class="txt_linked"><%=rsCodeReviewURL("url")%></a></td>
                     <%Else%>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="<%=rsCodeReviewURL("full_url")%>" target="_blank" class="txt_linked"><%=rsCodeReviewURL("full_url")%></a></td>
                     <%End If%>
                     <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=rsCodeReviewURL("reason")%></td>
                     <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=rsCodeReviewURL("date_of_review")%></td>
                     <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=rsCodeReviewURL("last_modified")%></td>
                     <%If (scriptName = "fixed_issues.asp") AND objAccessControl.UserLogedIn AND (pageIsEditable OR (pkgInfoHash.Item("dlocked") = "Y")) Then%>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="javascript:;" onclick="MM_openBrWindow('_wform_edit_code_review_url.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>&cr_id=<%=rsCodeReviewURL("cr_id")%>','CodeReviewURLEdit','scrollbars=no,status=yes,resizable=yes,width=930,height=185')" class="txt_linked"><img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle" alt="Edit this code review URL"></a></td>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="_remove_code_review_url.asp?cr_id=<%=rsCodeReviewURL("cr_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onclick="return confirmDelete('this code review URL from Release Manager');"><img src="images/i_delete.gif" width="13" height="12" hspace="2" border="0" alt="Delete this code review URL"></a></td>
                     <%Else%>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"></td>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"></td>
                     <%End If%>
                  </tr>
                  <%rsCodeReviewURL.MoveNext
               WEnd
            Else%>
               <tr>
                  <td bgcolor=#f5f5f5 class="form_item"></td>
                  <td bgcolor=#f5f5f5 class="form_item"></td>
                  <td bgcolor=#f5f5f5 class="form_item"></td>
                  <td bgcolor=#f5f5f5 class="form_item"></td>
                  <td bgcolor=#f5f5f5 class="form_item"></td>
                  <td bgcolor=#f5f5f5 class="form_item"></td>
               </tr>
            <%End If
         End If%>
      </table>

      <!-- Code Review URL section for last non-ripple build -->
      <%If pkgInfoHash.Item ("comments") = "Rippled Build." Then
         Call LastPvId(pkgInfoHash.Item ("pv_id"))
         While rsQry("comments") = "Rippled Build."
            Call LastPvId(rsQry("last_pv_id"))
         Wend
         Dim sOldPkgVersion
         Dim oldDlocked
         Call Get_Pkg_Short_Info ( rsQry("pv_id"), NULL, NULL, sOldPkgVersion, NULL, NULL, oldDlocked )
         Call GetCodeReviewURLs( rsQry("pv_id"), rsCodeReviewURL )
         %>
         <table width="100%" border="0" cellspacing="1" cellpadding="2">
            <tr>
               <td align="left" valign="top" class="body_colb" <%If NOT IsNull(rsCodeReviewURL("url")) Then Response.Write("colspan='6'")%>>Code Review URL for last non-ripple build (<a class="lbl_link" href="fixed_issues.asp?pv_id=<%=rsQry("pv_id")%>"><%=sOldPkgVersion%></a>)</td>
            </tr>
            <%If IsNull(rsCodeReviewURL("url")) Then%>
               <tr>
                  <td bgcolor=#f5f5f5 width="100%" class="form_item" colspan="2">
                     <span class='sublbox_txt'>No details found.</span>
                  </td>
               </tr>
            <%Else%>
               <tr>
                  <td bgcolor=#e4e9ec class="form_field">URL</td>
                  <td bgcolor=#e4e9ec width="30%" class="form_field">Reason for Review</td>
                  <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Date of Review</td>
                  <td bgcolor=#e4e9ec nowrap width="1%" class="form_field">Last Modified</td>
                  <td bgcolor=#e4e9ec nowrap width="18px" class="form_field"></td>
                  <td bgcolor=#e4e9ec nowrap width="18px" class="form_field"></td>
               </tr>
               <%If ((NOT rsCodeReviewURL.BOF) AND (NOT rsCodeReviewURL.EOF)) Then
                  While ((NOT rsCodeReviewURL.BOF) AND (NOT rsCodeReviewURL.EOF))%>
                     <tr>
                        <%If (Left(rsCodeReviewURL("url"),4) = "http") Then%>
                           <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="<%=rsCodeReviewURL("url")%>" target="_blank" class="txt_linked"><%=rsCodeReviewURL("url")%></a></td>
                        <%Else%>
                           <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="<%=rsCodeReviewURL("full_url")%>" target="_blank" class="txt_linked"><%=rsCodeReviewURL("full_url")%></a></td>
                        <%End If%>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=rsCodeReviewURL("reason")%></td>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=rsCodeReviewURL("date_of_review")%></td>
                        <td bgcolor=#f5f5f5 class="form_item" valign="top"><%=rsCodeReviewURL("last_modified")%></td>
                        <%If (scriptName = "fixed_issues.asp") AND objAccessControl.UserLogedIn AND (pageIsEditable OR (oldDlocked = "Y")) Then%>
                           <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="javascript:;" onclick="MM_openBrWindow('_wform_edit_code_review_url.asp?pv_id=<%=rsCodeReviewURL("pv_id")%>&rtag_id=<%=parRtag_id%>&cr_id=<%=rsCodeReviewURL("cr_id")%>','CodeReviewURLEdit','scrollbars=no,resizable=yes,width=930,height=185')" class="txt_linked"><img src="images/i_edit.gif" width="12" height="12" hspace="2" border="0" align="absmiddle" alt="Edit this code review URL"></a></td>
                           <td bgcolor=#f5f5f5 class="form_item" valign="top"><a href="_remove_code_review_url.asp?cr_id=<%=rsCodeReviewURL("cr_id")%>&pv_id=<%=rsCodeReviewURL("pv_id")%>&rtag_id=<%=parRtag_id%>" onclick="return confirmDelete('this code review URL from Release Manager');"><img src="images/i_delete.gif" width="13" height="12" hspace="2" border="0" alt="Delete this code review URL"></a></td>
                        <%Else%>
                           <td bgcolor=#f5f5f5 class="form_item" valign="top"></td>
                           <td bgcolor=#f5f5f5 class="form_item" valign="top"></td>
                        <%End If%>
                     </tr>
                     <%rsCodeReviewURL.MoveNext
                  WEnd
               Else%>
                  <tr>
                     <td bgcolor=#f5f5f5 class="form_item"></td>
                     <td bgcolor=#f5f5f5 class="form_item"></td>
                     <td bgcolor=#f5f5f5 class="form_item"></td>
                     <td bgcolor=#f5f5f5 class="form_item"></td>
                     <td bgcolor=#f5f5f5 class="form_item"></td>
                     <td bgcolor=#f5f5f5 class="form_item"></td>
                  </tr>
               <%End If
            End If%>
         </table>
      <%End If%>

   </fieldset>
   <br>
   <br>
<!-- ADDITIONAL NOTES ------------------------------------------------------------------------------------------------------------------->
   <fieldset class="fset"><legend class="body_colb"><img src="images/i_additional_notes.gif" width="26" height="20" hspace="4" border="0" align="absmiddle" alt="">Additional Notes</legend>
      <a name="ADDITIONAL_NOTES"></a>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <tr>
            <td align="right" valign="bottom">
               <%If pageIsEditable Then%>
                  <a href='javascript:;' onClick="MM_openBrWindow('_wform_additional_note.asp?pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','AdditionalNotes','resizable=yes,width=600,height=400')" class="txt_linked">New Note<img src="images/i_new.gif" width="13" height="13" hspace="2" border="0" align="absmiddle" alt="Add new note."></a>
               <%End If%>
            </td>
         </tr>
      </table>
      <table width="100%" border="0" cellspacing="1" cellpadding="2">
         <%Set rsQry = OraDatabase.DbCreateDynaset( SQL_Additional_Notes ( parPv_id ), cint(0))%>
         <%If rsQry.RecordCount < 1 Then%>
            <tr>
               <td class="form_field" width="100%" bgcolor=#f5f5f5>&nbsp;</td>
            </tr>
         <%End If%>
         <%While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
            <tr>
               <td width="100%" nowrap bgcolor=#e4e9ec class="body_col">
                  <%If pageIsEditable Then%>
                     <a href="javascript:;" onClick="MM_openBrWindow('_wform_update_additional_note.asp?note_id=<%=rsQry("note_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>','UpdateAN','resizable=yes,width=600,height=400')" class="body_col"><img src="images/i_edit.gif" alt="Edit" width="12" height="12" hspace="3" vspace="3" border="0" align="absmiddle"><%=To_HTML (rsQry("note_title"))%></a>
                  <%Else%>
                     <%=To_HTML (rsQry("note_title"))%>
                  <%End If%>
               </td>
               <td width="1" bgcolor=#e4e9ec>
                  <%If pageIsEditable Then%>
                     <a href="_remove_additional_note.asp?note_id=<%=rsQry("note_id")%>&pv_id=<%=parPv_id%>&rtag_id=<%=parRtag_id%>" onClick="return confirmDelete('this note');"><img src="images/i_delete.gif" alt="Remove this note." width="13" height="12" hspace="3" border="0"></a>
                  <%End If%>
               </td>
            </tr>
            <tr>
               <td colspan="2" bgcolor=#f5f5f5 class="sublbox_txt">
                  <%=NewLine_To_BR( To_HTML ( rsQry("note_body") ) )%><br><br>
                  <span class="rep_small">Last Modified: <%=rsQry("lastmod")%></span>
               </td>
            </tr>
            <tr>
               <td colspan="2"><img src='images/spacer.gif' width='2' height='2'></td>
            </tr>
            <%rsQry.MoveNext
         WEnd%>
      </table>
   </fieldset>
   <br><br>