Subversion Repositories DevTools

Rev

Rev 6952 | Rev 6970 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6952 Rev 6953
Line 44... Line 44...
44
'   On Error Resule Next to catch errors that accur in the code
44
'   On Error Resule Next to catch errors that accur in the code
45
'
45
'
46
On Error Resume Next
46
On Error Resume Next
47
If (parOpr = "getData") Then
47
If (parOpr = "getData") Then
48
    getData
48
    getData
-
 
49
ElseIf (parOpr = "mergeVersion") Then
-
 
50
    mergeVersion
49
 
51
 
50
Else
52
Else
51
    oJSON.data("error") = 1
53
    oJSON.data("error") = 1
52
    oJSON.data("emsgSummary") = "Unknown JSON Operation"
54
    oJSON.data("emsgSummary") = "Unknown JSON Operation"
53
    oJSON.data("emsgDetails") = "The Requested JSON operation is not supported: " & parOpr
55
    oJSON.data("emsgDetails") = "The Requested JSON operation is not supported: " & parOpr
Line 104... Line 106...
104
Set oJSON = Nothing
106
Set oJSON = Nothing
105
Call Destroy_All_Objects
107
Call Destroy_All_Objects
106
%>
108
%>
107
<%
109
<%
108
'-------------------------------------------------
110
'-------------------------------------------------
-
 
111
' Function:    mergeVersion
-
 
112
' Description: Merge the selected version into the Release
-
 
113
'              rtag_id - The release to process
-
 
114
'              pv_id - Current PVID
-
 
115
'              npv_id - New PVID
-
 
116
'              mode - A (Add), R (Remove)
-
 
117
'
-
 
118
Sub mergeVersion
-
 
119
    Dim OraParameter
-
 
120
    Dim mode : mode =  QStrPar("mode")
-
 
121
 
-
 
122
    OraDatabase.Parameters.Add "RTAG_ID", parRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
123
    OraDatabase.Parameters.Add "NPV_ID",   QStrPar("npv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
124
    OraDatabase.Parameters.Add "PV_ID",   QStrPar("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
-
 
125
    OraDatabase.Parameters.Add "VIEW_ID",  NULL, ORAPARM_BOTH, ORATYPE_NUMBER
-
 
126
    OraDatabase.Parameters.Add "USER_ID",  objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
127
    OraDatabase.Parameters.Add "OPERATION",NULL, ORAPARM_INPUT, ORATYPE_CHAR
-
 
128
    Set OraParameter = OraDatabase.Parameters
-
 
129
 
-
 
130
    On Error Resume Next
-
 
131
    objEH.TryORA ( OraSession )
-
 
132
 
-
 
133
    If mode = "A" Then
-
 
134
        OraParameter("OPERATION").Value = "A"
-
 
135
        OraDatabase.ExecuteSQL _
-
 
136
        "BEGIN  "&_
-
 
137
        "  :VIEW_ID := PK_RELEASE.GET_PACKAGE_VIEW ( :PV_ID, :RTAG_ID ); "&_
-
 
138
        "  PK_PLANNED.MERGE_PACKAGE ( :NPV_ID, :VIEW_ID, :RTAG_ID, :USER_ID, :OPERATION );  "&_
-
 
139
        "END;"
-
 
140
 
-
 
141
    ElseIf mode = "R" Then
-
 
142
        OraDatabase.ExecuteSQL "BEGIN PK_ENVIRONMENT.MAKE_REJECT ( :NPV_ID, :RTAG_ID, :USER_ID ); END; "
-
 
143
    
-
 
144
    Else
-
 
145
        result = -1
-
 
146
        oJSON.data("emsgSummary") = "Internal: mergeVersion. Unknown mode"
-
 
147
        Exit Sub
-
 
148
    End If
-
 
149
 
-
 
150
    objEH.CatchORA ( OraSession )
-
 
151
    On Error GoTo 0
-
 
152
 
-
 
153
    If Err.Number = 0 Then
-
 
154
        result = 0
-
 
155
    End If
-
 
156
    
-
 
157
	OraDatabase.Parameters.Remove "OPERATION"
-
 
158
	OraDatabase.Parameters.Remove "USER_ID"
-
 
159
	OraDatabase.Parameters.Remove "VIEW_ID"
-
 
160
	OraDatabase.Parameters.Remove "PV_ID"
-
 
161
	OraDatabase.Parameters.Remove "NPV_ID"
-
 
162
	OraDatabase.Parameters.Remove "RTAG_ID"
-
 
163
 
-
 
164
End Sub
-
 
165
'-------------------------------------------------
109
' Function:    getData
166
' Function:    getData
110
' Description: Get the data for the page - as jason
167
' Description: Get the data for the page - as jason
111
'              Not used directly by datatables
168
'              Not used directly by datatables
112
'              The format is special. Its not a direct result of the sql query
169
'              The format is special. Its not a direct result of the sql query
113
'              Group multiple version-information as an array
170
'              Group multiple version-information as an array