| Line 181... |
Line 181... |
| 181 |
|
181 |
|
| 182 |
End If
|
182 |
End If
|
| 183 |
|
183 |
|
| 184 |
End Function
|
184 |
End Function
|
| 185 |
'----------------------------------------------------------------------------------------------------------------------------------------
|
185 |
'----------------------------------------------------------------------------------------------------------------------------------------
|
| - |
|
186 |
Function Get_JIRA_Issues ( NNpv_id, SSsql )
|
| - |
|
187 |
Dim rsTemp, sqlstr, JIRAIss, retVal, joiner
|
| - |
|
188 |
|
| - |
|
189 |
JIRAIss = ""
|
| - |
|
190 |
joiner = ""
|
| - |
|
191 |
|
| - |
|
192 |
sqlstr = "SELECT iss_key FROM JIRA_ISSUES WHERE pv_id="& NNpv_id
|
| - |
|
193 |
|
| - |
|
194 |
Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
|
| - |
|
195 |
retVal = rsTemp.RecordCount
|
| - |
|
196 |
|
| - |
|
197 |
if retVal > 0 then
|
| - |
|
198 |
|
| - |
|
199 |
' Convert the Jira Issue of the form (PRJ-NNNN) into parts of an SQL expression
|
| - |
|
200 |
' that looks like (PRJ = match AND NNNN = match
|
| - |
|
201 |
'
|
| - |
|
202 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| - |
|
203 |
dim bits
|
| - |
|
204 |
bits = Split( rsTemp("iss_key"), "-" ,2)
|
| - |
|
205 |
JIRAIss = JIRAIss & joiner & "(P.pkey = '" & bits(0) & "' AND I.issuenum = " & bits(1) & ")"
|
| - |
|
206 |
joiner = " OR "
|
| - |
|
207 |
rsTemp.MoveNext
|
| - |
|
208 |
WEnd
|
| - |
|
209 |
|
| - |
|
210 |
' If there is no resolution for an issue, then it will not be picked up by this query
|
| - |
|
211 |
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"&_
|
| - |
|
212 |
" FROM jiraissue I, issuestatus ISS, issuetype IT, resolution R, priority PR, project P "&_
|
| - |
|
213 |
" WHERE (" & JIRAIss & ")"&_
|
| - |
|
214 |
" AND I.issuestatus = ISS.ID "&_
|
| - |
|
215 |
" AND I.RESOLUTION = R.ID "&_
|
| - |
|
216 |
" AND IT.ID = I.issuetype "&_
|
| - |
|
217 |
" AND PR.ID = I.PRIORITY " &_
|
| - |
|
218 |
" AND P.ID = I.project"
|
| - |
|
219 |
|
| - |
|
220 |
End If
|
| - |
|
221 |
rsTemp.Close()
|
| - |
|
222 |
Set rsTemp = nothing
|
| - |
|
223 |
|
| - |
|
224 |
On Error Resume Next
|
| - |
|
225 |
oRsJiraIssTemp.ActiveConnection = JIRA_conn
|
| - |
|
226 |
oRsJiraIssTemp.Source = jira_query_string
|
| - |
|
227 |
oRsJiraIssTemp.CursorType = 0
|
| - |
|
228 |
oRsJiraIssTemp.CursorLocation = 3
|
| - |
|
229 |
oRsJiraIssTemp.LockType = 3
|
| - |
|
230 |
oRsJiraIssTemp.Open()
|
| - |
|
231 |
|
| - |
|
232 |
Get_JIRA_Issues = Err.Number
|
| - |
|
233 |
|
| - |
|
234 |
Get_JIRA_Issues = retVal
|
| - |
|
235 |
|
| - |
|
236 |
End Function
|
| - |
|
237 |
|
| 186 |
Function Get_JIRA_Issues ( sPvIdList, oRsJiraIssTemp )
|
238 |
Function Get_JIRA_Issues ( sPvIdList, oRsJiraIssTemp )
|
| 187 |
|
239 |
|
| 188 |
Dim rsTemp, JIRAIss
|
240 |
Dim rsTemp, JIRAIss
|
| 189 |
Dim jira_query_string
|
241 |
Dim jira_query_string, joiner
|
| 190 |
|
242 |
|
| 191 |
JIRAIss = "'-1'"
|
243 |
JIRAIss = ""
|
| - |
|
244 |
joiner = ""
|
| 192 |
|
245 |
|
| 193 |
Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT DISTINCT iss_key FROM JIRA_ISSUES WHERE pv_id IN ("& sPvIdList & ")", cint(0))
|
246 |
Set rsTemp = OraDatabase.DbCreateDynaset( "SELECT DISTINCT iss_key FROM JIRA_ISSUES WHERE pv_id IN ("& sPvIdList & ")", cint(0))
|
| 194 |
If rsTemp.RecordCount <> 0 Then
|
247 |
If rsTemp.RecordCount <> 0 Then
|
| 195 |
|
248 |
|
| 196 |
' Get iss_key's into a CSV list for use in the query to be submitted to the JIRA database
|
249 |
' Convert the Jira Issue of the form (PRJ-NNNN) into parts of an SQL expression
|
| - |
|
250 |
' that looks like (PRJ = match AND NNNN = match
|
| - |
|
251 |
'
|
| 197 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
252 |
while ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| - |
|
253 |
dim bits
|
| 198 |
JIRAIss = JIRAIss &",'"& rsTemp("iss_key")&"'"
|
254 |
bits = Split( rsTemp("iss_key"), "-" ,2)
|
| - |
|
255 |
JIRAIss = JIRAIss & joiner & "(P.pkey = '" & bits(0) & "' AND I.issuenum = " & bits(1) & ")"
|
| - |
|
256 |
joiner = " OR "
|
| 199 |
rsTemp.MoveNext
|
257 |
rsTemp.MoveNext
|
| 200 |
WEnd
|
258 |
WEnd
|
| 201 |
|
259 |
|
| 202 |
rsTemp.Close()
|
260 |
rsTemp.Close()
|
| 203 |
Set rsTemp = nothing
|
261 |
Set rsTemp = nothing
|
| 204 |
|
262 |
|
| 205 |
' Form the JIRA database query string
|
263 |
' Form the JIRA database query string
|
| 206 |
jira_query_string = "SELECT I.pkey AS iss_num, I.summary, ISS.pname AS state, IT.pname as IssueType, PR.pname as Priority, I.RESOLUTION "&_
|
264 |
jira_query_string = "SELECT P.pkey AS project, I.issuenum AS iss_num, I.summary, ISS.pname AS state, IT.pname as IssueType, PR.pname as Priority, I.RESOLUTION "&_
|
| 207 |
" FROM jiraissue I, issuestatus ISS, issuetype IT, priority PR "&_
|
265 |
" FROM jiraissue I, issuestatus ISS, issuetype IT, priority PR, project P "&_
|
| 208 |
" WHERE I.pkey IN ("& JIRAIss &") "&_
|
266 |
" WHERE (" & JIRAIss & ")"&_
|
| 209 |
" AND I.issuestatus = ISS.ID "&_
|
267 |
" AND I.issuestatus = ISS.ID "&_
|
| 210 |
" AND IT.ID = I.issuetype "&_
|
268 |
" AND IT.ID = I.issuetype "&_
|
| - |
|
269 |
" AND P.ID = I.project" &_
|
| 211 |
" AND PR.ID = I.PRIORITY "
|
270 |
" AND PR.ID = I.PRIORITY "
|
| 212 |
|
271 |
|
| 213 |
If oRsJiraIssTemp.State = 1 Then
|
272 |
If oRsJiraIssTemp.State = 1 Then
|
| 214 |
oRsJiraIssTemp.Close()
|
273 |
oRsJiraIssTemp.Close()
|
| 215 |
End If
|
274 |
End If
|
| Line 697... |
Line 756... |
| 697 |
</tr>
|
756 |
</tr>
|
| 698 |
|
757 |
|
| 699 |
<%
|
758 |
<%
|
| 700 |
While (NOT jiraIssues.BOF) AND (NOT jiraIssues.EOF)
|
759 |
While (NOT jiraIssues.BOF) AND (NOT jiraIssues.EOF)
|
| 701 |
|
760 |
|
| 702 |
Call GetPackageDetailsForJIRAIssue( jiraIssues("iss_num"), pvIdList, objIssueDetails )
|
761 |
Call GetPackageDetailsForJIRAIssue( jiraIssues("project") &"-"& jiraIssues("iss_num"), pvIdList, objIssueDetails )
|
| 703 |
|
762 |
|
| 704 |
firstPackageRow = TRUE
|
763 |
firstPackageRow = TRUE
|
| 705 |
Do While (NOT objIssueDetails.BOF) AND (NOT objIssueDetails.EOF)%>
|
764 |
Do While (NOT objIssueDetails.BOF) AND (NOT objIssueDetails.EOF)%>
|
| 706 |
<tr>
|
765 |
<tr>
|
| 707 |
<%If firstPackageRow Then%>
|
766 |
<%If firstPackageRow Then%>
|
| 708 |
<%firstPackageRow = FALSE%>
|
767 |
<%firstPackageRow = FALSE%>
|
| 709 |
<td background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("iss_num")%></td>
|
768 |
<td background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("project") &"-"&jiraIssues("iss_num")%></td>
|
| 710 |
<td background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("summary")%></td>
|
769 |
<td background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("summary")%></td>
|
| 711 |
<td nowrap background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("IssueType")%></td>
|
770 |
<td nowrap background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("IssueType")%></td>
|
| 712 |
<td nowrap background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("state")%></td>
|
771 |
<td nowrap background="images/bg_form_lightgray.gif" valign="top" class="form_item"><%=jiraIssues("state")%></td>
|
| 713 |
<%Else%>
|
772 |
<%Else%>
|
| 714 |
<td background="images/bg_form_lightgray.gif" valign="top" class="form_item"></td>
|
773 |
<td background="images/bg_form_lightgray.gif" valign="top" class="form_item"></td>
|