Subversion Repositories DevTools

Rev

Rev 4169 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4169 Rev 4254
Line 9... Line 9...
9
<%
9
<%
10
Option explicit
10
Option explicit
11
' Good idea to set when using redirect
11
' Good idea to set when using redirect
12
Response.Expires = 0    ' always load the page, dont store
12
Response.Expires = 0    ' always load the page, dont store
13
%>
13
%>
14
 
-
 
15
<%
14
<%
16
'To enable the script timeout to 20 mins
15
'To enable the script timeout to 20 mins
17
Server.ScriptTimeout=1200
16
Server.ScriptTimeout=1200
18
%>
17
%>
19
<!--#include file="common/conf.asp"-->
18
<!--#include file="common/conf.asp"-->
Line 27... Line 26...
27
<%
26
<%
28
'------------ ACCESS CONTROL ------------------
27
'------------ ACCESS CONTROL ------------------
29
%>
28
%>
30
<!--#include file="_access_control_login.asp"-->
29
<!--#include file="_access_control_login.asp"-->
31
<!--#include file="_access_control_general.asp"-->
30
<!--#include file="_access_control_general.asp"-->
-
 
31
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="class/classaspJSON.vbs"></SCRIPT>
-
 
32
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="common/base64encode.vbs"></SCRIPT> 
-
 
33
<SCRIPT LANGUAGE="VBScript" RUNAT=SERVER SRC="common/jiraIssues.vbs"></SCRIPT> 
32
<%
34
<%
33
'------------ Variable Definition -------------
35
'------------ Variable Definition -------------
34
Dim rsQry
36
Dim rsQry
35
Dim objRelCollectorA
37
Dim objRelCollectorA
36
Dim objRelCollectorB
38
Dim objRelCollectorB
Line 81... Line 83...
81
    genReport = true
83
    genReport = true
82
End If
84
End If
83
If Request("btn") = "Show Me Report" Then
85
If Request("btn") = "Show Me Report" Then
84
    genReport = true
86
    genReport = true
85
End If
87
End If
86
%>
-
 
87
<%
-
 
88
'--------------------------------------------------------------------------------------------------------------------------
88
'--------------------------------------------------------------------------------------------------------------------------
89
Sub GetDiffFilterValues ( outDepFilter )
89
Sub GetDiffFilterValues ( outDepFilter )
90
    Dim FilterVal, aFilterValues
90
    Dim FilterVal, aFilterValues
91
 
91
 
92
    If Request.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER) <> "" Then
92
    If Request.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER) <> "" Then
Line 190... Line 190...
190
        Next
190
        Next
191
        sqlstrA.Close()
191
        sqlstrA.Close()
192
        NewTextFile.WriteLine( "                        </table></blockquote></blockquote></blockquote> 		")
192
        NewTextFile.WriteLine( "                        </table></blockquote></blockquote></blockquote> 		")
193
    End If
193
    End If
194
    
194
    
195
    '
-
 
196
    ' Must also handle Jira Issues
195
    ' Must also handle Jira Issues
-
 
196
    On Error Resume Next
197
    '
197
 
198
    Dim SQLstr
198
    Dim issueInfo, el, key
199
    retVal = Get_JIRA_Package_Issues ( pv_id, SQLstr )
199
    Set issueInfo = CreateObject( "Scripting.Dictionary" )
200
    ' Debug ... NewTextFile.WriteLine("<blockquote><blockquote>Jira Issues:"&retVal&":"&pv_id&"</blockquote></blockquote>")
200
    Call getJiraIssueDetails(pv_id, issueInfo, 1)
201
    If retVal > 0 Then
201
    If issueInfo.Count > 0 Then
202
        retVal = Get_JIRA_Issues ( SQLstr, rsCQ )
202
        ' Table Header
203
        If (retVal = 0 AND rsCQ.RecordCount > 0) Then
-
 
204
            NewTextFile.WriteLine()
203
        NewTextFile.WriteLine()
205
            NewTextFile.WriteLine("<blockquote><blockquote>Jira Issues:</blockquote></blockquote>")
204
        NewTextFile.WriteLine("<blockquote><blockquote>Jira Issues:</blockquote></blockquote>")
206
            NewTextFile.WriteLine("<blockquote><blockquote><blockquote><table class='fixed_issues' width='100%'>")
205
        NewTextFile.WriteLine("<blockquote><blockquote><blockquote><table class='fixed_issues' width='100%'>")
-
 
206
        NewTextFile.WriteLine("<tr>")
-
 
207
        NewTextFile.WriteLine("<td width='8%' class='form_field'>Issue Id</td>")
-
 
208
        NewTextFile.WriteLine("<td width='58%' class='form_field'>Summary</td>")
-
 
209
        NewTextFile.WriteLine("<td width='8%' class='form_field'>Issue Type</td>")
-
 
210
        NewTextFile.WriteLine("<td width='10%' class='form_field'>Priority</td>")
-
 
211
        NewTextFile.WriteLine("<td width='8%' class='form_field'>Status</td>")
-
 
212
        NewTextFile.WriteLine("<td width='8%' class='form_field'>Resolution</td>")
-
 
213
        NewTextFile.WriteLine("</tr>")
-
 
214
 
-
 
215
        ' Table Body
-
 
216
        For Each key In issueInfo
-
 
217
            Set el = issueInfo.item(key)
-
 
218
 
207
            NewTextFile.WriteLine("<tr>")
219
            NewTextFile.WriteLine("<tr>")
208
            NewTextFile.WriteLine("<td width='8%' class='form_field'>Issue Id</td>")
220
            NewTextFile.WriteLine("<td nowrap class='form_item'>"&key&"</td>")
209
            NewTextFile.WriteLine("<td width='58%' class='form_field'>Summary</td>")
221
            NewTextFile.WriteLine("<td class='form_item'>"&NewLine_To_BR ( To_HTML ( el.item("summary") ) )&"</td>")
210
            NewTextFile.WriteLine("<td width='8%' class='form_field'>Issue Type</td>")
222
            NewTextFile.WriteLine("<td class='form_item'>"&el.item("issuetype")&"</td>")
211
            NewTextFile.WriteLine("<td width='10%' class='form_field'>Priority</td>")
223
            NewTextFile.WriteLine("<td class='form_item'>"&el.item("priority")&"</td>")
212
            NewTextFile.WriteLine("<td width='8%' class='form_field'>Status</td>")
224
            NewTextFile.WriteLine("<td class='form_item'>"&el.item("status")&"</td>")
213
            NewTextFile.WriteLine("<td width='8%' class='form_field'>Resolution</td>")
225
            NewTextFile.WriteLine("<td class='form_item'>"&el.item("resolution")&"</td>")
214
            NewTextFile.WriteLine("</tr>")
226
            NewTextFile.WriteLine("</tr>")
215
 
-
 
216
            While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))
-
 
217
                NewTextFile.WriteLine("<tr>")
-
 
218
                NewTextFile.WriteLine("<td nowrap class='form_item'>"&rsCQ("project")&"-"&rsCQ("iss_num")&"</td>")
-
 
219
                NewTextFile.WriteLine("<td class='form_item'>"&NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )&"</td>")
-
 
220
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("issue_type")&"</td>")
-
 
221
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("priority")&"</td>")
-
 
222
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("Status")&"</td>")
-
 
223
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("RESOLUTION")&"</td>")
-
 
224
                NewTextFile.WriteLine("</tr>")
-
 
225
 
-
 
226
                rsCQ.MoveNext
-
 
227
            Wend
227
        Next
228
            NewTextFile.WriteLine( "                        </table></blockquote></blockquote></blockquote> 		")
228
        NewTextFile.WriteLine( "                        </table></blockquote></blockquote></blockquote> 		")
229
        End If
-
 
230
        rsCQ.Close()
229
    Set issueInfo = nothing
231
    End If
230
    End If
232
End Sub
231
End Sub
233
'--------------------------------------------------------------------------------------------------------------------------
232
'--------------------------------------------------------------------------------------------------------------------------
234
Sub LastPvIdA(a)
233
Sub LastPvIdA(a)
235
 
234
 
Line 482... Line 481...
482
        Is_Pending_Sub = Get_Record_Count( "PLANNED pl WHERE pl.rtag_id = " & NNrtag_id & " AND pl.pv_id = " & NNpv_id & " AND pl.operation = 'S'" )
481
        Is_Pending_Sub = Get_Record_Count( "PLANNED pl WHERE pl.rtag_id = " & NNrtag_id & " AND pl.pv_id = " & NNpv_id & " AND pl.operation = 'S'" )
483
    End If
482
    End If
484
End Function
483
End Function
485
 
484
 
486
'--------------------------------------------------------------------------------------------------------------------------
485
'--------------------------------------------------------------------------------------------------------------------------
487
 
-
 
488
 
-
 
489
Sub MergePackages (releaseMode)
486
Sub MergePackages (releaseMode)
490
    Dim aFullList, aAddPkgList, aRemovePkgList, dAddPkgList, dRemovePkgList, PvId
487
    Dim aFullList, aAddPkgList, aRemovePkgList, dAddPkgList, dRemovePkgList, PvId
491
    Dim OraParameter
488
    Dim OraParameter
492
    Dim rc
489
    Dim rc
493
 
490
 
Line 639... Line 636...
639
    next
636
    next
640
    s = cstr(n) & s
637
    s = cstr(n) & s
641
 
638
 
642
    AddTrailingZeros = s
639
    AddTrailingZeros = s
643
End function
640
End function
644
'----------------------------------------------------------------------------------------------------------------------------------------
-
 
645
' Function returns the number of imported jira issues
-
 
646
' and builds a string suitable for querying the jira issues database
-
 
647
Function Get_JIRA_Package_Issues ( NNpv_id, SSsql )
-
 
648
   Dim rsTemp, sqlstr, JIRAIss, retVal, joiner
-
 
649
 
-
 
650
   JIRAIss = ""
-
 
651
   joiner = ""
-
 
652
 
-
 
653
   sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id
-
 
654
 
-
 
655
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
-
 
656
   retVal = rsTemp.RecordCount
-
 
657
 
-
 
658
    if retVal > 0 then
-
 
659
 
-
 
660
       ' Convert the Jira Issue of the form (PRJ-NNNN) into parts of an SQL expression
-
 
661
       ' that looks like (PRJ = match AND NNNN = match
-
 
662
       '
-
 
663
       While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
-
 
664
          dim bits
-
 
665
          bits = Split( rsTemp("iss_key"), "-" ,2)
-
 
666
          JIRAIss = JIRAIss & joiner & "(P.pkey = '" & bits(0) & "' AND I.issuenum = " & bits(1) & ")"
-
 
667
          joiner = " OR "
-
 
668
          rsTemp.MoveNext
-
 
669
       WEnd
-
 
670
 
-
 
671
       ' If there is no resolution for an issue, then it will not be picked up by this query
-
 
672
       SSsql = "SELECT P.pkey AS project, I.issuenum AS iss_num, I.summary, ISS.pname AS Status,  IT.pname as issue_type, PR.pname as Priority, R.PNAME as RESOLUTION"&_
-
 
673
               " FROM jiraissue I, issuestatus ISS, issuetype IT, resolution R, priority PR, project P "&_
-
 
674
               " WHERE (" & JIRAIss & ")"&_
-
 
675
               " AND I.issuestatus = ISS.ID "&_
-
 
676
               " AND I.RESOLUTION = R.ID "&_
-
 
677
               " AND IT.ID = I.issuetype "&_
-
 
678
               " AND PR.ID = I.PRIORITY " &_
-
 
679
               " AND P.ID  = I.project"
-
 
680
 
-
 
681
   End If
-
 
682
   rsTemp.Close()
-
 
683
   Set rsTemp = nothing
-
 
684
 
-
 
685
   Get_JIRA_Package_Issues = retVal
-
 
686
 
-
 
687
End Function
-
 
688
 
-
 
689
'----------------------------------------------------------------------------------------------------------------------------------------
-
 
690
Function  Get_JIRA_Issues ( SSsql, OOrsCQ )
-
 
691
   If OOrsCQ.State = 1 Then
-
 
692
      OOrsCQ.Close()
-
 
693
   End If
-
 
694
 
-
 
695
   On Error Resume Next
-
 
696
   OOrsCQ.ActiveConnection = JIRA_conn
-
 
697
   OOrsCQ.Source = SSsql
-
 
698
   OOrsCQ.CursorType = 0
-
 
699
   OOrsCQ.CursorLocation = 3
-
 
700
   OOrsCQ.LockType = 3
-
 
701
   OOrsCQ.Open()
-
 
702
 
-
 
703
   Get_JIRA_Issues = Err.Number
-
 
704
 
-
 
705
End Function
-
 
706
'--------------------------------------------------------------------------------------------------------------------------
641
'--------------------------------------------------------------------------------------------------------------------------
707
%>
-
 
708
<%
-
 
709
'------------ RUN BEFORE PAGE RENDER ----------
642
'------------ RUN BEFORE PAGE RENDER ----------
710
If Request("btn") = "Exit" Then
643
If Request("btn") = "Exit" Then
711
    Call OpenInWindow ( "index.asp" )
644
    Call OpenInWindow ( "index.asp" )
712
End If
645
End If
713
 
646
 
Line 727... Line 660...
727
If Request("btn") = "Hide" Then
660
If Request("btn") = "Hide" Then
728
    ' Store filter in cookie
661
    ' Store filter in cookie
729
    Response.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER) = Request("difilter")
662
    Response.Cookies(enum_RELMGR_COOKIE_DOMAIN)(COOKIE_HIDE_DIFF_FILTER) = Request("difilter")
730
End If
663
End If
731
 
664
 
732
 
-
 
733
Call GetDiffFilterValues ( dDiffFilter )
665
Call GetDiffFilterValues ( dDiffFilter )
734
'----------------------------------------------
666
'----------------------------------------------
735
%>
667
%>
736
<html>
668
<html>
737
<head>
669
<head>