| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| Add Release |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
' Good idea to set when using redirect
|
|
|
12 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
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/_form_window_common.asp"-->
|
|
|
20 |
<%
|
|
|
21 |
' Set rfile parameter. This is a return page after Login
|
|
|
22 |
Call objPMod.StoreParameter ( "rfile", "rtree.asp" )
|
|
|
23 |
objPMod.PersistInQryString("proj_id")
|
|
|
24 |
'------------ ACCESS CONTROL ------------------
|
|
|
25 |
%>
|
|
|
26 |
<!--#include file="_access_control_login.asp"-->
|
|
|
27 |
<!--#include file="_access_control_general.asp"-->
|
|
|
28 |
<!--#include file="_access_control_project.asp"-->
|
|
|
29 |
<%
|
|
|
30 |
'------------ Variable Definition -------------
|
|
|
31 |
Dim objSortHelper
|
|
|
32 |
Dim rsQry
|
|
|
33 |
Dim parProjId
|
|
|
34 |
Dim parSourceRtagId
|
|
|
35 |
'------------ Constants Declaration -----------
|
|
|
36 |
'------------ Variable Init -------------------
|
|
|
37 |
parProjId = Request("proj_id")
|
|
|
38 |
parSourceRtagId = Request("source_rtag_id")
|
|
|
39 |
objPMod.PersistInQryString("proj_id")
|
|
|
40 |
'----------------------------------------------
|
|
|
41 |
%>
|
|
|
42 |
<%
|
|
|
43 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
44 |
Sub GetFormDetails ( nSourceRtagId, ByRef outobjDetails )
|
|
|
45 |
Dim rsQry, query
|
|
|
46 |
|
|
|
47 |
' Exit if nSourceRtagId is empty
|
|
|
48 |
If nSourceRtagId = "" Then Exit Sub
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
OraDatabase.Parameters.Add "SOURCE_RTAG_ID", nSourceRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
52 |
|
|
|
53 |
query = _
|
|
|
54 |
" SELECT pr.PROJ_NAME ||' > '|| rt.RTAG_NAME ||' ['|| rt.RTAG_VERSION ||'.'|| rt.RTAG_LIFE_CYCLE ||']' AS LOCATION"&_
|
|
|
55 |
" FROM RELEASE_TAGS rt,"&_
|
|
|
56 |
" PROJECTS pr"&_
|
|
|
57 |
" WHERE rt.PROJ_ID = pr.PROJ_ID"&_
|
|
|
58 |
" AND rt.RTAG_ID = :SOURCE_RTAG_ID"
|
|
|
59 |
|
|
|
60 |
Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
61 |
|
|
|
62 |
OraDatabase.Parameters.Remove "SOURCE_RTAG_ID"
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
If rsQry.RecordCount > 0 Then
|
|
|
67 |
outobjDetails.Item ("location") = rsQry("location")
|
|
|
68 |
|
|
|
69 |
Else
|
|
|
70 |
Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. nSourceRtagId="& nSourceRtagId
|
|
|
71 |
|
|
|
72 |
End If
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
rsQry.Close
|
|
|
76 |
Set rsQry = Nothing
|
|
|
77 |
End Sub
|
|
|
78 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
79 |
Sub AddRelease ()
|
|
|
80 |
On Error Resume Next
|
|
|
81 |
|
|
|
82 |
OraDatabase.Parameters.Add "SOURCE_RTAG_ID", Request("source_rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
83 |
OraDatabase.Parameters.Add "PROJ_ID", Request("proj_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
84 |
OraDatabase.Parameters.Add "RTAG_NAME", Request("rtag_name"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
85 |
OraDatabase.Parameters.Add "RTAG_DESCRIPTION", Request("rtag_description"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
86 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
87 |
OraDatabase.Parameters.Add "IS_BRANCH", Request("branch"), ORAPARM_INPUT, ORATYPE_CHAR
|
|
|
88 |
|
|
|
89 |
objEH.TryORA ( OraSession )
|
|
|
90 |
|
|
|
91 |
OraDatabase.ExecuteSQL _
|
|
|
92 |
"BEGIN PK_RELEASE.NEW_RELEASE ( :RTAG_NAME, :RTAG_DESCRIPTION, :PROJ_ID, :SOURCE_RTAG_ID, :IS_BRANCH, :USER_ID ); END;"
|
|
|
93 |
|
|
|
94 |
objEH.CatchORA ( OraSession )
|
|
|
95 |
|
|
|
96 |
OraDatabase.Parameters.Add "SOURCE_RTAG_ID"
|
|
|
97 |
OraDatabase.Parameters.Add "PROJ_ID"
|
|
|
98 |
OraDatabase.Parameters.Add "RTAG_NAME"
|
|
|
99 |
OraDatabase.Parameters.Add "RTAG_DESCRIPTION"
|
|
|
100 |
OraDatabase.Parameters.Add "USER_ID"
|
|
|
101 |
OraDatabase.Parameters.Add "IS_BRANCH"
|
|
|
102 |
End Sub
|
|
|
103 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
104 |
%>
|
|
|
105 |
<%
|
|
|
106 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
107 |
' --- Get Form details from DB ---
|
|
|
108 |
Call GetFormDetails ( parSourceRtagId, objFormCollector )
|
|
|
109 |
|
|
|
110 |
' --- Load Validation Rules ---
|
|
|
111 |
Call objForm.LoadValidationRules ( Array("rtag_name","rtag_description"), OraDatabase ) ' Load Validation Rules
|
|
|
112 |
|
|
|
113 |
' --- Enter Form Validation Rule Changes here... ----
|
|
|
114 |
'----------------------------------------------------
|
|
|
115 |
|
|
|
116 |
' --- RUN onPostBack ---
|
|
|
117 |
If Request("action") <> "" Then
|
|
|
118 |
If objForm.IsValidOnPostBack Then
|
|
|
119 |
' --- Form is Valid ---
|
|
|
120 |
Call AddRelease()
|
|
|
121 |
|
|
|
122 |
If objEH.Finally Then
|
|
|
123 |
Call OpenInWindow ( "rtree.asp?DONE=OK&"& objPMod.ComposeURL() )
|
|
|
124 |
End If
|
|
|
125 |
|
|
|
126 |
End If
|
|
|
127 |
|
|
|
128 |
End If
|
|
|
129 |
|
|
|
130 |
'----------------------------------------------
|
|
|
131 |
%>
|
|
|
132 |
|
|
|
133 |
<html>
|
|
|
134 |
<head>
|
|
|
135 |
<title>Release Manager</title>
|
|
|
136 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
137 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
138 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
139 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
140 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
141 |
|
|
|
142 |
<!-- DROPDOWN MENUS -->
|
|
|
143 |
<!--#include file="_menu_def.asp"-->
|
|
|
144 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
145 |
|
|
|
146 |
</head>
|
|
|
147 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="FormName.rtag_name.focus();">
|
|
|
148 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
149 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
|
|
150 |
</div>
|
|
|
151 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
152 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
153 |
<!----------------------------------------------------->
|
|
|
154 |
<!-- HEADER -->
|
|
|
155 |
<!--#include file="_header.asp"-->
|
|
|
156 |
<!-- BODY ---->
|
|
|
157 |
|
|
|
158 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
159 |
<%
|
|
|
160 |
'-- FROM START ---------------------------------------------------------------------------------------------------------
|
|
|
161 |
objFormComponent.FormName = "FormName"
|
|
|
162 |
objFormComponent.Action = ScriptName
|
|
|
163 |
Call objFormComponent.FormStart()
|
|
|
164 |
%>
|
|
|
165 |
<tr>
|
|
|
166 |
<td width="1" background="images/bg_home_orange.gif" valign="top">
|
|
|
167 |
</td>
|
|
|
168 |
<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF"><table width="10" border="0" cellspacing="0" cellpadding="0">
|
|
|
169 |
<tr>
|
|
|
170 |
<td width="1%"></td>
|
|
|
171 |
<td width="100%">
|
|
|
172 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
173 |
<tr>
|
|
|
174 |
<td nowrap class="form_ttl">NEW RELEASE </td>
|
|
|
175 |
<td align="right" valign="bottom"></td>
|
|
|
176 |
</tr>
|
|
|
177 |
</table></td>
|
|
|
178 |
<td width="1%"></td>
|
|
|
179 |
</tr>
|
|
|
180 |
<tr>
|
|
|
181 |
<td align="left" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tl_cnr_b.gif" width="13" height="13"></td>
|
|
|
182 |
<td background="images/lbox_bg_blue.gif" class="lbox_ttl_w"><img src="images/h_trsp_dot.gif" width="600" height="15"></td>
|
|
|
183 |
<td align="right" valign="top" background="images/lbox_bg_blue.gif"><img src="images/lbox_tr_cnr_b.gif" width="13" height="13"></td>
|
|
|
184 |
</tr>
|
|
|
185 |
<tr>
|
|
|
186 |
<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td>
|
|
|
187 |
<td bgcolor="#FFFFFF" valign="top">
|
|
|
188 |
<%
|
|
|
189 |
If parSourceRtagId <> "" Then
|
|
|
190 |
Call Messenger ( "New release will be created from <br>"& objFormCollector.Item("location"), 3, "100%" )
|
|
|
191 |
End If
|
|
|
192 |
%>
|
|
|
193 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
194 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
195 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
196 |
<br>
|
|
|
197 |
<table width="100%" border="0" cellspacing="2" cellpadding="0">
|
|
|
198 |
<tr>
|
|
|
199 |
<td nowrap class="form_iname" valign="top">Release Name </td>
|
|
|
200 |
<td valign="top" nowrap><%=objFormComponent.TextBox ( "rtag_name", objFormCollector.Item("rtag_name"), "class='form_ivalue' size='60'" )%></td>
|
|
|
201 |
<td valign="top"><%=objForm.Validate ("rtag_name")%></td>
|
|
|
202 |
</tr>
|
|
|
203 |
<tr>
|
|
|
204 |
<td nowrap class="form_iname" valign="top">Branch Release </td>
|
|
|
205 |
<td valign="top" nowrap class="form_iname">
|
|
|
206 |
<input name="branch" type="radio" value="N" checked>
|
|
|
207 |
No
|
|
|
208 |
<input name="branch" type="radio" value="Y">
|
|
|
209 |
Yes</td>
|
|
|
210 |
<td valign="top"></td>
|
|
|
211 |
</tr>
|
|
|
212 |
<tr>
|
|
|
213 |
<td valign="top" nowrap class="form_iname">Comments</td>
|
|
|
214 |
<td valign="top"><%=objFormComponent.TextArea ( "rtag_description", Request("rtag_description"), 10, 60, "class='form_ivalue'" )%></td>
|
|
|
215 |
<td valign="top"><%=objForm.Validate ("rtag_description")%></td>
|
|
|
216 |
</tr>
|
|
|
217 |
<tr>
|
|
|
218 |
<td width="10%" class="form_iname"> </td>
|
|
|
219 |
<td width="1%"> </td>
|
|
|
220 |
<td width="90%" class="val_err"></td>
|
|
|
221 |
</tr>
|
|
|
222 |
</table>
|
|
|
223 |
|
|
|
224 |
</td>
|
|
|
225 |
<td background="images/lbox_bgside_white.gif"> </td>
|
|
|
226 |
</tr>
|
|
|
227 |
<tr>
|
|
|
228 |
<td background="images/bg_action_norm.gif" ></td>
|
|
|
229 |
<td align="right" background="images/bg_action_norm.gif" >
|
|
|
230 |
<%=objFormComponent.SubmitButton ( "Submit", "class='form_btn'" )%>
|
|
|
231 |
<%=objFormComponent.CancelButton ( "Cancel", "class='form_btn'", "rtree.asp?CANCEL=OK&"& objPMod.ComposeURL() )%>
|
|
|
232 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
233 |
<input type="hidden" name="source_rtag_id" value="<%=parSourceRtagId%>">
|
|
|
234 |
<input type="hidden" name="action" value="true">
|
|
|
235 |
</td>
|
|
|
236 |
<td background="images/bg_action_norm.gif" ><img src="images/h_trsp_dot.gif" width="5" height="30"></td>
|
|
|
237 |
</tr>
|
|
|
238 |
<tr>
|
|
|
239 |
<td background="images/lbox_bg_blue.gif" valign="bottom"><img src="images/lbox_bl_cnr_b.gif" width="13" height="13"></td>
|
|
|
240 |
<td background="images/lbox_bg_blue.gif"></td>
|
|
|
241 |
<td background="images/lbox_bg_blue.gif" valign="bottom" align="right"><img src="images/lbox_br_cnr_b.gif" width="13" height="13"></td>
|
|
|
242 |
</tr>
|
|
|
243 |
</table>
|
|
|
244 |
|
|
|
245 |
<!-- ACTION BUTTONS ---------------------------------------------->
|
|
|
246 |
<!-- ACTION BUTTONS END ------------------------------------------></td>
|
|
|
247 |
<td width="1" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="1"></td>
|
|
|
248 |
</tr>
|
|
|
249 |
<tr>
|
|
|
250 |
<td valign="bottom" align="center" background="images/bg_home_orange.gif"><img src="images/img_vtree.gif" width="86" height="99" vspace="20" hspace="30"></td>
|
|
|
251 |
<td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
|
|
|
252 |
</tr>
|
|
|
253 |
<%
|
|
|
254 |
Call objFormComponent.FormEnd()
|
|
|
255 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
256 |
%>
|
|
|
257 |
</table>
|
|
|
258 |
|
|
|
259 |
|
|
|
260 |
<!-- FOOTER -->
|
|
|
261 |
<!--#include file="_footer.asp"-->
|
|
|
262 |
</body>
|
|
|
263 |
</html>
|
|
|
264 |
<%
|
|
|
265 |
Call Destroy_All_Objects
|
|
|
266 |
%>
|