| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
Option explicit
|
| 129 |
ghuddy |
4 |
Response.Expires = 0 ' always load the page, dont store
|
| 119 |
ghuddy |
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'=====================================================
|
| 129 |
ghuddy |
8 |
' Import Issues
|
| 119 |
ghuddy |
9 |
'=====================================================
|
|
|
10 |
%>
|
|
|
11 |
<!--#include file="common/conf.asp"-->
|
|
|
12 |
<!--#include file="common/globals.asp"-->
|
|
|
13 |
<!--#include file="common/qstr.asp"-->
|
|
|
14 |
<!--#include file="common/common_subs.asp"-->
|
|
|
15 |
<!--#include file="common/common_dbedit.asp"-->
|
|
|
16 |
<!--#include file="common/formating.asp"-->
|
|
|
17 |
<!--#include file="common/_popup_window_common.asp"-->
|
|
|
18 |
<%
|
|
|
19 |
' Set rfile parameter. This is a return page after Login
|
|
|
20 |
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
|
|
|
21 |
'------------ ACCESS CONTROL ------------------
|
|
|
22 |
%>
|
|
|
23 |
<!--#include file="_access_control_login.asp"-->
|
|
|
24 |
<!--#include file="_access_control_general.asp"-->
|
|
|
25 |
<!--#include file="_access_control_project.asp"-->
|
|
|
26 |
<%
|
|
|
27 |
'------------ Variable Definition -------------
|
|
|
28 |
Dim parPv_id
|
|
|
29 |
Dim parFRiss_db
|
|
|
30 |
Dim parFRiss_id
|
|
|
31 |
Dim parFRiss_num
|
| 171 |
brianf |
32 |
Dim parFRpkey
|
| 119 |
ghuddy |
33 |
Dim rsCQ
|
| 129 |
ghuddy |
34 |
Dim rspPage ' current page number for multiple page results
|
|
|
35 |
Dim rspTotal ' total number of records
|
|
|
36 |
Dim rspCount ' Record counter
|
|
|
37 |
Dim rspTotalPages ' Total number of pages required to display results
|
| 119 |
ghuddy |
38 |
Dim imported
|
|
|
39 |
Dim retVal
|
|
|
40 |
Dim rsCQTemp
|
|
|
41 |
Dim SQLstr
|
|
|
42 |
Dim parPackage
|
|
|
43 |
Dim parProject
|
|
|
44 |
Dim parProduct
|
|
|
45 |
Dim parSkipOpen
|
|
|
46 |
Dim disabled
|
|
|
47 |
Dim IsOptionUsed
|
|
|
48 |
Dim parCategMain
|
|
|
49 |
Dim parCategMinor
|
|
|
50 |
Dim parIStates
|
|
|
51 |
Dim parTitle
|
|
|
52 |
Dim oIStates
|
|
|
53 |
Dim checked
|
|
|
54 |
'------------ Constants Declaration -----------
|
| 129 |
ghuddy |
55 |
Const rspMax = 100 ' maximum number of records displayed
|
| 119 |
ghuddy |
56 |
Const LENUM_ALL = "ALL"
|
|
|
57 |
Const LCONST_STAR = "*"
|
|
|
58 |
'------------ Variable Init -------------------
|
|
|
59 |
parPv_id = Request("pv_id")
|
|
|
60 |
parRtag_id = Request("rtag_id")
|
|
|
61 |
rspPage = Request("rpg")
|
|
|
62 |
parFRiss_db = Request("FRiss_db")
|
|
|
63 |
parFRiss_id = Request("FRiss_id")
|
|
|
64 |
parFRiss_num = Request("FRiss_num")
|
|
|
65 |
parPackage = Request("package")
|
|
|
66 |
parProject = Request("project")
|
|
|
67 |
parProduct = Request("product")
|
|
|
68 |
parCategMain = Request("categmain")
|
|
|
69 |
parCategMinor = Request("categminor")
|
|
|
70 |
parSkipOpen = Request("skip_open")
|
|
|
71 |
parIStates = Request("istates")
|
|
|
72 |
parTitle = Request("title")
|
| 171 |
brianf |
73 |
parFRpkey = Request("FRpkey")
|
| 119 |
ghuddy |
74 |
|
|
|
75 |
Set rsCQ = Server.CreateObject("ADODB.Recordset")
|
|
|
76 |
|
|
|
77 |
imported = FALSE
|
|
|
78 |
IsOptionUsed = FALSE
|
|
|
79 |
'-- CONDITIONS --------------------------------
|
|
|
80 |
If rspPage = "" Then rspPage = 1
|
|
|
81 |
If ( Request("btn") = "Filter" ) OR ( Request("btn") = "Find" ) Then rspPage = 1
|
|
|
82 |
If (parFRiss_num = "") Then parFRiss_num = LENUM_ALL
|
| 171 |
brianf |
83 |
|
|
|
84 |
If (parFRpkey = "") Then
|
|
|
85 |
parFRpkey = GetDefaultProjectKey(Request("rtag_id"))
|
|
|
86 |
if parFRpkey="" OR IsNull(parFRpkey) Then parFRpkey = LENUM_ALL
|
|
|
87 |
End If
|
|
|
88 |
|
| 119 |
ghuddy |
89 |
If (parTitle = "") Then parTitle = LCONST_STAR ' Default
|
|
|
90 |
|
| 129 |
ghuddy |
91 |
If parFRiss_db = "" Then parFRiss_db = enumCLEARQUEST_DEVI_ID ' Default
|
| 119 |
ghuddy |
92 |
|
|
|
93 |
If CInt(parFRiss_db) = enumCLEARQUEST_DEVI_ID Then
|
| 129 |
ghuddy |
94 |
If (parPackage <> "") OR (parProject <> "") OR (parProduct <> "") OR (parTitle <> LCONST_STAR) Then IsOptionUsed = TRUE
|
| 119 |
ghuddy |
95 |
Else
|
| 129 |
ghuddy |
96 |
If (parCategMain <> "") OR (parCategMinor <> "") Then IsOptionUsed = TRUE
|
| 119 |
ghuddy |
97 |
End If
|
|
|
98 |
|
|
|
99 |
' Get DEVI issue states checked
|
|
|
100 |
Set oIStates = GetIStates()
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
'----------------------------------------------
|
|
|
104 |
'Response.write "parPackage="& parPackage &", parProject="& parProject &", parProduct="& parProduct &", parSkipOpen="& parSkipOpen &"<br>"
|
|
|
105 |
'Response.write "parPv_id="& parPv_id &", parRtag_id="& parRtag_id &", rspPage="& rspPage &", parFRiss_db="& parFRiss_db &", parFRiss_id="& parFRiss_id &", parFRiss_num="& parFRiss_num
|
|
|
106 |
'Response.write "parIStates="& parIStates &", parSkipOpen="& parSkipOpen
|
|
|
107 |
%>
|
|
|
108 |
<%
|
|
|
109 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
110 |
Function GetIStates()
|
| 129 |
ghuddy |
111 |
Dim IStates, aStates, stateId
|
|
|
112 |
Set IStates = CreateObject("Scripting.Dictionary")
|
|
|
113 |
|
|
|
114 |
If parIStates = "" Then
|
|
|
115 |
IStates.Item ("ALL") = "checked"
|
|
|
116 |
Else
|
|
|
117 |
|
|
|
118 |
aStates = Split( Replace( parIStates, " ", "" ), ",")
|
|
|
119 |
|
|
|
120 |
For Each stateId In aStates
|
|
|
121 |
IStates.Item (CStr(stateId)) = "checked"
|
|
|
122 |
Next
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
End If
|
|
|
126 |
|
|
|
127 |
Set GetIStates = IStates
|
|
|
128 |
|
| 119 |
ghuddy |
129 |
End Function
|
| 171 |
brianf |
130 |
|
| 119 |
ghuddy |
131 |
'------------------------------------------------------------------------------------------------------------------------------------
|
| 171 |
brianf |
132 |
Function Get_Issues ( NNiss_db, NNiss_num, NNrecordCount, OOrsCQ, apkey)
|
| 129 |
ghuddy |
133 |
Dim SQLstr, issARR, iss_num, col_name, Title
|
| 119 |
ghuddy |
134 |
|
| 129 |
ghuddy |
135 |
|
|
|
136 |
|
|
|
137 |
'If CInt(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
|
|
|
138 |
' SQLstr = _
|
|
|
139 |
' " SELECT si.dbid AS iss_id, si.new_num AS iss_num, si.headline AS summary, sd.NAME AS state"&_
|
| 159 |
ghuddy |
140 |
' " FROM CQ_DEVI.admin.software_issue si,"&_
|
|
|
141 |
' " CQ_DEVI.admin.STATEDEF sd"&_
|
| 129 |
ghuddy |
142 |
' " WHERE si.STATE = sd.ID "
|
|
|
143 |
|
|
|
144 |
'ElseIf ( CInt(NNiss_db) = enumCLEARQUEST_TDSE_ID) Then
|
|
|
145 |
' SQLstr = _
|
|
|
146 |
' " SELECT si.dbid AS iss_id, si.job_number AS iss_num, si.problem_summary AS summary, sd.NAME AS state"&_
|
| 159 |
ghuddy |
147 |
' " FROM CQ_TDSE.admin.request si, "&_
|
|
|
148 |
' " CQ_TDSE.admin.STATEDEF sd"&_
|
| 129 |
ghuddy |
149 |
' " WHERE si.STATE = sd.ID "
|
|
|
150 |
|
|
|
151 |
'ElseIf ( CInt(NNiss_db) = enumCLEARQUEST_VT5DM_ID) Then
|
|
|
152 |
' SQLstr = _
|
|
|
153 |
' " SELECT si.dbid AS iss_id, si.new_num AS iss_num, si.headline AS summary, sd.NAME AS state"&_
|
| 159 |
ghuddy |
154 |
' " FROM CQ_VT5DM..admin.software_issue si,"&_
|
|
|
155 |
' " CQ_VT5DM..admin.STATEDEF sd"&_
|
| 129 |
ghuddy |
156 |
' " WHERE si.STATE = sd.ID "
|
|
|
157 |
|
|
|
158 |
'SQLstr = "SELECT * FROM JIRA.jirauser.jiraissue"
|
|
|
159 |
|
|
|
160 |
SQLstr = _
|
|
|
161 |
"SELECT project.pkey as project, I.pkey AS iss_num, I.summary, ISS.pname AS state "&_
|
|
|
162 |
"FROM jiraissue I, project, issuestatus ISS "&_
|
| 171 |
brianf |
163 |
"WHERE I.project=project.ID "
|
|
|
164 |
If ( apkey <> LENUM_ALL ) Then
|
|
|
165 |
SQLstr = SQLstr & "AND project.pkey='"& apkey &"' "
|
|
|
166 |
End If
|
|
|
167 |
SQLstr = SQLstr & "AND I.issuestatus = ISS.ID "
|
| 129 |
ghuddy |
168 |
|
|
|
169 |
'-- User filter --
|
|
|
170 |
If CInt(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
|
|
|
171 |
' Add package Filter
|
|
|
172 |
If (parPackage <> "") Then
|
|
|
173 |
SQLstr = SQLstr &" AND si.package_ref = '"& Replace( parPackage, "'","''" ) &"'"
|
|
|
174 |
End If
|
|
|
175 |
|
|
|
176 |
' Add project Filter
|
|
|
177 |
If (parProject <> "") Then
|
|
|
178 |
SQLstr = SQLstr &" AND si.project = '"& Replace( parProject, "'","''" ) &"'"
|
|
|
179 |
End If
|
|
|
180 |
|
|
|
181 |
' Add product Filter
|
|
|
182 |
If (parProduct <> "") Then
|
|
|
183 |
SQLstr = SQLstr &" AND si.product = '"& Replace( parProduct, "'","''" ) &"'"
|
|
|
184 |
End If
|
|
|
185 |
|
|
|
186 |
' Add Issue State Filter
|
|
|
187 |
If (parIStates <> "") Then
|
|
|
188 |
SQLstr = SQLstr &" AND sd.id IN ("& parIStates &")"
|
|
|
189 |
End If
|
|
|
190 |
|
|
|
191 |
' Add Title keyword search
|
|
|
192 |
If ( parTitle <> LCONST_STAR ) Then
|
|
|
193 |
Title = Replace( parTitle, "'", "''" )
|
|
|
194 |
Title = Replace( Title, "*", "%" )
|
|
|
195 |
SQLstr = SQLstr &" AND si.headline LIKE ( '"& Title &"' )"
|
|
|
196 |
End If
|
|
|
197 |
|
|
|
198 |
ElseIf ( CInt(NNiss_db) = enumCLEARQUEST_TDSE_ID) Then
|
|
|
199 |
|
|
|
200 |
' Add project Filter
|
|
|
201 |
If (parProject <> "") Then
|
|
|
202 |
SQLstr = SQLstr &" AND si.category_main = '"& Replace( parCategMain, "'","''" ) &"'"
|
|
|
203 |
End If
|
|
|
204 |
|
|
|
205 |
' Add product Filter
|
|
|
206 |
If (parProduct <> "") Then
|
|
|
207 |
SQLstr = SQLstr &" AND si.category_minor = '"& Replace( parCategMinor, "'","''" ) &"'"
|
|
|
208 |
End If
|
|
|
209 |
|
|
|
210 |
End If
|
|
|
211 |
|
|
|
212 |
|
|
|
213 |
'-- Keyword search --
|
|
|
214 |
If ( NNiss_num <> LENUM_ALL ) Then
|
|
|
215 |
issARR = Split( Replace( NNiss_num, " ", ""), "," )
|
|
|
216 |
|
|
|
217 |
'If ( CInt(NNiss_db) = enumCLEARQUEST_TDSE_ID ) Then
|
|
|
218 |
' col_name = "job_number"
|
|
|
219 |
'Else
|
|
|
220 |
col_name = "I.pkey"
|
|
|
221 |
'End If
|
|
|
222 |
SQLstr = SQLstr & " AND ( "
|
|
|
223 |
For Each iss_num IN issARR
|
|
|
224 |
SQLstr = SQLstr &" ("& col_name &" LIKE '%"& iss_num &"%') OR"
|
|
|
225 |
Next
|
|
|
226 |
|
|
|
227 |
SQLstr = Left( SQLstr, Len(SQLstr) - 2 ) ' Remove last 'OR'
|
|
|
228 |
|
|
|
229 |
SQLstr = SQLstr & " ) "
|
|
|
230 |
|
|
|
231 |
End If
|
|
|
232 |
|
|
|
233 |
'-- Get record count ---
|
|
|
234 |
NNrecordCount = Get_Record_Count( SQLstr )
|
|
|
235 |
|
|
|
236 |
|
|
|
237 |
'-- Order by --
|
|
|
238 |
'If CInt(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
|
|
|
239 |
' SQLstr = SQLstr &" ORDER BY si.submit_date DESC"
|
|
|
240 |
|
|
|
241 |
'ElseIf ( CInt(NNiss_db) = enumCLEARQUEST_TDSE_ID) Then
|
|
|
242 |
' SQLstr = SQLstr &" ORDER BY si.when_reported DESC"
|
|
|
243 |
|
|
|
244 |
'End If
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
|
|
|
248 |
OOrsCQ.ActiveConnection = JIRA_conn
|
|
|
249 |
OOrsCQ.Source = SQLstr
|
|
|
250 |
OOrsCQ.CursorType = 0
|
|
|
251 |
OOrsCQ.CursorLocation = 2
|
|
|
252 |
OOrsCQ.LockType = 3
|
|
|
253 |
|
|
|
254 |
On Error Resume Next
|
|
|
255 |
OOrsCQ.Open()
|
|
|
256 |
|
|
|
257 |
Get_Issues = Err.Number
|
|
|
258 |
|
|
|
259 |
End Function
|
| 119 |
ghuddy |
260 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
261 |
Function Get_Record_Count ( SSsql )
|
| 129 |
ghuddy |
262 |
Dim rsTemp
|
|
|
263 |
Set rsTemp = Server.CreateObject("ADODB.Recordset")
|
|
|
264 |
rsTemp.ActiveConnection = JIRA_conn
|
|
|
265 |
'Response.Write(rsTemp.ActiveConnection)
|
| 119 |
ghuddy |
266 |
|
| 129 |
ghuddy |
267 |
rsTemp.Source = _
|
|
|
268 |
" SELECT COUNT(*) as record_count "&_
|
|
|
269 |
" FROM ("& SSsql &") ct"
|
|
|
270 |
|
|
|
271 |
rsTemp.CursorType = 0
|
|
|
272 |
rsTemp.CursorLocation = 2
|
|
|
273 |
rsTemp.LockType = 3
|
|
|
274 |
rsTemp.Open()
|
|
|
275 |
|
|
|
276 |
If (NOT rsTemp.BOF) AND (NOT rsTemp.EOF) Then
|
|
|
277 |
Get_Record_Count = rsTemp("record_count")
|
|
|
278 |
Else
|
|
|
279 |
Get_Record_Count = 0
|
|
|
280 |
End If
|
|
|
281 |
|
|
|
282 |
rsTemp.Close
|
|
|
283 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
284 |
End Function
|
|
|
285 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
286 |
Sub Get_CQ_Issues_States ( sIssIdList, nIssDB, outObjCQissState )
|
| 129 |
ghuddy |
287 |
Dim rsTemp, SQLstr
|
|
|
288 |
Set rsTemp = Server.CreateObject("ADODB.Recordset")
|
|
|
289 |
rsTemp.ActiveConnection = JIRA_conn
|
| 119 |
ghuddy |
290 |
|
| 129 |
ghuddy |
291 |
SQLstr = _
|
|
|
292 |
"SELECT I.pkey AS iss_num, I.summary, ISS.pname AS state "&_
|
|
|
293 |
" FROM jiraissue I, issuestatus ISS "&_
|
|
|
294 |
" WHERE I.pkey IN ('"& sIssIdList &"') "&_
|
|
|
295 |
"AND I.issuestatus = ISS.ID "
|
|
|
296 |
|
|
|
297 |
'If CInt(nIssDB) = enumCLEARQUEST_DEVI_ID Then
|
|
|
298 |
' SQLstr = _
|
|
|
299 |
' " SELECT si.dbid, sd.name AS state_name, si.state AS state_id"&_
|
| 159 |
ghuddy |
300 |
' " FROM CQ_DEVI.admin.software_issue si,"&_
|
|
|
301 |
' " CQ_DEVI.admin.statedef sd"&_
|
| 129 |
ghuddy |
302 |
' " WHERE si.STATE = sd.ID"&_
|
|
|
303 |
' " AND si.dbid IN ("& sIssIdList &")"
|
|
|
304 |
|
|
|
305 |
'ElseIf CInt(nIssDB) = enumCLEARQUEST_TDSE_ID Then
|
|
|
306 |
' SQLstr = _
|
|
|
307 |
' " SELECT si.dbid, sd.name AS state_name, si.state AS state_id"&_
|
| 159 |
ghuddy |
308 |
' " FROM CQ_TDSE.admin.request si,"&_
|
|
|
309 |
' " CQ_TDSE.admin.statedef sd"&_
|
| 129 |
ghuddy |
310 |
' " WHERE si.STATE = sd.ID"&_
|
|
|
311 |
' " AND si.dbid IN ("& sIssIdList &")"
|
|
|
312 |
'ElseIf CInt(nIssDB) = enumCLEARQUEST_VT5DM_ID Then
|
|
|
313 |
' SQLstr = _
|
|
|
314 |
' " SELECT si.dbid, sd.name AS state_name, si.state AS state_id"&_
|
| 159 |
ghuddy |
315 |
' " FROM CQ_VT5DM..admin.software_issue si,"&_
|
|
|
316 |
' " CQ_VT5DM..admin.statedef sd"&_
|
| 129 |
ghuddy |
317 |
' " WHERE si.STATE = sd.ID"&_
|
|
|
318 |
' " AND si.dbid IN ("& sIssIdList &")"
|
|
|
319 |
'
|
|
|
320 |
|
|
|
321 |
'End If
|
|
|
322 |
|
|
|
323 |
rsTemp.Source = SQLstr
|
|
|
324 |
rsTemp.CursorType = 0
|
|
|
325 |
rsTemp.CursorLocation = 2
|
|
|
326 |
rsTemp.LockType = 3
|
|
|
327 |
rsTemp.Open()
|
|
|
328 |
|
|
|
329 |
|
|
|
330 |
|
|
|
331 |
While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
|
|
|
332 |
outObjCQissState.Add CStr(rsTemp("iss_num")), CStr(rsTemp("state"))
|
|
|
333 |
rsTemp.MoveNext
|
|
|
334 |
WEnd
|
|
|
335 |
|
|
|
336 |
rsTemp.Close
|
|
|
337 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
338 |
End Sub
|
|
|
339 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
340 |
Function Is_Pkg_Official ( nPv_id )
|
| 129 |
ghuddy |
341 |
Dim rsTemp, Query_String
|
|
|
342 |
Query_String = _
|
|
|
343 |
" SELECT dlocked"&_
|
|
|
344 |
" FROM package_versions "&_
|
|
|
345 |
" WHERE pv_id = "& nPv_id
|
|
|
346 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
347 |
If rsTemp("dlocked") = "Y" Then
|
|
|
348 |
Is_Pkg_Official = TRUE
|
|
|
349 |
Else
|
|
|
350 |
Is_Pkg_Official = FALSE
|
|
|
351 |
End If
|
|
|
352 |
rsTemp.Close
|
|
|
353 |
Set rsTemp = nothing
|
| 119 |
ghuddy |
354 |
End Function
|
|
|
355 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
356 |
Function Set_Issue_State ( sCQState )
|
| 129 |
ghuddy |
357 |
If parSkipOpen <> "" Then
|
|
|
358 |
Set_Issue_State = enumISSUES_STATE_FIXED
|
|
|
359 |
|
|
|
360 |
Else
|
|
|
361 |
Set_Issue_State = enumISSUES_STATE_IMPORTED
|
|
|
362 |
|
|
|
363 |
End If
|
| 119 |
ghuddy |
364 |
End Function
|
|
|
365 |
'------------------------------------------------------------------------------------------------------------------------------------
|
|
|
366 |
Sub Import_Issues ( NNpv_id, NNiss_db, NNiss_id_list )
|
| 129 |
ghuddy |
367 |
Dim issArr, iss_id, oCQissState, iss_num, iss_state, iss_state_human_readable
|
|
|
368 |
If NNiss_id_list = "" Then Exit Sub
|
|
|
369 |
Set oCQissState = CreateObject("Scripting.Dictionary")
|
| 119 |
ghuddy |
370 |
|
| 129 |
ghuddy |
371 |
issArr = Split ( NNiss_id_list, ",")
|
|
|
372 |
'Response.Write(NNiss_id_list)
|
|
|
373 |
|
|
|
374 |
Call Get_CQ_Issues_States ( NNiss_id_list, NNiss_db, oCQissState )
|
|
|
375 |
|
|
|
376 |
objEH.TryORA ( OraSession )
|
|
|
377 |
On Error Resume Next
|
|
|
378 |
|
|
|
379 |
For Each iss_id In issArr
|
|
|
380 |
|
|
|
381 |
If Err.Number = 0 Then
|
|
|
382 |
OraDatabase.ExecuteSQL _
|
|
|
383 |
" INSERT INTO JIRA_ISSUES ( pv_id, iss_key, date_time_stamp )"&_
|
|
|
384 |
" VALUES ( "& NNpv_id &", '"& LTrim(iss_id) &"', "& ORA_SYSDATETIME &")"
|
|
|
385 |
|
|
|
386 |
'If iss_state = 0 Then
|
|
|
387 |
' iss_state_human_readable = "No"
|
|
|
388 |
'Else
|
|
|
389 |
' iss_state_human_readable = "Yes"
|
|
|
390 |
'End If
|
|
|
391 |
|
|
|
392 |
If Err.Number = 0 Then
|
|
|
393 |
OraDatabase.ExecuteSQL _
|
|
|
394 |
"BEGIN Log_Action ( "& NNpv_id &", 'jira_issue_added', "& objAccessControl.UserId &", 'Issue number: "& LTrim(iss_id) &"' ); END;"
|
|
|
395 |
End If
|
|
|
396 |
|
|
|
397 |
End If
|
|
|
398 |
Next
|
|
|
399 |
|
|
|
400 |
objEH.CatchORA ( OraSession )
|
| 119 |
ghuddy |
401 |
End Sub
|
|
|
402 |
'------------------------------------------------------------------------------------------------------------------------------------
|
| 171 |
brianf |
403 |
Function GetDefaultProjectKey(artag_id)
|
|
|
404 |
Dim rsProjId
|
|
|
405 |
Set rsProjId = OraDatabase.DbCreateDynaset("SELECT PRJ.JIRA_KEY FROM RELEASE_TAGS RLT, PROJECTS PRJ WHERE RLT.RTAG_ID ="& artag_id &" AND RLT.PROJ_ID = PRJ.PROJ_ID", cint(0))
|
|
|
406 |
GetDefaultProjectKey = rsProjId("jira_key")
|
|
|
407 |
Set rsProjId = Nothing
|
|
|
408 |
End Function
|
|
|
409 |
'------------------------------------------------------------------------------------------------------------------------------------
|
| 119 |
ghuddy |
410 |
%>
|
|
|
411 |
<%
|
|
|
412 |
'Process submition
|
|
|
413 |
If CBool(Request("action")) AND (Request("btn") = "Import") AND objAccessControl.UserLogedIn Then
|
| 129 |
ghuddy |
414 |
Call Import_Issues ( parPv_id, parFRiss_db, parFRiss_id )
|
|
|
415 |
imported = TRUE
|
|
|
416 |
Call OpenInParentWindow ("fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id)
|
|
|
417 |
|
| 119 |
ghuddy |
418 |
End If
|
|
|
419 |
%>
|
|
|
420 |
<%
|
|
|
421 |
'-------------- Main Line ---------------
|
|
|
422 |
|
| 171 |
brianf |
423 |
retVal = Get_Issues ( parFRiss_db, parFRiss_num, rspTotal, rsCQ, parFRpkey)
|
| 119 |
ghuddy |
424 |
|
|
|
425 |
' total number of pages required
|
|
|
426 |
rspTotalPages = rspTotal \ rspMax
|
|
|
427 |
If (rspTotal Mod rspMax) > 0 Then rspTotalPages = rspTotalPages + 1
|
|
|
428 |
%>
|
|
|
429 |
<html>
|
|
|
430 |
<head>
|
|
|
431 |
<title>Release Manager</title>
|
|
|
432 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
433 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
434 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
435 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
436 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
437 |
</head>
|
|
|
438 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
|
|
439 |
<%If retVal = 0 Then%>
|
|
|
440 |
<form name="importform" method="post" action="<%=scriptName%>">
|
|
|
441 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
|
|
442 |
<tr>
|
|
|
443 |
<td height="1%" background="images/bg_admin_dark.gif"><img src="images/spacer.gif" width="10" height="40"></td>
|
|
|
444 |
<td nowrap colspan="3" class="wform_ttl" background="images/bg_admin_dark.gif"><table width="100" border="0" cellspacing="5" cellpadding="0">
|
|
|
445 |
<tr>
|
|
|
446 |
<td align="left" class="wform_ttl">Issue Number</td>
|
|
|
447 |
<td nowrap><input name="FRiss_num" type="text" class="form_item" id="FRiss_num" value="<%=parFRiss_num%>" size="30" > <span class="form_wtxt_link">Example: ALL, 123, DEVI-123 </span></td>
|
|
|
448 |
</tr>
|
|
|
449 |
<tr>
|
| 171 |
brianf |
450 |
<td align="left" class="wform_ttl">Project Key</td>
|
|
|
451 |
<td nowrap><input name="FRpkey" type="text" class="form_item" id="FRpkey" value="<%=parFRpkey%>" size="30" > <span class="form_wtxt_link">Example: ALL, SLSCM </span></td>
|
|
|
452 |
</tr>
|
|
|
453 |
<tr>
|
| 119 |
ghuddy |
454 |
<td align="left" class="wform_ttl">Database</td>
|
|
|
455 |
<td>JIRA</td>
|
|
|
456 |
</tr>
|
|
|
457 |
|
| 129 |
ghuddy |
458 |
</table>
|
|
|
459 |
|
| 119 |
ghuddy |
460 |
<DIV id="DIVOPTIONS" <%If IsOptionUsed Then%>style="display:block;"<%Else%>style="display:none;"<%End If%>>
|
| 129 |
ghuddy |
461 |
<DIV id="DIVOPTIONSDEVI" <%If CInt(parFRiss_db) = enumCLEARQUEST_DEVI_ID Then%>style="display:block;"<%Else%>style="display:none;"<%End If%>> </DIV>
|
| 119 |
ghuddy |
462 |
|
| 129 |
ghuddy |
463 |
|
|
|
464 |
|
|
|
465 |
<DIV id="DIVOPTIONSTDSE" <%If CInt(parFRiss_db) = enumCLEARQUEST_TDSE_ID Then%>style="display:block;"<%Else%>style="display:none;"<%End If%>> </DIV>
|
|
|
466 |
|
|
|
467 |
|
| 119 |
ghuddy |
468 |
</DIV>
|
| 129 |
ghuddy |
469 |
|
| 119 |
ghuddy |
470 |
<table width="400" border="0" cellspacing="5" cellpadding="0">
|
|
|
471 |
<tr background="images/lbox_bg_blue.gif">
|
|
|
472 |
<td colspan="2"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
473 |
</tr>
|
|
|
474 |
<tr>
|
|
|
475 |
<td width="1"> </td>
|
|
|
476 |
<td width="100%"><input type="submit" name="btn" value="Find »" class="form_btn_comp"></td>
|
|
|
477 |
</tr>
|
|
|
478 |
</table></td>
|
|
|
479 |
</tr>
|
| 129 |
ghuddy |
480 |
|
|
|
481 |
<tr>
|
| 119 |
ghuddy |
482 |
<td background="images/lbox_bg_blue.gif" width="1%" height="1%"> </td>
|
|
|
483 |
<td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl"> </td>
|
|
|
484 |
<td background="images/lbox_bg_blue.gif" align="right" width="50%">
|
| 129 |
ghuddy |
485 |
<input type="submit" name="btn" value="Import" class="form_btn_comp">
|
|
|
486 |
<input type="reset" name="btn" value="Close" class="form_btn_comp" onclick="self.close()">
|
| 119 |
ghuddy |
487 |
</td>
|
| 129 |
ghuddy |
488 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%" nowrap>
|
| 119 |
ghuddy |
489 |
<img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
|
|
|
490 |
</tr>
|
| 129 |
ghuddy |
491 |
<tr>
|
| 119 |
ghuddy |
492 |
<td height="100%" width="1%"> </td>
|
|
|
493 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
| 129 |
ghuddy |
494 |
<%If imported Then%>
|
|
|
495 |
<%Call DisplayInfo ( "ISSUES_IMPORTED", "300" )%>
|
|
|
496 |
<%End If%>
|
| 119 |
ghuddy |
497 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 129 |
ghuddy |
498 |
<tr>
|
| 119 |
ghuddy |
499 |
<td width="1%" background="images/bg_form_lightbluedark.gif"> </td>
|
|
|
500 |
<td width="1%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Issue Key</td>
|
| 129 |
ghuddy |
501 |
<td width="1%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">State</td>
|
| 119 |
ghuddy |
502 |
<td width="100%" nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Summary</td>
|
|
|
503 |
</tr>
|
| 129 |
ghuddy |
504 |
<%
|
|
|
505 |
rspCount = 0
|
|
|
506 |
If (NOT rsCQ.BOF) AND (NOT rsCQ.EOF) Then
|
|
|
507 |
rsCQ.Move( rspMax * (rspPage - 1))
|
|
|
508 |
|
|
|
509 |
%>
|
|
|
510 |
<%
|
|
|
511 |
While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF) AND (rspCount < rspMax))
|
|
|
512 |
%>
|
|
|
513 |
<tr>
|
|
|
514 |
<td><input type="checkbox" name="FRiss_id" value="<%=rsCQ("iss_num")%>"></td>
|
|
|
515 |
<td nowrap class="form_item">
|
|
|
516 |
|
|
|
517 |
<%If parFRiss_num <> LENUM_ALL Then%>
|
|
|
518 |
<%=Highlight_Substring( rsCQ("iss_num"), parFRiss_num )%>
|
|
|
519 |
<%Else%>
|
|
|
520 |
<a href="http://auperajir01:8080/browse/<%=rsCQ("iss_num")%>" target="_blank"><%=rsCQ("iss_num")%>
|
|
|
521 |
<%End If%>
|
|
|
522 |
|
|
|
523 |
</a>
|
|
|
524 |
</td>
|
|
|
525 |
<td class="form_item"><%=rsCQ("state")%></td>
|
|
|
526 |
<td class="form_item"><%=rsCQ("summary")%></td>
|
|
|
527 |
</tr>
|
|
|
528 |
<%rspCount = rspCount + 1
|
|
|
529 |
rsCQ.MoveNext
|
|
|
530 |
WEnd
|
|
|
531 |
rsCQ.Close
|
|
|
532 |
Set rsCQ = nothing%>
|
|
|
533 |
<%End If%>
|
|
|
534 |
<tr>
|
| 119 |
ghuddy |
535 |
<td background="images/bg_form_lightbluedark.gif"> </td>
|
|
|
536 |
<td colspan="3" nowrap background="images/bg_form_lightbluedark.gif" class="form_step">
|
| 129 |
ghuddy |
537 |
<%
|
|
|
538 |
If rspTotal > rspMax Then
|
|
|
539 |
If CInt(rspPage) = CInt(rspTotalPages) Then
|
|
|
540 |
Response.write "Found "& rspTotal &" records, showing "& (rspMax * rspPage) - rspMax + 1 &" - "& rspTotal
|
|
|
541 |
Else
|
|
|
542 |
Response.write "Found "& rspTotal &" records, showing "& (rspMax * rspPage) - rspMax + 1 &" - "& (rspCount * rspPage)
|
|
|
543 |
End If
|
|
|
544 |
Else
|
|
|
545 |
Response.write "Found "& rspTotal &" records"
|
|
|
546 |
End If
|
|
|
547 |
%>
|
|
|
548 |
</td>
|
| 119 |
ghuddy |
549 |
</tr>
|
|
|
550 |
</table>
|
|
|
551 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
552 |
<tr>
|
|
|
553 |
<td align="center">
|
| 171 |
brianf |
554 |
<%If CInt(rspPage) > 1 Then%><a href="javascript:;" onClick="importform.rpg.value = parseInt(importform.rpg.value) - 1; importform.submit();" class="txt_linked"><previous</a><%End If%>
|
|
|
555 |
<%If CInt(rspPage) < CInt(rspTotalPages) Then%><a href="javascript:void(document.importform.submit())" onClick="importform.rpg.value = parseInt(importform.rpg.value) + 1; importform.btn.value='next';" class="txt_linked">next ></a><%End If%></td>
|
| 119 |
ghuddy |
556 |
</tr>
|
|
|
557 |
</table>
|
|
|
558 |
<br>
|
|
|
559 |
</td>
|
|
|
560 |
</tr>
|
| 129 |
ghuddy |
561 |
<tr>
|
| 119 |
ghuddy |
562 |
<td width="1%" height="1%" background="images/lbox_bg_blue.gif"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
|
|
563 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
|
|
564 |
</tr>
|
|
|
565 |
</table>
|
| 129 |
ghuddy |
566 |
<input name="rpg" type="hidden" value="<%=rspPage%>">
|
| 119 |
ghuddy |
567 |
<input name="skip_open" type="hidden" value="<%=parSkipOpen%>">
|
|
|
568 |
<input name="pv_id" type="hidden" value="<%=parPv_id%>">
|
|
|
569 |
<input name="rtag_id" type="hidden" value="<%=parRtag_id%>">
|
|
|
570 |
<input name="action" type="hidden" value="true">
|
|
|
571 |
</form>
|
|
|
572 |
<%Else%>
|
|
|
573 |
<%=enumMSSQL_ERROR%>
|
|
|
574 |
<%End If%>
|
|
|
575 |
</body>
|
|
|
576 |
</html>
|
|
|
577 |
|
|
|
578 |
|
|
|
579 |
<!-- DESTRUCTOR ------->
|
| 129 |
ghuddy |
580 |
<!--#include file="common/destructor.asp"-->
|