Subversion Repositories DevTools

Rev

Rev 3975 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<%
'===================================================================================
'                                                               CQ common subs
'===================================================================================
%>
<%
'------------------------------------------------------------------------------------------------------------------------------------
'   ClearQuest support
'   Converts a DEVI Number in a ClearQuest ID
'   Appears to the reverse of common_dbedit.asp::GetIssueNumber()
'
'   Arguments are passed in via the environment Requests
'   Results are exported via argumements
'
'   Dpurdie: I have a deep suspicion that the databse lookup is never used
'            and that the data is extracted from the iss_db and iss_id requests 
'
Sub Get_Iss_Parameters ( nIss_db, nIss_id )
        Dim SQLstr, rsQry
    ' If the required info is being persisted in the query then use it
    '
        If Request("iss_db") <> "" AND Request("iss_id") <> "" Then
                nIss_db = Cint(Request("iss_db"))
                nIss_id = Request("iss_id")

    '
    ' Request contains info that must be converted
    '
        ElseIf Request("iss_db_name") <> "" AND Request("iss_id_num") <> "" Then
                If Ucase(Request("iss_db_name")) = "DEVI" Then
                        nIss_db = enumCLEARQUEST_DEVI_ID
                        SQLstr = _
                        " SELECT si.dbid"&_
            "   FROM release_manager.cq_software_issue si"&_
                        "   WHERE si.new_num = '"& Request("iss_id_num") &"'"
                Else
                        ' Database name unknown!
                        ' Error message...
                        Call RaiseMsg ( enum_WMSG_ERROR, "Database name "& Request("iss_db_name") &" is unknown!" )
                End If

                ' Get Iss ID
        Set rsQry = OraDatabase.DbCreateDynaset( SQLstr, cint(0))

                If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
                        nIss_id = rsQry("dbid")
                Else
                        ' Iss number is not found!
                        ' Error message...
                        Call RaiseMsg ( enum_WMSG_ERROR, "Issue number "& Request("iss_id_num") &" is not found in "& Request("iss_db_name") &" database!" )
                End If

                rsQry.Close
                Set rsQry = nothing
        Else
                ' Not enought parameters
                ' Error message...
                Call RaiseMsg ( enum_WMSG_ERROR, "This page requires more parameters to run!" )

        End If
End Sub
'------------------------------------------------------------------------------------------------------------------------------------
%>