| 119 |
ghuddy |
1 |
<%
|
|
|
2 |
'===================================================================================
|
|
|
3 |
' CQ common subs
|
|
|
4 |
'===================================================================================
|
|
|
5 |
%>
|
|
|
6 |
<%
|
|
|
7 |
'------------------------------------------------------------------------------------------------------------------------------------
|
| 4553 |
dpurdie |
8 |
' ClearQuest support
|
|
|
9 |
' Converts a DEVI Number in a ClearQuest ID
|
|
|
10 |
' Appears to the reverse of common_dbedit.asp::GetIssueNumber()
|
|
|
11 |
'
|
|
|
12 |
' Arguments are passed in via the environment Requests
|
|
|
13 |
' Results are exported via argumements
|
|
|
14 |
'
|
|
|
15 |
' Dpurdie: I have a deep suspicion that the databse lookup is never used
|
|
|
16 |
' and that the data is extracted from the iss_db and iss_id requests
|
|
|
17 |
'
|
| 119 |
ghuddy |
18 |
Sub Get_Iss_Parameters ( nIss_db, nIss_id )
|
|
|
19 |
Dim SQLstr, rsQry
|
| 4553 |
dpurdie |
20 |
' If the required info is being persisted in the query then use it
|
|
|
21 |
'
|
| 119 |
ghuddy |
22 |
If Request("iss_db") <> "" AND Request("iss_id") <> "" Then
|
|
|
23 |
nIss_db = Cint(Request("iss_db"))
|
|
|
24 |
nIss_id = Request("iss_id")
|
| 159 |
ghuddy |
25 |
|
| 4553 |
dpurdie |
26 |
'
|
|
|
27 |
' Request contains info that must be converted
|
|
|
28 |
'
|
| 119 |
ghuddy |
29 |
ElseIf Request("iss_db_name") <> "" AND Request("iss_id_num") <> "" Then
|
|
|
30 |
If Ucase(Request("iss_db_name")) = "DEVI" Then
|
|
|
31 |
nIss_db = enumCLEARQUEST_DEVI_ID
|
|
|
32 |
SQLstr = _
|
|
|
33 |
" SELECT si.dbid"&_
|
| 4553 |
dpurdie |
34 |
" FROM release_manager.cq_software_issue si"&_
|
|
|
35 |
" WHERE si.new_num = '"& Request("iss_id_num") &"'"
|
| 119 |
ghuddy |
36 |
Else
|
|
|
37 |
' Database name unknown!
|
|
|
38 |
' Error message...
|
|
|
39 |
Call RaiseMsg ( enum_WMSG_ERROR, "Database name "& Request("iss_db_name") &" is unknown!" )
|
|
|
40 |
End If
|
| 159 |
ghuddy |
41 |
|
| 119 |
ghuddy |
42 |
' Get Iss ID
|
| 4553 |
dpurdie |
43 |
Set rsQry = OraDatabase.DbCreateDynaset( SQLstr, cint(0))
|
| 159 |
ghuddy |
44 |
|
| 119 |
ghuddy |
45 |
If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
|
|
|
46 |
nIss_id = rsQry("dbid")
|
|
|
47 |
Else
|
|
|
48 |
' Iss number is not found!
|
|
|
49 |
' Error message...
|
|
|
50 |
Call RaiseMsg ( enum_WMSG_ERROR, "Issue number "& Request("iss_id_num") &" is not found in "& Request("iss_db_name") &" database!" )
|
|
|
51 |
End If
|
| 159 |
ghuddy |
52 |
|
| 119 |
ghuddy |
53 |
rsQry.Close
|
|
|
54 |
Set rsQry = nothing
|
|
|
55 |
Else
|
|
|
56 |
' Not enought parameters
|
|
|
57 |
' Error message...
|
|
|
58 |
Call RaiseMsg ( enum_WMSG_ERROR, "This page requires more parameters to run!" )
|
| 159 |
ghuddy |
59 |
|
| 119 |
ghuddy |
60 |
End If
|
|
|
61 |
End Sub
|
|
|
62 |
'------------------------------------------------------------------------------------------------------------------------------------
|
| 159 |
ghuddy |
63 |
%>
|