| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
| 129 |
ghuddy |
4 |
' MAKE PENDING
|
| 119 |
ghuddy |
5 |
' --- PROCESS FORM ---
|
|
|
6 |
'=====================================================
|
|
|
7 |
%>
|
|
|
8 |
<%
|
|
|
9 |
Option explicit
|
|
|
10 |
' Good idea to set when using redirect
|
| 129 |
ghuddy |
11 |
Response.Expires = 0 ' always load the page, dont store
|
| 119 |
ghuddy |
12 |
%>
|
|
|
13 |
|
|
|
14 |
<!--#include file="common/conf.asp"-->
|
|
|
15 |
<!--#include file="common/globals.asp"-->
|
|
|
16 |
<!--#include file="common/formating.asp"-->
|
|
|
17 |
<!--#include file="common/qstr.asp"-->
|
|
|
18 |
<!--#include file="common/common_subs.asp"-->
|
|
|
19 |
<!--#include file="common/common_dbedit.asp"-->
|
| 153 |
ghuddy |
20 |
<!--#include file="common/daemon_instructions.asp"-->
|
| 119 |
ghuddy |
21 |
<%
|
|
|
22 |
'------------ ACCESS CONTROL ------------------
|
|
|
23 |
%>
|
|
|
24 |
<!--#include file="_access_control_login.asp"-->
|
|
|
25 |
<!--#include file="_access_control_general.asp"-->
|
|
|
26 |
<!--#include file="_access_control_project.asp"-->
|
|
|
27 |
<%
|
|
|
28 |
'------------ Variable Definition -------------
|
|
|
29 |
Dim parPv_id
|
|
|
30 |
Dim parRfile
|
|
|
31 |
Dim retERRmsg
|
|
|
32 |
Dim retALRTmsg
|
|
|
33 |
Dim retParameters
|
|
|
34 |
Dim pkgType
|
|
|
35 |
'------------ Constants Declaration -----------
|
|
|
36 |
'------------ Variable Init -------------------
|
|
|
37 |
parPv_id = Request("pv_id")
|
|
|
38 |
parRfile = Request("rfile")
|
|
|
39 |
'------------ Constants Declaration -----------
|
|
|
40 |
'------------ Variable Init -------------------
|
|
|
41 |
'----------------------------------------------
|
|
|
42 |
%>
|
|
|
43 |
<%
|
|
|
44 |
Sub MakePending ()
|
| 121 |
hknight |
45 |
|
| 129 |
ghuddy |
46 |
OraDatabase.Parameters.Add "PV_ID", Request("pv_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
47 |
OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
48 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
49 |
|
|
|
50 |
objEH.TryORA ( OraSession )
|
|
|
51 |
On Error Resume Next
|
|
|
52 |
|
|
|
53 |
OraDatabase.ExecuteSQL " UPDATE package_versions "&_
|
|
|
54 |
" SET owner_id = :USER_ID"&_
|
|
|
55 |
" WHERE pv_id = :PV_ID"
|
|
|
56 |
|
|
|
57 |
OraDatabase.ExecuteSQL _
|
|
|
58 |
"BEGIN "&_
|
|
|
59 |
" PK_ENVIRONMENT.MAKE_PENDING ( :PV_ID, :RTAG_ID, :USER_ID ); "&_
|
|
|
60 |
"END; "
|
|
|
61 |
|
|
|
62 |
objEH.CatchORA ( OraSession )
|
|
|
63 |
|
|
|
64 |
OraDatabase.Parameters.Remove "PV_ID"
|
|
|
65 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
66 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
67 |
|
| 119 |
ghuddy |
68 |
End Sub
|
|
|
69 |
%>
|
|
|
70 |
<%
|
|
|
71 |
'----------------------- MAIN LINE ---------------------------
|
|
|
72 |
|
|
|
73 |
'--- Process submition ---
|
|
|
74 |
If ( Request("rtag_id") <> "") AND (Request("pv_id") <> "") Then
|
| 129 |
ghuddy |
75 |
|
| 5146 |
dpurdie |
76 |
If NOT canAddToRelease(Request("rtag_id"),Request("pv_id") ) Then
|
|
|
77 |
Call RaiseMsg ( enum_MSG_ERROR, _
|
|
|
78 |
"<h3>Cannot progress a package that is a part of an SDK.</h3>" &_
|
|
|
79 |
"<p>If the package is a WIP, then consider moving it to a different Release." _
|
|
|
80 |
)
|
|
|
81 |
End If
|
|
|
82 |
|
| 129 |
ghuddy |
83 |
Call CheckRequirementsForMakePending ( parPv_id, parRtag_id, pkgType, retERRmsg, retALRTmsg, retParameters )
|
|
|
84 |
|
|
|
85 |
If IsNull(retERRmsg) Then
|
|
|
86 |
' All Requirements OK
|
|
|
87 |
'COMPLETE THE REQUEST...
|
|
|
88 |
|
| 153 |
ghuddy |
89 |
If (DaemonInstructionPreventsEditing(Request("rtag_id"), Request("pv_id"))) Then
|
|
|
90 |
Call RaiseMsg(enum_MSG_ERROR, "This package version has one or more daemon instructions present.<br><br>"&_
|
|
|
91 |
"Please delete them or allow them to be consumed before attempting to make the package version pending.")
|
| 129 |
ghuddy |
92 |
Else
|
| 153 |
ghuddy |
93 |
Call MakePending ( )
|
|
|
94 |
|
|
|
95 |
If Request("rfile") <> "" Then
|
|
|
96 |
Response.Redirect ( Request("rfile") &"?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
|
|
|
97 |
Else
|
|
|
98 |
Response.Redirect ( "dependencies?pv_id="& Request("pv_id") &"&rtag_id="& Request("rtag_id") )
|
|
|
99 |
End If
|
| 129 |
ghuddy |
100 |
End If
|
|
|
101 |
|
|
|
102 |
Else
|
|
|
103 |
Call RaiseMsg ( Eval(retERRmsg), parRtag_id &"|"& parPv_id &"|"& retParameters &"|"& "N" )
|
|
|
104 |
End If
|
|
|
105 |
|
| 119 |
ghuddy |
106 |
Else
|
| 1376 |
dpurdie |
107 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
| 4955 |
dpurdie |
108 |
Response.write QSTR_FullQuery
|
| 119 |
ghuddy |
109 |
End If
|
| 1376 |
dpurdie |
110 |
|
| 119 |
ghuddy |
111 |
%>
|
|
|
112 |
|
|
|
113 |
<!-- DESTRUCTOR ------->
|
| 129 |
ghuddy |
114 |
<!--#include file="common/destructor.asp"-->
|