Subversion Repositories DevTools

Rev

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

Rev 4027 Rev 4177
Line 220... Line 220...
220
                NewTextFile.WriteLine("<td width='8%' class='form_field'>Resolution</td>")
220
                NewTextFile.WriteLine("<td width='8%' class='form_field'>Resolution</td>")
221
                NewTextFile.WriteLine("</tr>")
221
                NewTextFile.WriteLine("</tr>")
222
 
222
 
223
                While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))
223
                While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF))
224
                    NewTextFile.WriteLine("<tr>")
224
                    NewTextFile.WriteLine("<tr>")
225
                    NewTextFile.WriteLine("<td nowrap class='form_item'>"&rsCQ("iss_num")&"</td>")
225
                    NewTextFile.WriteLine("<td nowrap class='form_item'>"&rsCQ("project")&"-"&rsCQ("iss_num")&"</td>")
226
                    NewTextFile.WriteLine("<td class='form_item'>"&NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )&"</td>")
226
                    NewTextFile.WriteLine("<td class='form_item'>"&NewLine_To_BR ( To_HTML ( rsCQ("summary") ) )&"</td>")
227
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("issue_type")&"</td>")
227
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("issue_type")&"</td>")
228
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("priority")&"</td>")
228
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("priority")&"</td>")
229
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("Status")&"</td>")
229
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("Status")&"</td>")
230
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("RESOLUTION")&"</td>")
230
                    NewTextFile.WriteLine("<td class='form_item'>"&rsCQ("RESOLUTION")&"</td>")
Line 493... Line 493...
493
 
493
 
494
'----------------------------------------------------------------------------------------------------------------------------------------
494
'----------------------------------------------------------------------------------------------------------------------------------------
495
' Function returns the number of imported jira issues
495
' Function returns the number of imported jira issues
496
' and builds a string suitable for querying the jira issues database
496
' and builds a string suitable for querying the jira issues database
497
Function Get_JIRA_Package_Issues ( NNpv_id, SSsql )
497
Function Get_JIRA_Package_Issues ( NNpv_id, SSsql )
498
   Dim rsTemp, sqlstr, JIRAIss, retVal
498
   Dim rsTemp, sqlstr, JIRAIss, retVal, joiner
-
 
499
 
-
 
500
   JIRAIss = ""
-
 
501
   joiner = ""
499
 
502
 
500
   JIRAIss = "'-1'"
-
 
501
   sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id
503
   sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id
502
 
504
 
503
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
505
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
504
   retVal = rsTemp.RecordCount
506
   retVal = rsTemp.RecordCount
505
 
507
 
-
 
508
    if retVal > 0 then
-
 
509
 
-
 
510
       ' Convert the Jira Issue of the form (PRJ-NNNN) into parts of an SQL expression
-
 
511
       ' that looks like (PRJ = match AND NNNN = match
-
 
512
       '
506
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
513
       While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
-
 
514
          dim bits
507
      JIRAIss = JIRAIss &",'"& rsTemp("iss_key")&"'"
515
          bits = Split( rsTemp("iss_key"), "-" ,2)
-
 
516
          JIRAIss = JIRAIss & joiner & "(P.pkey = '" & bits(0) & "' AND I.issuenum = " & bits(1) & ")"
-
 
517
          joiner = " OR "
508
      rsTemp.MoveNext
518
          rsTemp.MoveNext
509
   WEnd
519
       WEnd
510
 
520
 
-
 
521
       ' If there is no resolution for an issue, then it will not be picked up by this query
511
   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"&_
522
       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"&_
512
           " FROM jiraissue I, issuestatus ISS, issuetype IT, resolution R, priority PR "&_
523
               " FROM jiraissue I, issuestatus ISS, issuetype IT, resolution R, priority PR, project P "&_
513
           " WHERE I.pkey IN ("& JIRAIss &") "&_
524
               " WHERE (" & JIRAIss & ")"&_
514
           " AND I.issuestatus = ISS.ID "&_
525
               " AND I.issuestatus = ISS.ID "&_
515
           " AND I.RESOLUTION = R.ID "&_
526
               " AND I.RESOLUTION = R.ID "&_
516
           " AND IT.ID = I.issuetype "&_
527
               " AND IT.ID = I.issuetype "&_
517
           " AND PR.ID = I.PRIORITY "
528
               " AND PR.ID = I.PRIORITY " &_
-
 
529
               " AND P.ID  = I.project"
518
 
530
 
-
 
531
   End If
519
   rsTemp.Close()
532
   rsTemp.Close()
520
   Set rsTemp = nothing
533
   Set rsTemp = nothing
521
 
534
 
522
   Get_JIRA_Package_Issues = retVal
535
   Get_JIRA_Package_Issues = retVal
523
 
536