Subversion Repositories DevTools

Rev

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

Rev 4028 Rev 4169
Line 213... Line 213...
213
            NewTextFile.WriteLine("<td width='8%' class='form_field'>Resolution</td>")
213
            NewTextFile.WriteLine("<td width='8%' class='form_field'>Resolution</td>")
214
            NewTextFile.WriteLine("</tr>")
214
            NewTextFile.WriteLine("</tr>")
215
 
215
 
216
            While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))
216
            While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))
217
                NewTextFile.WriteLine("<tr>")
217
                NewTextFile.WriteLine("<tr>")
218
                NewTextFile.WriteLine("<td nowrap class='form_item'>"&rsCQ("iss_num")&"</td>")
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>")
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>")
220
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("issue_type")&"</td>")
221
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("priority")&"</td>")
221
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("priority")&"</td>")
222
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("Status")&"</td>")
222
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("Status")&"</td>")
223
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("RESOLUTION")&"</td>")
223
                NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("RESOLUTION")&"</td>")
Line 643... Line 643...
643
End function
643
End function
644
'----------------------------------------------------------------------------------------------------------------------------------------
644
'----------------------------------------------------------------------------------------------------------------------------------------
645
' Function returns the number of imported jira issues
645
' Function returns the number of imported jira issues
646
' and builds a string suitable for querying the jira issues database
646
' and builds a string suitable for querying the jira issues database
647
Function Get_JIRA_Package_Issues ( NNpv_id, SSsql )
647
Function Get_JIRA_Package_Issues ( NNpv_id, SSsql )
648
   Dim rsTemp, sqlstr, JIRAIss, retVal
648
   Dim rsTemp, sqlstr, JIRAIss, retVal, joiner
-
 
649
 
-
 
650
   JIRAIss = ""
-
 
651
   joiner = ""
649
 
652
 
650
   JIRAIss = "'-1'"
-
 
651
   sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id
653
   sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id
652
 
654
 
653
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
655
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
654
   retVal = rsTemp.RecordCount
656
   retVal = rsTemp.RecordCount
655
 
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
       '
656
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
663
       While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
-
 
664
          dim bits
657
      JIRAIss = JIRAIss &",'"& rsTemp("iss_key")&"'"
665
          bits = Split( rsTemp("iss_key"), "-" ,2)
-
 
666
          JIRAIss = JIRAIss & joiner & "(P.pkey = '" & bits(0) & "' AND I.issuenum = " & bits(1) & ")"
-
 
667
          joiner = " OR "
658
      rsTemp.MoveNext
668
          rsTemp.MoveNext
659
   WEnd
669
       WEnd
660
 
670
 
-
 
671
       ' If there is no resolution for an issue, then it will not be picked up by this query
661
   SSsql = "SELECT I.pkey AS iss_num, I.summary, ISS.pname AS Status,  IT.pname as issue_type, PR.pname as Priority, R.PNAME as RESOLUTION"&_
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"&_
662
           " FROM jiraissue I, issuestatus ISS, issuetype IT, resolution R, priority PR "&_
673
               " FROM jiraissue I, issuestatus ISS, issuetype IT, resolution R, priority PR, project P "&_
663
           " WHERE I.pkey IN ("& JIRAIss &") "&_
674
               " WHERE (" & JIRAIss & ")"&_
664
           " AND I.issuestatus = ISS.ID "&_
675
               " AND I.issuestatus = ISS.ID "&_
665
           " AND I.RESOLUTION = R.ID "&_
676
               " AND I.RESOLUTION = R.ID "&_
666
           " AND IT.ID = I.issuetype "&_
677
               " AND IT.ID = I.issuetype "&_
667
           " AND PR.ID = I.PRIORITY "
678
               " AND PR.ID = I.PRIORITY " &_
-
 
679
               " AND P.ID  = I.project"
668
 
680
 
-
 
681
   End If
669
   rsTemp.Close()
682
   rsTemp.Close()
670
   Set rsTemp = nothing
683
   Set rsTemp = nothing
671
 
684
 
672
   Get_JIRA_Package_Issues = retVal
685
   Get_JIRA_Package_Issues = retVal
673
 
686