Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
64 jtweddle 1
<%
2
'=====================================================
3
'|	                  			                     |
4
'|	         	    REPORTS DEFINITION	  		     |
5
'|                                                   |
6
'=====================================================
7
%>
8
<%
9
Sub Reports_List ( SSgroup )
10
	Dim repNum
11
%>  <!-- REPORTS LIST -------------------------------------------------------->
12
	<%Select Case SSgroup%>
13
	<%Case "Advanced_Search"%>
14
	<%repNum = 1%>
15
	<strong>Find ClearQuest Bugs / Issues Location</strong><br>
70 brianf 16
    Use this advance search to locate bugs / issues imported to Release Manager from ClearQuest.<br>
17
    <a href="rep_where_are_bugs_located.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
64 jtweddle 18
	<%repNum = 2%>
19
    <strong>Find Packages Using "Ignore Warnings" feature</strong><br>
70 brianf 20
    Lists packages which use "Ignore Warning" feature on their dependencies.<br>
64 jtweddle 21
    <a href="rep_packages_using_ignore_feature.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
22
	<%repNum = 4%>
23
	<strong>Find A Package</strong><br>
70 brianf 24
    Use this advanced search to find a package in Release Manager<br>
64 jtweddle 25
    <a href="rep_find_package.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
26
	<%repNum = 5%>
27
	<strong>Find Package Version History</strong><br>
70 brianf 28
    Find all package versions and their current locations.<br>
64 jtweddle 29
    <a href="rep_package_version_history.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
30
	<%Case "Release_Status"%>
31
	<%repNum = 3%>
32
	<strong>Current Status of Release</strong><br>
33
	Shows all packages in a selected release with their current state, owner and last modifier.<br>
34
	<a href="rep_current_state_of_release.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
35
	<%repNum = 8%>
36
	<strong>Deployable Software Modules</strong><br>
37
	This report shows new and current deployable software modules. Use this report to find which modules will be deployed to the customer.<br>
38
	Also, use this report to find if there are new modules flaged as 'deployable'.<br>
39
	<a href="rep_depoyable_software_modules.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
40
	<%repNum = 7%>
41
	<strong>Unit Tests per Package</strong><br>
42
	Use this report to check the unit tests performed on packages in a project.<br>
43
	<a href="rep_unit_tests_per_package.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
44
	<strong>All Packages With out-of-sync Dependencies</strong><br>
70 brianf 45
	List of all packages with dependencies out-of-sync with the release environment.<br>
64 jtweddle 46
	In escence, these are the packages which has versions in "latest" column of their dependencies.<br>
47
	Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
48
	<%Case "Bom_History"%>
49
	<%repNum = 9%>
50
	<strong>BOM History Tracker</strong><br>
51
	Use this report to find what changes occured in a BOM within specified date range.<br>
52
	<a href="rep_bill_of_materials.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
53
	<%Case "Admin_Reports"%>
54
	<strong>All Packages by Project by Version Tree by Release</strong><br>
55
	CSV output of all packages used in Release Manager per Project.<br>
56
	<a href="rep_all_packages_by_project_by_vtree_by_release.asp" target="_blank" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
57
	<strong>All Runtime Dependencies by Project by Version Tree by Release</strong><br>
58
	CSV output of all runtime dependencies used in Release Manager per Project.<br>
59
	<a href="rep_all_runtime_dependencies_by_project_by_vtree_by_release.asp" target="_blank" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
60
	<%repNum = 6%>
61
	<strong>Unused Packages</strong><br>
62
	All packages (Not Products) with no entries in "Used By" tab.<br>
70 brianf 63
    Use this report to help you clean up a release and remove all potentially unused packages.<br>
64 jtweddle 64
    <a href="rep_obsolete_packages.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
65
	<%Case "Escrow"%>
66
	<%repNum = 9%>
67
	<strong>Bill of Materials (BOM)</strong><br>
70 brianf 68
	List of all ERG Products per network node for a particular
64 jtweddle 69
	project. Use this report to integrate a particular project.<br>
70
	<a href="rep_bill_of_materials.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
71
	<strong>Build Dependencies per Package</strong><br>
70 brianf 72
	Use this report to build package from source code. The report
64 jtweddle 73
	include package repository location, label and build dependencies.<br>
74
	Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
75
	<strong>Build Order</strong><br>
76
	Use this reports to find the order in which packages should be built.<br>
77
	Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
78
	<%Case "Bom_Difference"%>
79
	<strong>BOM Version Difference Tool</strong><br>
80
	Use this tool to find what changes occured in a BOM compared to another BOM. <br>
81
	A detailed report of changes between two BOMs can also be emailed upon user request.<br>
70 brianf 82
    <a href="diff.asp" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
64 jtweddle 83
	<%Case "Bom_Merge_Manager"%>
84
	<strong>BOM Merge Manager Tool</strong><br>
85
	Use this tool to merge in a change from one BOM to another. <br>
70 brianf 86
    <a href="diffmerge.asp" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
64 jtweddle 87
	<%Case Else%>
88
	<b>&laquo; Select reporting category.</b>
89
	<%End Select%>
90
	<!-- REPORTS LIST END-------------------------------------------------------->
91
 
92
<%End Sub%>
93
 
94
<%
95
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
96
Sub Get_Projects ( NNproj_id, BBallow_all )
97
	Dim rsTemp, Query_String
70 brianf 98
 
64 jtweddle 99
	Query_String = _
100
	"SELECT * FROM DM_PROJECTS ORDER BY proj_name ASC"
101
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
70 brianf 102
 
64 jtweddle 103
	Response.write "<select name='FRproj_id' onChange=""Cascaded_Menu('parent','"& SCRIPT_NAME &"?FRvtree_id=&FRrtag_id=&group="& Request("group") &"&repnum="& Request("repnum") &"&FRproj_id=',this,0)"" class='form_item'>"
104
		If BBallow_all Then
105
			Response.write "<option value='-1'>ALL</option>"
106
		Else
107
			Response.write "<option></option>"
108
		End If
70 brianf 109
 
64 jtweddle 110
		While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
111
			If CDbl(NNproj_id) = CDbl(rsTemp.Fields("proj_id")) Then
112
	        	Response.write "<option value='"& rsTemp.Fields("proj_id") &"' selected>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
113
	        Else
114
				Response.write "<option value='"& rsTemp.Fields("proj_id") &"'>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
115
			End If
116
			rsTemp.MoveNext
117
		WEnd
118
	Response.write "</select>"
70 brianf 119
 
64 jtweddle 120
	rsTemp.Close
121
	Set rsTemp = nothing
122
End Sub
123
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
124
Sub Get_Version_Trees ( NNproj_id, NNvtree_id, BBallow_all )
125
	Dim rsTemp, Query_String
70 brianf 126
 
64 jtweddle 127
	Query_String = _
128
	"SELECT vtree_id, vtree_name FROM vtrees WHERE hide = 'N' AND proj_id = "& NNproj_id &" ORDER BY vtree_id ASC"
129
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
70 brianf 130
 
64 jtweddle 131
	Response.write "<select name='FRvtree_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRproj_id="& NNproj_id &"&FRrtag_id=&group="& Request("group") &"&repnum="& Request("repnum") &"&FRvtree_id=',this,0)"" class='form_item'>"
132
		If BBallow_all Then
133
			Response.write "<option value='-1'>ALL</option>"
134
		Else
135
			Response.write "<option></option>"
136
		End If
70 brianf 137
 
64 jtweddle 138
		If NNproj_id <> -1 Then
139
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
140
				If CDbl(NNvtree_id) = CDbl(rsTemp.Fields("vtree_id")) Then
141
		        	Response.write "<option value='"& rsTemp.Fields("vtree_id") &"' selected>"& (rsTemp.Fields("vtree_name")) &"</option>"
142
		        Else
143
					Response.write "<option value='"& rsTemp.Fields("vtree_id") &"'>"& (rsTemp.Fields("vtree_name")) &"</option>"
144
				End If
145
				rsTemp.MoveNext
146
			WEnd
147
		End If
148
	Response.write "</select>"
70 brianf 149
 
64 jtweddle 150
	rsTemp.Close
151
	Set rsTemp = nothing
152
End Sub
153
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
154
Sub Get_Release_Labels ( NNproj_id, NNrtag_id, BBallow_all )
155
	Dim rsTemp, Query_String
156
 
157
	Query_String = _
158
	"SELECT * FROM BRANCHES WHERE proj_id = "& NNproj_id &" ORDER BY branch_id ASC"
159
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
70 brianf 160
 
64 jtweddle 161
	Response.write "<select name='FRrtag_id' onChange=""Cascaded_Menu('parent','"& SCRIPT_NAME &"?FRproj_id="& NNproj_id &"&group="& Request("group") &"&repnum="& Request("repnum") &"&FRrtag_id=',this,0)"" class='form_item'>"
162
	If BBallow_all Then
163
		Response.write "<option value='-1'>ALL</option>"
164
	Else
165
		Response.write "<option></option>"
166
	End If
70 brianf 167
 
64 jtweddle 168
		If NNproj_id <> -1 Then
169
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
170
				If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("branch_id")) Then
171
		        	Response.write "<option value='"& rsTemp.Fields("branch_id") &"' selected>"& (rsTemp.Fields("branch_name")) &"</option>"
172
		        Else
173
					Response.write "<option value='"& rsTemp.Fields("branch_id") &"'>"& (rsTemp.Fields("branch_name")) &"</option>"
174
				End If
175
				rsTemp.MoveNext
176
			WEnd
177
		End If
178
	Response.write "</select>"
70 brianf 179
 
64 jtweddle 180
	rsTemp.Close
181
	Set rsTemp = nothing
182
End Sub
183
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
184
Sub Get_SBOM_Version ( NNproj_id, NNrtag_id, BBallow_all, NNversion )
185
	Dim rsTemp, Query_String
70 brianf 186
 
64 jtweddle 187
	Query_String = _
188
	"SELECT B.BOM_ID, B.BRANCH_ID, B.BOM_VERSION ||'.'||B.BOM_LIFECYCLE AS VERSION, BN.BOM_NAME FROM BOMS B, BOM_NAMES BN WHERE B.BRANCH_ID ="&NNrtag_id&" AND BN.BOM_NAME_ID = B.BOM_NAME_ID ORDER BY VERSION"
189
 
70 brianf 190
 
64 jtweddle 191
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
192
 
70 brianf 193
 
64 jtweddle 194
	Response.write "<select name='FRversion' class='form_item'>"
195
	If BBallow_all Then
196
		Response.write "<option value='-1'>ALL</option>"
197
	Else
198
		Response.write "<option></option>"
199
	End If
200
 
201
		If NNrtag_id <> -1 Then
202
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
203
				If CStr(NNversion) = CStr(rsTemp.Fields("version")) Then
204
		        	Response.write "<option value='"& rsTemp.Fields("version") &"' selected>"& rsTemp("BOM_NAME") &" "& (rsTemp.Fields("version")) &"</option>"
205
		        Else
206
					Response.write "<option value='"& rsTemp.Fields("version") &"'>"& rsTemp("BOM_NAME") &" "& (rsTemp.Fields("version")) &"</option>"
207
				End If
208
				rsTemp.MoveNext
209
			WEnd
210
		End If
211
	Response.write "</select>"
212
	rsTemp.Close
213
	Set rsTemp = nothing
214
 
215
End Sub
216
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
217
Sub Get_Branches ( NNproj_id, NNrtag_id, BBallow_all )
218
	Dim rsTemp, Query_String
70 brianf 219
 
64 jtweddle 220
	Query_String = _
221
	"SELECT * FROM branches WHERE proj_id = "& NNproj_id &" ORDER BY branch_id ASC"
222
	Set rsTemp = OraDatabaseDM.DbCreateDynaset( Query_String, cint(0))
223
	Response.write "<select name='FRbranch_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRproj_id="& NNproj_id &"&group="& Request("group") &"&repnum="& Request("repnum") &"&FRrtag_id=',this,0)"" class='form_item'>"
224
	If BBallow_all Then
225
		Response.write "<option value='-1'>ALL</option>"
226
	Else
227
		Response.write "<option></option>"
228
	End If
70 brianf 229
 
64 jtweddle 230
		If NNproj_id <> -1 Then
231
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
232
				If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("branch_id")) Then
233
		        	Response.write "<option value='"& rsTemp.Fields("branch_id") &"' selected>"& (rsTemp.Fields("branch_name")) &"</option>"
234
		        Else
235
					Response.write "<option value='"& rsTemp.Fields("branch_id") &"'>"& (rsTemp.Fields("branch_name")) &"</option>"
236
				End If
237
				rsTemp.MoveNext
238
			WEnd
239
		End If
240
	Response.write "</select>"
241
 
242
	rsTemp.Close
243
	Set rsTemp = nothing
244
End Sub
245
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
246
 
247
Sub Get_Base_Views ( nRtag_id, nBase_view_id, BBallow_all )
248
	Dim rsTemp, Query_String
70 brianf 249
 
64 jtweddle 250
	Query_String = _
251
	"SELECT DISTINCT vi.view_id, vi.view_name"&_
252
	"  FROM VIEWS vi,"&_
253
	"   		RELEASE_CONTENT rc"&_
254
	" WHERE rc.BASE_VIEW_ID = vi.VIEW_ID"&_
255
	"   AND rc.rtag_id = "& nRtag_id &_
256
	"ORDER BY UPPER( vi.view_name )"
70 brianf 257
 
64 jtweddle 258
	Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
70 brianf 259
 
64 jtweddle 260
	Response.write "<select name='FRbase_view_id' class='form_item'>"
261
	If BBallow_all Then
262
		Response.write "<option value='-1'>ALL</option>"
263
	Else
264
		Response.write "<option></option>"
265
	End If
70 brianf 266
 
64 jtweddle 267
		If nRtag_id <> -1 Then
268
			While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
269
				If CDbl(nBase_view_id) = CDbl(rsTemp.Fields("view_id")) Then
270
		        	Response.write "<option value='"& rsTemp.Fields("view_id") &"' selected>"& (rsTemp.Fields("view_name")) &"</option>"
271
		        Else
272
					Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& (rsTemp.Fields("view_name")) &"</option>"
273
				End If
274
				rsTemp.MoveNext
275
			WEnd
276
		End If
277
	Response.write "</select>"
70 brianf 278
 
64 jtweddle 279
	rsTemp.Close
280
	Set rsTemp = nothing
281
End Sub
282
%>
283
<%
284
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
285
'==================================================================================
286
' Report Name		: 	Packages Using Ignore Feature
70 brianf 287
' Description		:	Lists packages which use "Ignore Warning"
64 jtweddle 288
'						feature on their dependencies.
289
' INPUT				:	Project, Vesion Tree, Release Label
290
'==================================================================================
291
Sub Packages_Using_Ignore_Feature ( SSsection, NNproj_id, NNrtag_id )
292
	Dim Query_String, rsRep
293
	Const Allow_All = TRUE
70 brianf 294
 
64 jtweddle 295
	If NNproj_id = "" Then NNproj_id = -1
296
	If NNrtag_id = "" Then NNrtag_id = -1
70 brianf 297
 
64 jtweddle 298
	If SSsection = "TITLE" Then
299
		Response.write "Packages Using 'Ignore Warnings' Feature"
300
		Exit Sub
301
	End If
70 brianf 302
 
303
 
64 jtweddle 304
	If SSsection = "FORM" Then
305
	%>
306
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
307
	  <form action="<%=scriptName%>" method="post" name="repform">
70 brianf 308
      <tr>
64 jtweddle 309
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
310
        <td width="1%" align="right" nowrap class="form_field">Project</td>
311
        <td width="100%"><%Call Get_Projects( NNproj_id, Allow_All )%></td>
312
      </tr>
70 brianf 313
      <tr>
64 jtweddle 314
        <td nowrap class="form_field">&nbsp;</td>
315
        <td align="right" nowrap class="form_field">Release</td>
316
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Allow_All )%></td>
317
      </tr>
70 brianf 318
      <tr>
64 jtweddle 319
        <td nowrap class="form_field">&nbsp;</td>
320
        <td align="right" nowrap class="form_field">&nbsp;</td>
321
        <td><br>
322
			<input type="hidden" name="group" value="<%=parGroup%>">
323
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
324
			<input type="hidden" name="action" value="true">
70 brianf 325
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 326
        </td>
327
      </tr>
328
	  </form>
329
    </table>
330
	<%	Exit Sub
331
	End If
70 brianf 332
 
333
 
64 jtweddle 334
	If SSsection = "BODY" Then
335
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 336
 
64 jtweddle 337
		Query_String = ReadFile( rootPath & "queries\rep_packages_using_ignore_feature.sql" )
70 brianf 338
 
64 jtweddle 339
		OraDatabase.Parameters.Add "PROJ_ID", NNproj_id, ORAPARM_INPUT, ORATYPE_NUMBER
340
		OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
341
	%>
342
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 343
      <tr>
64 jtweddle 344
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
345
        <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
346
        <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
347
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
348
      </tr>
70 brianf 349
      <tr>
64 jtweddle 350
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
351
      </tr>
352
	  <%
353
	  Dim currRtag_id
354
	  currRtag_id = -1
355
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 356
 
64 jtweddle 357
	  If rsRep.RecordCount = 0 Then
358
	  	With Response
359
			.write "<tr>"
360
			.write "<td colspan='4' class='body_row'>Found 0 records</td>"
361
			.write "</tr>"
362
		End With
363
	  End If
70 brianf 364
 
64 jtweddle 365
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
366
		  ' -------- GROUP BY RTAG_ID -----------------
367
		  If CDbl(currRtag_id) <> CDbl(rsRep("rtag_id")) Then
368
		  %>
70 brianf 369
	      <tr>
64 jtweddle 370
	        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
371
	        <td></td>
372
	      </tr>
70 brianf 373
	      <tr>
64 jtweddle 374
	        <td colspan="4" nowrap class="body_scol"><%=rsRep("proj_name")  &" &gt; "& rsRep("rtag_name")%></td>
375
	      </tr>
376
		  <%
377
		  	currRtag_id = CDbl(rsRep("rtag_id"))
378
		  End If
379
		  ' -------- END GROUP ------------------------
380
		  %>
70 brianf 381
	      <tr>
64 jtweddle 382
	        <td class="body_row"></td>
383
	        <td nowrap><a href="dependencies.asp?rtag_id=<%=rsRep("rtag_id")%>&pv_id=<%=rsRep("pv_id")%>" class="txt_linked"><%=rsRep("pkg_name")%></a></td>
384
	        <td nowrap><a href="dependencies.asp?rtag_id=<%=rsRep("rtag_id")%>&pv_id=<%=rsRep("pv_id")%>" class="txt_linked"><%=rsRep("pkg_version")%></a></td>
385
	        <td class="body_row"></td>
386
	      </tr>
387
	  <%  rsRep.MoveNext
388
	  WEnd
389
	  %>
70 brianf 390
      <tr>
64 jtweddle 391
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
392
        <td></td>
393
      </tr>
70 brianf 394
	  <tr>
64 jtweddle 395
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
396
      </tr>
397
    </table>
398
	<!-- PRINT, SAVE, ETC. ------------>
399
	<%If parPrint = "" Then%>
400
	<br>
401
	<br>
402
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
403
	<br>
404
	<%End If%>
405
	<!-- PRINT, SAVE, ETC. END -------->
406
	<%
407
		rsRep.Close
408
		Set rsRep = nothing
409
	End If
70 brianf 410
 
64 jtweddle 411
End Sub
412
%>
413
<%
414
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
415
'==================================================================================
416
' Report Name		: 	Current State of Release
417
' Description		:	Show all packages in a release with their state, owner and modifier
418
' Form Input		:	Project, Vesion Tree, Release Label
419
' SQL INPUT			:	rtag_id
420
'==================================================================================
421
Sub Current_State_of_Release ( SSsection, NNproj_id, NNrtag_id, NNpkg_states )
422
	Dim Query_String, rsRep
423
	Const Disallow_All = FALSE
70 brianf 424
 
64 jtweddle 425
	If NNproj_id = "" Then NNproj_id = -1
426
	If NNrtag_id = "" Then NNrtag_id = -1
427
	If NNpkg_states = "" Then NNpkg_states = -1
70 brianf 428
 
64 jtweddle 429
	If SSsection = "TITLE" Then
430
		Response.write "Current State of Release"
431
		Exit Sub
432
	End If
70 brianf 433
 
434
 
64 jtweddle 435
	If SSsection = "FORM" Then
436
	%>
437
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
438
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
70 brianf 439
      <tr>
64 jtweddle 440
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
441
        <td width="1%" align="right" nowrap class="form_field">Project</td>
442
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
443
      </tr>
70 brianf 444
      <tr>
64 jtweddle 445
        <td nowrap class="form_field">&nbsp;</td>
446
        <td align="right" nowrap class="form_field">Release</td>
447
        <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
448
      </tr>
70 brianf 449
	  <tr>
64 jtweddle 450
        <td nowrap class="form_field">&nbsp;</td>
451
        <td align="right" nowrap class="form_field">Package States</td>
452
        <td class="form_field" nowrap>
453
		<span style="border: 1px solid #808080;">&nbsp;OK&nbsp;<input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_OK%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_OK) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
454
		<span style="border: 1px solid #808080;"><%=enum_imgCritical%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MAJOR%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MAJOR) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
455
		<span style="border: 1px solid #808080;"><%=enum_imgWarning%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MINOR%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MINOR) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
456
		<span style="border: 1px solid #808080;"><%=enum_imgCReady%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MAJOR_READY%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MAJOR_READY) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
457
		<span style="border: 1px solid #808080;"><%=enum_imgWReady%><input type="checkbox" name="FRpkg_state" value="<%=enumPKG_STATE_MINOR_READY%>" <%If InStr( Request("FRpkg_state"), Cstr(enumPKG_STATE_MINOR_READY) ) > 0 Then%>checked<%End If%>></span>&nbsp;&nbsp;
458
		</td>
459
      </tr>
70 brianf 460
      <tr>
64 jtweddle 461
        <td nowrap class="form_field">&nbsp;</td>
462
        <td align="right" nowrap class="form_field">&nbsp;</td>
463
        <td><br>
464
			<input type="hidden" name="group" value="<%=parGroup%>">
465
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
466
			<input type="hidden" name="action" value="true">
70 brianf 467
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 468
        </td>
469
      </tr>
470
	  </form>
471
    </table>
472
	<%	Exit Sub
473
	End If
70 brianf 474
 
475
 
64 jtweddle 476
	If SSsection = "BODY" Then
477
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 478
 
64 jtweddle 479
		Query_String = ReadFile( rootPath & "queries\rep_details_current_status_of_release.sql" )
480
		Query_String = Replace ( Query_String, "/*PKG_STATES*/", NNpkg_states )
70 brianf 481
 
64 jtweddle 482
		OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
483
	%>
484
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 485
      <tr>
64 jtweddle 486
	    <td width="1%" nowrap class="body_colb">&nbsp;</td>
487
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
488
		<td width="1%" nowrap class="body_colb">&nbsp;</td>
489
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
490
        <td width="1%" nowrap class="body_colb">Owner&nbsp;&nbsp;&nbsp;</td>
491
		<td width="1%" nowrap class="body_colb">Last Modifier&nbsp;&nbsp;&nbsp;</td>
492
		<td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
493
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
494
      </tr>
70 brianf 495
      <tr>
64 jtweddle 496
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
497
      </tr>
498
	   <%
499
	  Dim currView_id
500
	  currView_id = -1
501
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 502
 
64 jtweddle 503
	  If rsRep.RecordCount = 0 Then
504
	  	With Response
505
			.write "<tr>"
506
			.write "<td colspan='8' class='body_row'>Found 0 records</td>"
507
			.write "</tr>"
508
		End With
509
	  End If
70 brianf 510
 
64 jtweddle 511
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
512
		  ' -------- GROUP BY RTAG_ID -----------------
513
		  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
514
		  %>
70 brianf 515
	      <tr>
64 jtweddle 516
	        <td colspan="7" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
517
	        <td></td>
518
	      </tr>
70 brianf 519
		  <tr>
64 jtweddle 520
	        <td colspan="8" nowrap class="body_scol"><%=rsRep("view_name")%></td>
521
	      </tr>
522
		  <%
523
		  	currView_id = CDbl(rsRep("view_id"))
524
		  End If
525
		  ' -------- END GROUP ------------------------
526
		  %>
70 brianf 527
	      <tr>
64 jtweddle 528
		  	<td class="body_row"></td>
529
		  	<td><%=DefineStateIcon ( rsRep("pkg_state"), rsRep("dlocked"), NULL, NULL, NULL, NULL )%></td>
530
			<%If rsRep("dlocked") = "Y" Then%>
531
		    	<td align="center" class="form_item"><img src='images/i_locked.gif' width='7' height='10' hspace='6'></td>
532
			<%Else%>
70 brianf 533
		    	<td align="center" class="form_item"><img src='images/spacer.gif' width='7' height='10' hspace='6'></td>
64 jtweddle 534
			<%End If%>
535
	        <td nowrap class="body_row"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
536
	        <td nowrap><a href="mailto:<%=rsRep("owner_email")%>" class="txt_linked"><%=rsRep("owner")%></a>&nbsp;&nbsp;&nbsp;</td>
537
			<td nowrap><a href="mailto:<%=rsRep("modifier_email")%>" class="txt_linked"><%=rsRep("modifier")%></a>&nbsp;&nbsp;&nbsp;</td>
538
	        <td class="body_row"><%=EuroDate( rsRep("insert_stamp") )%></td>
539
			<td class="body_row"></td>
540
	      </tr>
541
	  <%  rsRep.MoveNext
542
	  WEnd
543
	  %>
70 brianf 544
	  <tr>
64 jtweddle 545
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
546
      </tr>
547
    </table>
548
	<!-- PRINT, SAVE, ETC. ------------>
549
	<%If parPrint = "" Then%>
550
	<br>
551
	<br>
552
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
553
	<br>
554
	<%End If%>
555
	<!-- PRINT, SAVE, ETC. END -------->
556
	<%
557
		rsRep.Close
558
		Set rsRep = nothing
559
	End If
70 brianf 560
 
64 jtweddle 561
End Sub
562
%>
563
<%
564
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
565
'==================================================================================
566
' Report Name		: 	Find ClearQuest Bugs / Issues Location
567
' Description		:	Locates bugs / issues imported from ClearQuest
568
' Form Input		:	CQ issue Database, CQ issue number list space separated
569
'==================================================================================
570
Sub Where_Are_Bugs_Located ( SSsection, NNiss_db, SSiss_num_list )
571
	Dim Query_String, rsRep
70 brianf 572
 
64 jtweddle 573
	If SSsection = "TITLE" Then
574
		Response.write "Find ClearQuest Bugs / Issues Location"
575
		Exit Sub
576
	End If
70 brianf 577
 
578
 
64 jtweddle 579
	If SSsection = "FORM" Then
580
	%>
581
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
582
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRiss_num_list','Issue Number','R');return document.MM_returnValue">
70 brianf 583
      <tr>
64 jtweddle 584
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
585
        <td width="1%" align="right" nowrap class="form_field" valign="top">ClearQuest Database</td>
586
        <td width="100%">
587
		<select name="FRiss_db" class="form_item">
588
			<option value="<%=enumCLEARQUEST_DEVI_ID%>" <%If CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then%>selected<%End If%>>DEVI</option>
589
			<option value="<%=enumCLEARQUEST_TDSE_ID%>" <%If CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then%>selected<%End If%>>TDSE</option>
590
        </select>
591
		</td>
592
      </tr>
70 brianf 593
      <tr>
64 jtweddle 594
        <td nowrap class="form_field">&nbsp;</td>
595
        <td align="right" nowrap class="form_field" valign="top">Issue Numbers</td>
596
        <td class="form_txt"><input type="text" name="FRiss_num_list" size="50" class="form_item" value="<%=SSiss_num_list%>"><br>
597
		HINTS:<br>
598
		- You can use * wildcard. e.g. *0123 or 0123* or *0123*<br>
599
		- Use space separated issue numbers for multiple search.</td>
600
      </tr>
70 brianf 601
      <tr>
64 jtweddle 602
        <td nowrap class="form_field">&nbsp;</td>
603
        <td align="right" nowrap class="form_field">&nbsp;</td>
604
        <td><br>
605
			<input type="hidden" name="group" value="<%=parGroup%>">
606
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
607
			<input type="hidden" name="action" value="true">
70 brianf 608
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 609
        </td>
610
      </tr>
611
	  </form>
612
    </table>
613
	<%	Exit Sub
614
	End If
70 brianf 615
 
616
 
64 jtweddle 617
	If SSsection = "BODY" Then
618
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 619
 
64 jtweddle 620
		Dim SSsql, issARR, num_item, iss_num_col, issNumDict, rsCQ, recCount, maxRecCount
621
		Set issNumDict = CreateObject("Scripting.Dictionary")
70 brianf 622
 
623
 
64 jtweddle 624
		'---- Find Issue numbers in ClearQuest ----
625
		If CDbl(NNiss_db) = enumCLEARQUEST_MASSI_ID Then
626
			iss_num_col = "new_num"
627
			SSsql = _
628
			" SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
629
			" FROM MASSI.admin.software_issue si"&_
630
			" WHERE "
70 brianf 631
 
632
 
64 jtweddle 633
		ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DPGIM_ID Then
634
			iss_num_col = "new_num"
635
			SSsql = _
636
			" SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
637
			" FROM DPGIM.admin.software_issue si"&_
638
			" WHERE "
70 brianf 639
 
640
 
64 jtweddle 641
		ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
642
			iss_num_col = "new_num"
643
			SSsql = _
644
			" SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
70 brianf 645
      " FROM CQ_DEVI.admin.software_issue si"&_
64 jtweddle 646
			" WHERE "
70 brianf 647
 
648
 
64 jtweddle 649
		ElseIf CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then
650
			iss_num_col = "job_number"
651
			SSsql = _
652
			" SELECT dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
70 brianf 653
      " FROM CQ_TDSE.admin.request si"&_
64 jtweddle 654
			" WHERE "
70 brianf 655
 
64 jtweddle 656
		End If
70 brianf 657
 
658
 
64 jtweddle 659
		'---- Split multiple search ----
660
		SSiss_num_list = Trim(SSiss_num_list)
661
		If InStr( SSiss_num_list, " " ) > 0 Then
662
			' space separator found
663
			issARR = Split ( SSiss_num_list, " ")
70 brianf 664
 
64 jtweddle 665
			For Each num_item In issARR
666
				If num_item <> "" Then
667
					SSsql = SSsql & " (si."& iss_num_col &" LIKE '"& Replace( SQLstring(num_item), "*", "%" ) &"') OR"
668
				End If
669
			Next
70 brianf 670
 
64 jtweddle 671
			SSsql = Left ( SSsql, Len(SSsql) - 2 )		' Removes last OR
70 brianf 672
 
64 jtweddle 673
		Else
674
			SSsql = SSsql & " (si."& iss_num_col &" LIKE '"& Replace( SQLstring(SSiss_num_list), "*", "%") &"')"
70 brianf 675
 
64 jtweddle 676
		End If
70 brianf 677
 
4556 dpurdie 678
        Set rsCQ = OraDatabase.DbCreateDynaset( SSsql, cint(0))
70 brianf 679
 
64 jtweddle 680
		' Get find results from CQ
681
		recCount = 1
682
		maxRecCount = 1000
683
		issNumDict.ADD "-1", "-1"		' take care of no results
684
		While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF) AND (recCount < maxRecCount))
685
			issNumDict.ADD Cstr(rsCQ("iss_id")), Cstr(rsCQ("iss_num"))
686
			recCount = recCount + 1
687
			rsCQ.MoveNext
688
		WEnd
70 brianf 689
 
64 jtweddle 690
		rsCQ.Close
691
		Set rsCQ = nothing
70 brianf 692
 
64 jtweddle 693
		Query_String = ReadFile( rootPath & "queries\rep_where_are_bugs_located.sql" )
694
		Query_String = Replace ( Query_String, "/*ISS_DB*/", NNiss_db )
695
		Query_String = Replace ( Query_String, "/*ISS_ID_LIST*/", Join( issNumDict.Keys, ",") )
70 brianf 696
 
64 jtweddle 697
	%>
698
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 699
      <tr>
64 jtweddle 700
        <td width="1%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
701
		<td width="1%" nowrap class="body_colb">Fixed At</td>
702
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
703
        <td width="1%" nowrap class="body_colb">Notes&nbsp;&nbsp;&nbsp;</td>
704
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
705
      </tr>
70 brianf 706
      <tr>
64 jtweddle 707
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
708
      </tr>
709
	   <%
710
	  Dim currIss_id
711
	  currIss_id = -1
712
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 713
 
64 jtweddle 714
	  If rsRep.RecordCount = 0 Then
715
	  	With Response
716
			.write "<tr>"
717
			.write "<td colspan='5' class='body_row'>Found 0 records</td>"
718
			.write "</tr>"
719
		End With
720
	  End If
70 brianf 721
 
64 jtweddle 722
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
723
		  ' -------- GROUP BY ISS_ID -----------------
724
		  If Cstr(currIss_id) <> Cstr(rsRep("iss_id")) Then
725
		  %>
70 brianf 726
		  <tr>
64 jtweddle 727
	        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
728
	        <td></td>
729
	      </tr>
70 brianf 730
	      <tr>
64 jtweddle 731
	        <td nowrap><a href="javascript:;" onClick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=NNiss_db%>&iss_id=<%= rsRep("iss_id")%>','IssueDetails','resizable=yes,width=580,height=500')" class="body_scol"><img src="images/i_drill_down.gif" width="12" height="14" hspace="3" border="0" align="absmiddle" alt="See issue details."><%=issNumDict.Item ( Cstr ( rsRep("iss_id") ) )%></a></td>
732
			<td colspan='4' class="body_scol"></td>
733
	      </tr>
734
		  <%
735
		  	currIss_id = Cstr(rsRep("iss_id"))
736
		  End If
737
		  ' -------- END GROUP ------------------------
738
		  %>
70 brianf 739
	      <tr>
64 jtweddle 740
		  	<td class="body_row"></td>
741
			<%If CDbl(rsRep("iss_state")) = enumISSUES_STATE_FIXED Then%>
742
		    	<td align="right"><img src="images/i_tick.gif" width="7" height="7" hspace="6"></td>
743
			<%Else%>
70 brianf 744
		    	<td align="right"><img src='images/spacer.gif' width='7' height='7' hspace='6'></td>
64 jtweddle 745
			<%End If%>
746
	        <td nowrap class="body_row" valign="top"><a href="rep_find_package.asp?<%="group=Advanced_Search&repnum=4&action=true&FRpkg_name="& rsRep("pkg_name") &"&FRv_ext="& rsRep("v_ext")%>" class="txt_linked"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%><img src="images/i_drill_down.gif" width="12" height="14" hspace="3" border="0" align="absmiddle" alt="Find this package."></a></td>
747
	        <td nowrap><%=rsRep("notes")%></td>
748
			<td class="body_row"></td>
749
	      </tr>
750
	  <%  rsRep.MoveNext
751
	  WEnd
752
	  %>
70 brianf 753
	  <tr>
64 jtweddle 754
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
755
      </tr>
756
    </table>
757
	<!-- PRINT, SAVE, ETC. ------------>
758
	<%If parPrint = "" Then%>
759
	<br>
760
	<br>
761
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
762
	<br>
763
	<%End If%>
764
	<!-- PRINT, SAVE, ETC. END -------->
765
	<%
766
		rsRep.Close
767
		Set rsRep = nothing
768
	End If
70 brianf 769
 
64 jtweddle 770
End Sub
771
%>
772
<%
773
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
774
'==================================================================================
775
' Report Name		: 	Find a Package
776
' Description		:	Locate a package in Release Manager
777
' Form Input		:	Package Name, version extension
778
'==================================================================================
779
Sub Find_Package ( SSsection, SSpkg_name, SSv_ext )
780
	Dim Query_String, rsRep, oRegExp
70 brianf 781
 
782
 
64 jtweddle 783
	If SSsection = "TITLE" Then
784
		Response.write "Find a Package"
785
		Exit Sub
786
	End If
70 brianf 787
 
788
 
64 jtweddle 789
	If SSsection = "FORM" Then
790
	%>
791
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
792
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
70 brianf 793
      <tr>
64 jtweddle 794
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
795
        <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
796
        <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
797
		HINTS:<br>
798
		- You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
799
      </tr>
70 brianf 800
      <tr>
64 jtweddle 801
        <td nowrap class="form_field">&nbsp;</td>
802
        <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
803
        <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
804
		e.g. .mas or .lvs or .oso or blank etc.</td>
805
      </tr>
70 brianf 806
      <tr>
64 jtweddle 807
        <td nowrap class="form_field">&nbsp;</td>
808
        <td align="right" nowrap class="form_field">&nbsp;</td>
809
        <td><br>
810
		<input type="hidden" name="group" value="<%=parGroup%>">
811
		<input type="hidden" name="repnum" value="<%=parRepNum%>">
812
		<input type="hidden" name="action" value="true">
70 brianf 813
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 814
        </td>
815
      </tr>
816
	  </form>
817
    </table>
818
	<%	Exit Sub
819
	End If
70 brianf 820
 
821
 
64 jtweddle 822
	If SSsection = "BODY" Then
823
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 824
 
64 jtweddle 825
		If SSpkg_name = "" Then SSpkg_name = "%"
826
		If SSv_ext = "" Then SSv_ext = "%"
827
		If Request("withwcard") <> "" Then SSpkg_name = "%"& Replace( SQLstring(SSpkg_name), "*", "") &"%"		'Place wild card automatically
70 brianf 828
 
829
 
830
 
64 jtweddle 831
		' -- Check if this is PV_ID
832
		Set oRegExp = New RegExp
70 brianf 833
 
64 jtweddle 834
		oRegExp.Global = False	'Find only first match
835
	    oRegExp.Pattern = "\D" 'Match number only
70 brianf 836
 
837
 
64 jtweddle 838
		If NOT oRegExp.Test(Request("FRpkg_name")) Then
839
			Query_String = ReadFile( rootPath & "queries\rep_find_package_by_pv_id.sql" )
840
			Query_String = Replace ( Query_String, "/*PV_ID*/", SQLstring(Request("FRpkg_name") )  )
70 brianf 841
 
64 jtweddle 842
		Else
843
			Query_String = ReadFile( rootPath & "queries\rep_find_package.sql" )
844
			Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
845
			Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
846
		End If
70 brianf 847
 
64 jtweddle 848
		Response.Write(Query_String)
849
	%>
850
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 851
      <tr>
64 jtweddle 852
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
853
		<td width="1%" nowrap class="body_colb">Location</td>
854
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
855
      </tr>
70 brianf 856
      <tr>
64 jtweddle 857
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
858
      </tr>
859
	   <%
860
	  Dim currPv_id
861
	  currPv_id = -1
862
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 863
 
64 jtweddle 864
	  If rsRep.RecordCount = 0 Then
865
	  	With Response
866
			.write "<tr>"
867
			.write "<td colspan='3' class='body_row'>Found 0 records</td>"
868
			.write "</tr>"
869
		End With
870
	  End If
70 brianf 871
 
64 jtweddle 872
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
873
		  ' -------- GROUP BY Package Version -----------------
874
		  If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
875
		  %>
70 brianf 876
	      <tr>
64 jtweddle 877
	        <td colspan="2" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
878
	        <td></td>
879
	      </tr>
880
		  <tr>
881
		    <%If Request("withwcard") <> "" Then%>
882
			<%' Highlight results for package search from index page%>
883
	        <td nowrap class="body_scol"><%=Highlight_Substring ( rsRep("pkg_name"), Replace( SQLstring(SSpkg_name), "%", "") )  &" "& rsRep("pkg_version")%></td>
884
			<%Else%>
885
			<td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
886
			<%End If%>
887
			<td colspan='2' class="body_scol"></td>
888
	      </tr>
889
		  <%
890
		  	currPv_id = Cstr(rsRep("pv_id"))
891
		  End If
892
		  ' -------- END GROUP ------------------------
893
		  %>
894
		  <%If NOT IsNull(rsRep("proj_name")) Then%>
70 brianf 895
	      <tr>
64 jtweddle 896
		  	<td class="body_row"></td>
897
	        <td nowrap class="body_row" valign="top"><%=rsRep("proj_name") &" &gt; "& rsRep("vtree_name") &" &gt; "& rsRep("rtag_name") &" &gt; <a href='dependencies.asp?pv_id="& rsRep("pv_id") &"&rtag_id="& rsRep("rtag_id") &"' class='txt_linked'>"& rsRep("pkg_name") &" "& rsRep("pkg_version") &"</a>"%></td>
898
			<td class="body_row"></td>
899
	      </tr>
900
		  <%Else%>
70 brianf 901
		  <tr>
64 jtweddle 902
		  	<td class="body_row"></td>
903
	        <td class="body_row"></td>
904
			<td class="body_row"></td>
905
	      </tr>
906
		  <%End If%>
907
	  <%  rsRep.MoveNext
908
	  WEnd
909
	  %>
70 brianf 910
	  <tr>
64 jtweddle 911
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
912
      </tr>
913
    </table>
914
	<!-- PRINT, SAVE, ETC. ------------>
915
	<%If parPrint = "" Then%>
916
	<br>
917
	<br>
918
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
919
	<br>
920
	<%End If%>
921
	<!-- PRINT, SAVE, ETC. END -------->
922
	<%
923
		rsRep.Close
924
		Set rsRep = nothing
925
	End If
70 brianf 926
 
64 jtweddle 927
End Sub
928
%>
929
<%
930
'==================================================================================
931
' Report Name		: 	Find Package Version History
932
' Description		:	Locate all package versions and their current location
933
' Form Input		:	Package Name, version extension
934
'==================================================================================
935
Sub Find_Package_Version_History ( SSsection, SSpkg_name, SSv_ext )
936
	Dim Query_String, rsRep
70 brianf 937
 
938
 
64 jtweddle 939
	If SSsection = "TITLE" Then
940
		Response.write "Find Package Version History"
941
		Exit Sub
942
	End If
70 brianf 943
 
944
 
64 jtweddle 945
	If SSsection = "FORM" Then
946
	%>
947
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
948
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
70 brianf 949
      <tr>
64 jtweddle 950
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
951
        <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
952
        <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
953
		HINTS:<br>
954
		- You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
955
      </tr>
70 brianf 956
      <tr>
64 jtweddle 957
        <td nowrap class="form_field">&nbsp;</td>
958
        <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
959
        <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
960
		e.g. .mas or .lvs or .oso or blank etc.</td>
961
      </tr>
70 brianf 962
      <tr>
64 jtweddle 963
        <td nowrap class="form_field">&nbsp;</td>
964
        <td align="right" nowrap class="form_field">&nbsp;</td>
965
        <td><br>
966
		<input type="hidden" name="group" value="<%=parGroup%>">
967
		<input type="hidden" name="repnum" value="<%=parRepNum%>">
968
		<input type="hidden" name="action" value="true">
70 brianf 969
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 970
        </td>
971
      </tr>
972
	  </form>
973
    </table>
974
	<%	Exit Sub
975
	End If
70 brianf 976
 
977
 
64 jtweddle 978
	If SSsection = "BODY" Then
979
		Const img_Official = "<img src='images/i_locked.gif' width='7' height='10' hspace='3' align='absmiddle'>"
980
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 981
 
64 jtweddle 982
		If SSpkg_name = "" Then SSpkg_name = "%"
983
		If SSv_ext = "" Then SSv_ext = "%"
70 brianf 984
 
64 jtweddle 985
		Query_String = ReadFile( rootPath & "queries\rep_package_version_history.sql" )
986
		Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
987
		Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
988
	%>
989
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 990
      <tr>
64 jtweddle 991
	    <td width="1%" nowrap class="body_colb" align="right">Official<%=img_Official%></td>
992
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
993
		<td width="1%" nowrap class="body_colb">Location</td>
994
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
995
      </tr>
70 brianf 996
      <tr>
64 jtweddle 997
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
998
      </tr>
999
	   <%
1000
	  Dim currPv_id
1001
	  currPv_id = -1
1002
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 1003
 
64 jtweddle 1004
	  If rsRep.RecordCount = 0 Then
1005
	  	With Response
1006
			.write "<tr>"
1007
			.write "<td colspan='4' class='body_row'>Found 0 records</td>"
1008
			.write "</tr>"
1009
		End With
1010
	  End If
70 brianf 1011
 
64 jtweddle 1012
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1013
		  ' -------- GROUP BY Package Version -----------------
1014
		  If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
1015
		  %>
70 brianf 1016
	      <tr>
64 jtweddle 1017
	        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1018
	        <td></td>
1019
	      </tr>
70 brianf 1020
		  <tr>
64 jtweddle 1021
		    <td align="right"><%If rsRep("dlocked") = "Y" Then%><%=img_Official%><%End If%></td>
1022
	        <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
1023
			<td colspan='2' class="body_scol"></td>
1024
	      </tr>
1025
		  <%
1026
		  	currPv_id = Cstr(rsRep("pv_id"))
1027
		  End If
1028
		  ' -------- END GROUP ------------------------
1029
		  %>
70 brianf 1030
	      <tr>
64 jtweddle 1031
		    <td class="body_row"></td>
1032
		  	<td class="body_row"></td>
1033
			<%If IsNull(rsRep("rtag_id")) Then%>
1034
	        	<td nowrap class="body_txt_gray" valign="top">Not Used!</td>
1035
			<%Else%>
1036
				<td nowrap class="body_row" valign="top"><%=rsRep("proj_name") &" &gt; "& rsRep("vtree_name") &" &gt; "& rsRep("rtag_name") &" &gt; <a href='dependencies.asp?pv_id="& rsRep("pv_id") &"&rtag_id="& rsRep("rtag_id") &"' class='txt_linked'>"& rsRep("pkg_name") &" "& rsRep("pkg_version") &"</a>"%></td>
1037
			<%End If%>
1038
			<td class="body_row"></td>
1039
	      </tr>
1040
	  <%  rsRep.MoveNext
1041
	  WEnd
1042
	  %>
70 brianf 1043
	  <tr>
64 jtweddle 1044
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1045
      </tr>
1046
    </table>
1047
	<!-- PRINT, SAVE, ETC. ------------>
1048
	<%If parPrint = "" Then%>
1049
	<br>
1050
	<br>
1051
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
1052
	<br>
1053
	<%End If%>
1054
	<!-- PRINT, SAVE, ETC. END -------->
1055
	<%
1056
		rsRep.Close
1057
		Set rsRep = nothing
1058
	End If
70 brianf 1059
 
64 jtweddle 1060
End Sub
1061
%>
1062
<%
1063
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1064
'==================================================================================
1065
' Report Name		: 	Obsolete Packages
1066
' Description		:	List packages that are not used (exclude products)
1067
' INPUT				:	Project, Vesion Tree, Release Label
1068
'==================================================================================
1069
Sub Obsolete_Packages ( SSsection, NNproj_id, NNrtag_id )
1070
	Dim Query_String, rsRep
1071
	Const Allow_All = TRUE
1072
	Const Disallow_All = FALSE
70 brianf 1073
 
64 jtweddle 1074
	If NNproj_id = "" Then NNproj_id = -1
1075
	If NNrtag_id = "" Then NNrtag_id = -1
70 brianf 1076
 
64 jtweddle 1077
	If SSsection = "TITLE" Then
1078
		Response.write "Unused Packages"
1079
		Exit Sub
1080
	End If
70 brianf 1081
 
1082
 
64 jtweddle 1083
	If SSsection = "FORM" Then
1084
	%>
1085
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1086
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
70 brianf 1087
      <tr>
64 jtweddle 1088
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1089
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1090
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1091
      </tr>
70 brianf 1092
      <tr>
64 jtweddle 1093
        <td nowrap class="form_field">&nbsp;</td>
1094
        <td align="right" nowrap class="form_field">Release</td>
1095
        <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1096
      </tr>
70 brianf 1097
      <tr>
64 jtweddle 1098
        <td nowrap class="form_field">&nbsp;</td>
1099
        <td align="right" nowrap class="form_field">&nbsp;</td>
1100
        <td><br>
1101
			<input type="hidden" name="group" value="<%=parGroup%>">
1102
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1103
			<input type="hidden" name="action" value="true">
70 brianf 1104
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 1105
        </td>
1106
      </tr>
1107
	  </form>
1108
    </table>
1109
	<%	Exit Sub
1110
	End If
70 brianf 1111
 
1112
 
64 jtweddle 1113
	If SSsection = "BODY" Then
1114
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 1115
 
64 jtweddle 1116
		Query_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )
70 brianf 1117
 
64 jtweddle 1118
		OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1119
	%>
1120
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 1121
      <tr>
64 jtweddle 1122
	    <td width="1%" nowrap class="body_colb">&nbsp;</td>
1123
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1124
		<td width="1%" nowrap class="body_colb">Released&nbsp;&nbsp;&nbsp;</td>
1125
		<td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
1126
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
1127
      </tr>
70 brianf 1128
      <tr>
64 jtweddle 1129
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1130
      </tr>
1131
	   <%
1132
	  Dim currView_id
1133
	  currView_id = -1
1134
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 1135
 
64 jtweddle 1136
	  If rsRep.RecordCount = 0 Then
1137
	  	With Response
1138
			.write "<tr>"
1139
			.write "<td colspan='5' class='body_row'>Found 0 records</td>"
1140
			.write "</tr>"
1141
		End With
1142
	  End If
1143
 
1144
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1145
		  ' -------- GROUP BY BASE VIEW  -----------------
1146
		  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1147
		  %>
1148
	      <tr> 
1149
	        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1150
	        <td></td>
1151
	      </tr>
1152
		  <tr> 
1153
	        <td nowrap class="body_scol"><%=rsRep("view_name")%></td>
1154
			<td class="body_scol"></td>
1155
			<td class="body_scol"></td>
1156
			<td class="body_scol"></td>
1157
			<td class="body_scol"></td>
1158
	      </tr>
1159
		  <%
1160
		  	currView_id = CDbl(rsRep("view_id"))
1161
		  End If
1162
		  ' -------- END GROUP ------------------------
1163
		  %>
1164
	      <tr> 
1165
		  	<td class="body_row"></td>
1166
	        <td nowrap class="body_row"><a href="used_by.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNrtag_id%>" class="txt_linked"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></a></td>
1167
	        <td nowrap class="body_row"><%=EuroDate( rsRep("modified_stamp") )%> by <a href="mailto:<%=rsRep("modifier_email")%>" class="txt_linked"><%=rsRep("modifier")%></a>&nbsp;&nbsp;&nbsp;</td>
1168
			<td nowrap class="body_row"><%=EuroDate( rsRep("insert_stamp") )%> by <a href="mailto:<%=rsRep("insertor_email")%>" class="txt_linked"><%=rsRep("insertor")%></a>&nbsp;&nbsp;&nbsp;</td>
1169
			<td class="body_row"></td>
1170
	      </tr>
1171
	  <%  rsRep.MoveNext
1172
	  WEnd
1173
	  %>
1174
	  <tr> 
1175
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1176
      </tr>
1177
    </table>
1178
	<!-- PRINT, SAVE, ETC. ------------>
1179
	<%If parPrint = "" Then%>
1180
	<br>
1181
	<br>
1182
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
1183
	<br>
1184
	<%End If%>
1185
	<!-- PRINT, SAVE, ETC. END -------->
1186
	<%
1187
		rsRep.Close
1188
		Set rsRep = nothing
1189
	End If
1190
 
1191
End Sub
1192
%>
1193
<%
1194
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1195
'==================================================================================
1196
' Report Name		: 	Deployable Software Modules
1197
' Description		:	Shows packages that are deployed to the customers and shows new packages marked as deployable.
1198
' INPUT				:	Project, Vesion Tree, Release Label, Base View (hard-coded to PRODUCTS)
1199
'==================================================================================
1200
Sub Deployable_Software_Modules ( sSection, nProj_id,  nRtag_id, nBase_view_id )
1201
	Dim Query_String, rsRep
1202
	Const Allow_All = TRUE
1203
	Const Disallow_All = FALSE
1204
 
1205
	If nProj_id = "" Then nProj_id = -1
1206
	If nRtag_id = "" Then nRtag_id = -1
1207
 
1208
	If sSection = "TITLE" Then
1209
		Response.write "Deployable Software Modules"
1210
		Exit Sub
1211
	End If
1212
 
1213
 
1214
	If sSection = "FORM" Then
1215
	%>
1216
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1217
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
1218
      <tr> 
1219
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1220
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1221
        <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
1222
      </tr>
1223
      <tr> 
1224
        <td nowrap class="form_field">&nbsp;</td>
1225
        <td align="right" nowrap class="form_field">Release</td>
1226
        <td><%Call Get_Release_Labels ( nProj_id, nRtag_id, Disallow_All )%></td>
1227
      </tr>
1228
	  <tr> 
1229
        <td nowrap class="form_field">&nbsp;</td>
1230
        <td align="right" nowrap class="form_field">Base View</td>
1231
        <td><select name="noname" class='form_item' disabled>
1232
				<option>PRODUCTS</option>
1233
		    </select></td>
1234
      </tr>
1235
      <tr> 
1236
        <td nowrap class="form_field">&nbsp;</td>
1237
        <td align="right" nowrap class="form_field">&nbsp;</td>
1238
        <td><br>
1239
			<input type="hidden" name="group" value="<%=parGroup%>">
1240
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1241
			<input type="hidden" name="FRbase_view_id" value="<%=enumBASE_VIEW_PRODUCTS%>">
1242
			<input type="hidden" name="action" value="true">
1243
		<input name="Submit" type="submit" class="form_btn" value="Submit"> 
1244
        </td>
1245
      </tr>
1246
	  </form>
1247
    </table>
1248
	<%	Exit Sub
1249
	End If
1250
 
1251
 
1252
	If sSection = "BODY" Then
1253
		If NOT CBool(Request("action")) Then Exit Sub
1254
		'--- New Deployable Modules ---
1255
		Query_String = ReadFile( rootPath & "queries\rep_new_deployable_packages.sql" )
1256
 
1257
		OraDatabase.Parameters.Add "RTAG_ID", 		nRtag_id, 		ORAPARM_INPUT, ORATYPE_NUMBER
1258
		OraDatabase.Parameters.Add "BASE_VIEW_ID", 	nBase_view_id, 	ORAPARM_INPUT, ORATYPE_NUMBER
1259
	%>
1260
	<table width="100%"  border="0" cellspacing="0" cellpadding="2">
1261
      <tr>
1262
        <td nowrap class="body_colb" colspan="3" background="images/bg_bage.gif">&nbsp;New Deployable Package</td>
1263
      </tr>
1264
      <tr>
1265
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1266
      </tr>
1267
	  <tr>
1268
        <td width="1%" class="body_txt">Package Name</td>
1269
		<td width="1%" class="body_txt">Version</td>
1270
		<td width="100%" class="body_txt">Last Modifier</td>
1271
      </tr>
1272
	  <tr>
1273
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1274
      </tr>
1275
	  <%
1276
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1277
	  %>
1278
	  <%If rsRep.RecordCount = 0 Then%>
1279
	  <tr>
1280
        <td nowrap class="body_row" colspan="3">Found 0 records! </td>
1281
      </tr>
1282
	  <%End If%>
1283
	  <%While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))%>
1284
      <tr>
1285
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><img src="images/i_go2url.gif" width="14" height="14" hspace="3" border="0" align="absmiddle"><%=rsRep("pkg_name")%></a></td>
1286
		<td nowrap class="body_row"><%=rsRep("pkg_version")%></td>		
1287
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>	
1288
      </tr>
1289
	  <%rsRep.MoveNext
1290
	    WEnd
1291
	  rsRep.Close
1292
	  Set rsRep = Nothing%>
1293
	  <tr>
1294
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1295
      </tr>
1296
	  <%
1297
	  ' Go To Release link...
1298
	  Query_String = _
1299
	  " SELECT proj.PROJ_NAME, rt.RTAG_NAME"&_
1300
	  "   FROM PROJECTS proj,"&_
1301
	  "		   RELEASE_TAGS rt"&_
1302
	  "	 WHERE rt.PROJ_ID = proj.proj_id"&_
1303
	  "	   AND rt.rtag_id = :RTAG_ID"
1304
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1305
	  %>
1306
      <tr>
1307
        <td nowrap class="body_row" colspan="3"><a href="dependencies.asp?rtag_id=<%=nRtag_id%>"><img src="images/i_go2url.gif" width="14" height="14" hspace="3" border="0" align="absmiddle"></a>Go to <a href="dependencies.asp?rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("proj_name")%> &gt; <%=rsRep("rtag_name")%></a> </td>
1308
      </tr>
1309
	  <%
1310
	  rsRep.Close
1311
	  Set rsRep = Nothing%>
1312
    </table>
1313
	<br><br>
1314
	<%
1315
		'--- Current Deployable Modules ---
1316
		Query_String = ReadFile( rootPath & "queries\rep_current_deployable_packages.sql" )
1317
	%>
1318
	<table width="100%"  border="0" cellspacing="0" cellpadding="2">
1319
      <tr>
1320
        <td colspan="4" nowrap class="body_colb" background="images/bg_bage.gif">&nbsp;Current Deployable Packages </td>
1321
      </tr>
1322
      <tr>
1323
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1324
      </tr>
1325
	  <%
1326
	  Dim currPv_id
1327
	  currPv_id = -1
1328
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1329
 
1330
	  If rsRep.RecordCount = 0 Then
1331
	  	With Response
1332
			.write "<tr>"
1333
			.write "<td colspan='4' class='body_row'>Found 0 records</td>"
1334
			.write "</tr>"
1335
		End With
1336
	  End If
1337
 
1338
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1339
		  ' -------- GROUP BY PRODUCT NAME  -----------------
1340
		  If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
1341
		  %>
1342
      <tr>
1343
        <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1344
        <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1345
		<td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1346
        <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
1347
      </tr>
1348
      <tr>
1349
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></a></td>
1350
        <td>&nbsp;</td>
1351
		<td>&nbsp;</td>
1352
        <td>&nbsp;</td>
1353
      </tr>
1354
	  <%
1355
		  	currPv_id = CDbl(rsRep("pv_id"))
1356
		  End If
1357
		  ' -------- END GROUP ------------------------
1358
		  %>
1359
      <tr>
1360
        <td>&nbsp;</td>
1361
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("dpkg_name")%></a></td>
1362
		<td nowrap class="body_row"><%=rsRep("dpkg_version")%></td>
1363
        <td nowrap class="err_alert"><%=rsRep("is_dep_deployable")%></td>
1364
      </tr>
1365
	  <%  rsRep.MoveNext
1366
	  WEnd
1367
	  %>
1368
      <tr>
1369
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1370
      </tr>
1371
    </table> 
1372
	<!-- PRINT, SAVE, ETC. ------------>
1373
	<%If parPrint = "" Then%>
1374
	<br>
1375
	<br>
1376
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
1377
	<br>
1378
	<%End If%>
1379
	<!-- PRINT, SAVE, ETC. END -------->
1380
	<%
1381
		rsRep.Close
1382
		Set rsRep = nothing
1383
	End If
1384
 
1385
End Sub
1386
%>
1387
 
1388
<%
1389
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1390
'==================================================================================
1391
' Report Name		: 	Bill Of Materials
1392
' Description		:	List products for a BOM
1393
' INPUT				:	
1394
'==================================================================================
1395
Sub Bill_of_Materials ( SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion )
1396
	Dim Query_String, rsRep, rsQry
1397
	Const Allow_All = TRUE
1398
	Const Disallow_All = FALSE
1399
 
1400
	If NNproj_id = "" Then NNproj_id = -1
1401
	If NNrtag_id = "" Then NNrtag_id = -1
1402
	If NNversion = "" Then NNversion = -1
1403
 
1404
	If SSsection = "TITLE" Then
1405
		Response.write "BOM - History Track"
1406
		Exit Sub
1407
	End If
1408
 
1409
 
1410
	If SSsection = "FORM" Then
1411
	%>
1412
	<script language="JavaScript" src="images/calendar.js"></script>	
1413
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1414
	  <form action="" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
1415
      <tr> 
1416
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1417
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1418
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1419
      </tr>
1420
      <tr> 
1421
        <td nowrap class="form_field">&nbsp;</td>
1422
        <td align="right" nowrap class="form_field">Release</td>
1423
        <td><%Call Get_Release_labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1424
      </tr>
1425
 	  <tr> 
1426
        <td nowrap class="form_field">&nbsp;</td>
1427
        <td align="right" nowrap class="form_field">SBOM Version</td>
1428
        <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
1429
      </tr> 
1430
      <tr>
1431
        <td colspan="3" nowrap class="form_field">Between 
1432
        <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>"> 
1433
		<A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRinitdate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a> 
1434
        And 
1435
        <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
1436
        <A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRduedate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a></td>
1437
		</tr>	  
1438
      <tr> 
1439
        <td nowrap class="form_field">&nbsp;</td>
1440
        <td align="right" nowrap class="form_field">&nbsp;</td>
1441
        <td><br>
1442
			<input type="hidden" name="group" value="<%=parGroup%>">
1443
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1444
			<input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
1445
 
1446
			<input type="hidden" name="action" value="true">
1447
		<input name="Submit" type="submit" class="form_btn" value="Submit"> 
1448
        </td>
1449
      </tr>
1450
	  </form>
1451
    </table>
1452
	<p>
1453
      <%	Exit Sub
1454
	End If
1455
 
1456
 
1457
 
1458
	OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1459
	OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
1460
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
1461
	Dim bomId 
1462
	bomId = rsQry("bom_id")
1463
	rsQry.close
1464
	Set rsQry = nothing	
1465
 
1466
 
1467
	If SSsection = "BODY" Then
1468
		If NOT CBool(Request("action")) Then Exit Sub
1469
 
1470
		'Query_String = ReadFile( rootPath & "queries\AllProducts.sql" )
1471
 
1472
		'OraDatabase.Parameters.Add "BOM_ID", bomId, ORAPARM_INPUT, ORATYPE_NUMBER
1473
	%>
1474
	</p>
1475
	<table width="20%" border="0" cellspacing="0" cellpadding="2">
1476
                <tr>
1477
				  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Trail</td>
1478
                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Date</td>
1479
                  <td width="40%" background="images/bg_bage_0.gif" class="body_col" nowrap>Action</td>
1480
				  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>User</td>
1481
                </tr>
1482
      <tr>
1483
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1484
      </tr>
1485
      <%
1486
 
1487
	  Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM BOM_TRAIL BT, USERS U WHERE BT.BOM_ID ="& bomId &" AND U.USER_ID = BT.USER_ID AND BT.DATE_TIME_STAMP >= TO_DATE('"& Request.Form("FRinitdate") &"','DD/MM/YYYY') AND BT.DATE_TIME_STAMP < TO_DATE('"& Request.Form("FRduedate") &"','DD/MM/YYYY')+1 ORDER BY BT.DATE_TIME_STAMP DESC", 0 )
1488
 
1489
 
1490
	  If rsRep.RecordCount = 0 Then
1491
	  	With Response
1492
			.write "<tr>"
1493
 
1494
 
1495
			.write "<td colspan='5' class='body_row'>Found 0 bom trail records</td>"
1496
			.write "</tr>"
1497
		End With
1498
	  Else
1499
	  %>
1500
	        <tr>
1501
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1502
      </tr>
1503
      <tr>
1504
        <td nowrap class="body_scol">Bom</td>
1505
		<td nowrap class="body_scol"></td>	  
1506
        <td nowrap class="body_scol"></td>
1507
        <td nowrap class="body_scol"></td>
1508
      </tr>
1509
	  <%
1510
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1511
		  %>
1512
      <tr>
1513
 		<td nowrap class="body_scol"></td>
1514
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
1515
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
1516
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>
1517
      </tr>
1518
      <%  rsRep.MoveNext
1519
	  WEnd
1520
	  End If
1521
	  %>
1522
      <tr>
1523
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1524
      </tr>
1525
      <%
1526
 
1527
	  Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM BOM_CONTENTS BC, NODE_TRAIL NT, USERS U WHERE BC.BOM_ID ="& bomId &" AND NT.NODE_ID = BC.NODE_ID AND U.USER_ID = NT.USER_ID AND NT.DATE_TIME_STAMP >= TO_DATE('"& Request.Form("FRinitdate") &"','DD/MM/YYYY') AND NT.DATE_TIME_STAMP < TO_DATE('"& Request.Form("FRduedate") &"','DD/MM/YYYY')+1 ORDER BY NT.DATE_TIME_STAMP DESC", 0 )
1528
 
1529
 
1530
	  If rsRep.RecordCount = 0 Then
1531
	  	With Response
1532
			.write "<tr>"
1533
 
1534
 
1535
			.write "<td colspan='5' class='body_row'>Found 0 node trail records</td>"
1536
			.write "</tr>"
1537
		End With
1538
	  Else	
1539
	  %>
1540
 
1541
      <tr>
1542
        <td nowrap class="body_scol">Node</td>
1543
		<td nowrap class="body_scol"></td>	  
1544
        <td nowrap class="body_scol"></td>
1545
        <td nowrap class="body_scol"></td>
1546
      </tr>
1547
	  <%
1548
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1549
		  %>
1550
      <tr>
1551
 		<td nowrap class="body_scol"></td>
1552
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
1553
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
1554
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>
1555
      </tr>
1556
      <%  rsRep.MoveNext
1557
	  WEnd
1558
	  End If
1559
	  %>	
1560
      <tr>
1561
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1562
      </tr>	  
1563
      <%
1564
 
1565
	  Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM BOM_CONTENTS BC, OPERATING_SYSTEMS OS, OS_TRAIL OT, USERS U WHERE BC.NODE_ID = OS.NODE_ID AND OS.OS_ID = OT.OS_ID AND BC.BOM_ID ="& bomId &" AND U.USER_ID = OT.USER_ID AND OT.DATE_TIME_STAMP >= TO_DATE('"& Request.Form("FRinitdate") &"','DD/MM/YYYY') AND OT.DATE_TIME_STAMP < TO_DATE('"& Request.Form("FRduedate") &"','DD/MM/YYYY')+1 ORDER BY OT.DATE_TIME_STAMP DESC", 0 )
1566
 
1567
 
1568
	  If rsRep.RecordCount = 0 Then
1569
	  	With Response
1570
			.write "<tr>"
1571
 
1572
 
1573
			.write "<td colspan='5' class='body_row'>Found 0 operating systems trail records</td>"
1574
			.write "</tr>"
1575
		End With
1576
	  Else
1577
	  %>
1578
	        <tr>
1579
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1580
      </tr>
1581
      <tr>
1582
        <td nowrap class="body_scol">Operating System</td>
1583
		<td nowrap class="body_scol"></td>	  
1584
        <td nowrap class="body_scol"></td>
1585
        <td nowrap class="body_scol"></td>
1586
      </tr>
1587
	  <%
1588
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1589
		  %>
1590
      <tr>
1591
 		<td nowrap class="body_scol"></td>
1592
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
1593
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
1594
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>
1595
      </tr>
1596
      <%  rsRep.MoveNext
1597
	  WEnd
1598
	  End If
1599
	  %>	 
1600
      <tr>
1601
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1602
      </tr>	     
1603
    </table>
1604
	<p>&nbsp;	  </p>
1605
	<p>        <!-- PRINT, SAVE, ETC. ------------>
1606
      <%If parPrint = "" Then%>
1607
      <br>
1608
      <br>
1609
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
1610
      <br>
1611
      <%End If%>
1612
      <!-- PRINT, SAVE, ETC. END -------->
1613
      <%
1614
		rsRep.Close
1615
		Set rsRep = nothing
1616
	End If
1617
 
1618
End Sub
1619
%>
1620
 
1621
<%
1622
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1623
'==================================================================================
1624
' Report Name		: 	Build History
1625
' Description		:	List packages which were build between certain dates.
1626
' INPUT				:	
1627
'==================================================================================
1628
Sub Build_History ( SSsection, NNproj_id, NNrtag_id)
1629
	Dim Query_String, rsRep, rsQry
1630
	Const Allow_All = TRUE
1631
	Const Disallow_All = FALSE
1632
 
1633
	If NNproj_id = "" Then NNproj_id = -1
1634
	If NNrtag_id = "" Then NNrtag_id = -1
1635
 
1636
	If SSsection = "TITLE" Then
1637
		Response.write "Build History"
1638
		Exit Sub
1639
	End If
1640
 
1641
 
1642
	If SSsection = "FORM" Then
1643
	%>
1644
	<script language="JavaScript" src="images/calendar.js"></script>
1645
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1646
	  <form action="<%=SCRIPT_NAME%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
1647
      <tr> 
1648
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1649
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1650
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1651
 
1652
      </tr>
1653
      <tr> 
1654
        <td nowrap class="form_field">&nbsp;</td>
1655
        <td align="right" nowrap class="form_field">Release</td>
1656
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
1657
 
1658
      </tr>
1659
      <tr> 
1660
        <td nowrap class="form_field">&nbsp;</td>
1661
        <td align="right" nowrap class="form_field">SBOM Version</td>
1662
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
1663
      </tr>	  
1664
      <tr>
1665
        <td colspan="3" nowrap class="form_field">Between 
1666
        <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>"> 
1667
		<A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRinitdate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a> 
1668
        And 
1669
        <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
1670
        <A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRduedate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a></td>
1671
		</tr>
1672
      <tr> 
1673
        <td nowrap class="form_field">&nbsp;</td>
1674
        <td align="right" nowrap class="form_field">&nbsp;</td>
1675
        <td><br>
1676
			<input type="hidden" name="group" value="<%=parGroup%>">
1677
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1678
			<input type="hidden" name="action" value="true">
1679
		<input name="Submit" type="submit" class="form_btn" value="Submit" onClick="clickedButton=true;MM_validateForm('FRduedate','Due Date','R','FRmsg','Message details','R');return document.MM_returnValue"> 
1680
        </td>
1681
      </tr>
1682
	  </form>
1683
    </table>
1684
	<p>
1685
      <%	Exit Sub
1686
	End If
1687
 
1688
 
1689
	If SSsection = "BODY" Then
1690
		If NOT CBool(Request("action")) Then Exit Sub
1691
	%>
1692
	</p>
1693
	<table width="20%" border="0" cellspacing="0" cellpadding="2">
1694
      <tr>
1695
        <td width="1%" nowrap class="body_colb">&nbsp;</td>	  
1696
        <td width="5%" nowrap class="body_colb">Package</td>
1697
        <td width="95%" nowrap class="body_colb">Version</td>
1698
      </tr>
1699
      <tr>
1700
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1701
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1702
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>				
1703
      </tr>
1704
      <%
1705
	  Dim currView_id
1706
	  currView_id = -1
1707
 
1708
  		OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1709
		OraDatabase.Parameters.Add "INITDATE", Request.Form("FRinitdate"), ORAPARM_INPUT, ORATYPE_STRING
1710
		OraDatabase.Parameters.Add "DUEDATE", Request.Form("FRduedate"), ORAPARM_INPUT, ORATYPE_STRING
1711
 
1712
	  Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("rep_build_history.sql"), cint(0) )
1713
 
1714
	  If rsRep.RecordCount = 0 Then
1715
	  	With Response
1716
			.write "<tr>"
1717
			.write "<td colspan='5' class='body_row'>Found 0 records</td>"
1718
			.write "</tr>"
1719
		End With
1720
	  End If
1721
 
1722
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1723
		  ' -------- GROUP BY BASE VIEW  -----------------
1724
		  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1725
		  %>
1726
      <tr>
1727
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1728
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>		
1729
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1730
      </tr>
1731
 
1732
       <tr>
1733
        <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
1734
        <td>&nbsp;</td>
1735
		<td>&nbsp;</td>
1736
 
1737
      </tr>
1738
 
1739
      <%
1740
		  	currView_id = CDbl(rsRep("view_id"))
1741
		  End If
1742
		  ' -------- END GROUP ------------------------
1743
		  %>
1744
      <tr>
1745
	    <td width="1%" nowrap class="body_colb">&nbsp;</td>
1746
        <td nowrap class="body_row"><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_name")%></strong></a></td>
1747
        <td nowrap class="body_row"><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_version")%></strong></a></td>
1748
      </tr>
1749
      <%  rsRep.MoveNext
1750
	  WEnd
1751
	  %>
1752
      <tr>
1753
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1754
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1755
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>				
1756
      </tr>
1757
    </table>
1758
	<p>&nbsp;	  </p>
1759
	<p>        <!-- PRINT, SAVE, ETC. ------------>
1760
      <%If parPrint = "" Then%>
1761
      <br>
1762
      <br>
1763
        <a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
1764
      <br>
1765
      <%End If%>
1766
      <!-- PRINT, SAVE, ETC. END -------->
1767
      <%
1768
		rsRep.Close
1769
		Set rsRep = nothing
1770
	End If
1771
 
1772
End Sub
1773
%>
1774
 
1775
 
1776
<%
1777
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1778
'==================================================================================
1779
' Report Name		: 	Unit Tests per Package
1780
' Description		:	List unit tests per package showing the unit test completeness
1781
' INPUT				:	Project, Vesion Tree, Release Label, Base View, Level of Completeness, Show/Hide Dependencies, PV_ID
1782
'==================================================================================
1783
Sub Unit_Tests_Per_Package ( sSection, nProj_id,  nRtag_id, nBase_view_id, nLevel_of_complete, nShow_dependencies, nPv_id )
1784
	Dim Query_String, rsRep
1785
	Const Allow_All = TRUE
1786
	Const Disallow_All = FALSE
1787
 
1788
	If nProj_id = "" Then nProj_id = -1
1789
	If nRtag_id = "" Then nRtag_id = -1
1790
	If nShow_dependencies = "" Then nShow_dependencies = 0
1791
	If nPv_id = "" Then nPv_id = -1
1792
 
1793
	If sSection = "TITLE" Then
1794
		Response.write "Unit Tests per Package"
1795
		Exit Sub
1796
	End If
1797
 
1798
 
1799
	If sSection = "FORM" Then
1800
	%>
1801
    </p>
1802
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1803
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRproj_id','Project','R','FRvtree_id','Version Tree','R','FRrtag_id','Release','R');return document.MM_returnValue">
1804
      <tr> 
1805
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1806
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1807
        <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
1808
      </tr>
1809
      <tr> 
1810
        <td nowrap class="form_field">&nbsp;</td>
1811
        <td align="right" nowrap class="form_field">Release</td>
1812
        <td><%Call Get_Release_Labels ( nProj_id,  nRtag_id, Disallow_All )%></td>
1813
      </tr>
1814
	  <tr> 
1815
        <td nowrap class="form_field">&nbsp;</td>
1816
        <td align="right" nowrap class="form_field">Base View</td>
1817
        <td><%Call Get_Base_Views ( nRtag_id, nBase_view_id, Allow_All )%></td>
1818
      </tr>
1819
	  <tr> 
1820
        <td nowrap class="form_field">&nbsp;</td>
1821
        <td align="right" nowrap class="form_field">Show Dependencie's Unit Tests</td>
1822
        <td><input type="checkbox" name="FRshow_deps" value="1" <%If nShow_dependencies <> 0 Then%>checked<%End If%>></td>
1823
      </tr>
1824
      <tr> 
1825
        <td nowrap class="form_field">&nbsp;</td>
1826
        <td align="right" nowrap class="form_field">&nbsp;</td>
1827
        <td><br>
1828
			<input type="hidden" name="group" value="<%=parGroup%>">
1829
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1830
			<input type="hidden" name="FRtest_complete" value="0">
1831
			<input type="hidden" name="action" value="true">
1832
		<input name="Submit" type="submit" class="form_btn" value="Submit"> 
1833
        </td>
1834
      </tr>
1835
	  </form>
1836
    </table>
1837
	<%	Exit Sub
1838
	End If
1839
 
1840
 
1841
	If sSection = "BODY" Then
1842
		If NOT CBool(Request("action")) Then Exit Sub
1843
 
1844
		Query_String = ReadFile( rootPath & "queries\rep_unit_tests_per_package.sql" )
1845
 
1846
		OraDatabase.Parameters.Add "RTAG_ID", 		nRtag_id, 		ORAPARM_INPUT, ORATYPE_NUMBER
1847
		OraDatabase.Parameters.Add "BASE_VIEW", 	nBase_view_id, 	ORAPARM_INPUT, ORATYPE_NUMBER
1848
		OraDatabase.Parameters.Add "COMPLETENESS", 	nLevel_of_complete, ORAPARM_INPUT, ORATYPE_NUMBER
1849
		OraDatabase.Parameters.Add "SHOW_DEPS", 	nShow_dependencies, ORAPARM_INPUT, ORATYPE_NUMBER
1850
		OraDatabase.Parameters.Add "PV_ID", 		nPv_id, 		ORAPARM_INPUT, ORATYPE_NUMBER
1851
	%>
1852
	<table width="100%" border="0" cellspacing="0" cellpadding="1">
1853
      <tr>
1854
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
1855
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
1856
        <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
1857
        <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
1858
        <td width="1%" nowrap class="body_colb">Test Name&nbsp;&nbsp;&nbsp;</td>
1859
        <td width="100%" nowrap class="body_colb">Test Summary&nbsp; </td>
1860
        <td width="1%" nowrap class="body_colb"></td>
1861
        <td width="1%" nowrap class="body_colb">Stamp</td>
1862
        <td width="1%" nowrap class="body_colb">Test Completed &nbsp;&nbsp;&nbsp;</td>
1863
      </tr>
1864
      <tr>
1865
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1866
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1867
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1868
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1869
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1870
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1871
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1872
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1873
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1874
      </tr>
1875
	  <%
1876
	  Dim currBase_view_id, currPv_id, currDpv_id, showTests
1877
	  currBase_view_id = -1
1878
	  currPv_id = -1
1879
	  currDpv_id = -1
1880
 
1881
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1882
 
1883
	  If rsRep.RecordCount = 0 Then
1884
	  	With Response
1885
			.write "<tr>"
1886
			.write "<td colspan='9' class='body_row'>Found 0 records</td>"
1887
			.write "</tr>"
1888
		End With
1889
	  End If
1890
 
1891
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1892
	  	  If nShow_dependencies <> 0 Then
1893
		  	' show dependency is ON
1894
		  	If rsRep("dpkg_name") = "------" Then
1895
				showTests = FALSE
1896
			Else
1897
				showTests = TRUE
1898
			End If
1899
		  Else
1900
		  	showTests = TRUE
1901
		  End If
1902
 
1903
		  ' -------- GROUP BY BASE VIEW  -----------------
1904
		  If CDbl(currBase_view_id) <> CDbl(rsRep("base_view_id")) Then
1905
		  %>
1906
	  <tr>
1907
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1908
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1909
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1910
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1911
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1912
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1913
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1914
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1915
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1916
      </tr>
1917
       <tr>
1918
        <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
1919
        <td>&nbsp;</td>
1920
		<td>&nbsp;</td>
1921
		<td>&nbsp;</td>
1922
		<td>&nbsp;</td>
1923
		<td>&nbsp;</td>
1924
		<td>&nbsp;</td>
1925
		<td>&nbsp;</td>
1926
		<td>&nbsp;</td>
1927
      </tr>
1928
	      <%
1929
		  	currBase_view_id = CDbl(rsRep("base_view_id"))
1930
		  End If
1931
		  ' -------- END GROUP BASE VIEW ------------------------
1932
		  %>
1933
		  <%
1934
		  ' -------- GROUP BY PACKAGE  -----------------
1935
		  If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
1936
		  %>
1937
      <tr>
1938
        <td><img src="images/spacer.gif" width="1" height="1"></td>
1939
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1940
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1941
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1942
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1943
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1944
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1945
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1946
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1947
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1948
      </tr>
1949
      <tr>
1950
        <td>&nbsp;</td>
1951
        <td><%If rsRep("dlocked") = "Y" Then%><img src="images/i_locked.gif" width="7" height="10" hspace="2" alt="Officially released."><%Else%><img src="images/spacer.gif" width="7" height="10" hspace="2"><%End If%></td>
1952
        <td nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_name")%></strong></a></td>
1953
        <td nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("pkg_version")%></strong></a></td>
1954
        <td>&nbsp;</td>
1955
        <td>&nbsp;</td>
1956
        <td>&nbsp;</td>
1957
        <td>&nbsp;</td>
1958
        <td align="center" valign="top" nowrap><%If nShow_dependencies = 0 Then%><%If IsNull( rsRep("not_done") ) Then%><img src="images/i_boxtick_on.gif" width="13" height="13"><%Else%><img src="images/i_boxtick_off.gif" width="13" height="13"><%End If%><%End If%></td>
1959
      </tr>
1960
	      <%
1961
		  	currPv_id = CDbl(rsRep("pv_id"))
1962
		  End If
1963
		  ' -------- END GROUP PACKAGE ------------------------
1964
		  %>
1965
		  <%
1966
		  ' -------- GROUP BY DEPENDENCY  -----------------
1967
		  If Not IsNull(rsRep("dpv_id")) Then
1968
		  	If CDbl(currDpv_id) <> CDbl(rsRep("dpv_id")) Then
1969
		  %>
1970
      <tr>
1971
        <td>&nbsp;</td>
1972
        <td>&nbsp;</td>
1973
        <td>&nbsp;</td>
1974
        <td>&nbsp;</td>
1975
        <td valign="top" nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("dpkg_name")%></strong></a></td>
1976
        <td valign="top" nowrap><a href="fixed_issues.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="body_txt"><strong><%=rsRep("dpkg_version")%></strong></a></td>
1977
        <td>&nbsp;</td>
1978
        <td>&nbsp;</td>
1979
        <td align="center" valign="top" nowrap><%If IsNull( rsRep("not_done") ) Then%><img src="images/i_boxtick_on.gif" width="13" height="13"><%Else%><img src="images/i_boxtick_off.gif" width="13" height="13"><%End If%></td>
1980
      </tr>
1981
	      <%
1982
		  		currDpv_id = CDbl(rsRep("dpv_id"))
1983
		  	End If
1984
		  End If
1985
		  ' -------- END GROUP DEPENDENCY ------------------------
1986
		  %>
1987
	  <%If Not IsNull( rsRep("completed_by") ) AND showTests Then%>
1988
	  <tr>
1989
        <td>&nbsp;</td>
1990
        <td>&nbsp;</td>
1991
		<td>&nbsp;</td>
1992
		<td>&nbsp;</td>
1993
        <td bgcolor="#F5F5F5" valign="top" nowrap class="body_row"><img src="images/i_test.gif" width="16" height="16" hspace="1" align="absmiddle"><%=rsRep("test_name")%></td>
1994
        <td bgcolor="#F5F5F5" valign="top" class="body_row"><%=NewLine_To_BR ( To_HTML ( rsRep("test_summary") ) )%></td>
1995
        <td bgcolor="#F5F5F5" align="center" valign="top">	</td>
1996
        <td bgcolor="#F5F5F5" valign="top" nowrap class="body_txt"><%=EuroDate ( rsRep("completion_date") )%> <a href="mailto:<%=rsRep("user_email")%>" class="txt_linked"><%=rsRep("completed_by")%></a> </td>
1997
        <td>&nbsp;</td>
1998
      </tr>
1999
	  <tr>
2000
        <td><img src="images/spacer.gif" width="1" height="1"></td>
2001
        <td><img src="images/spacer.gif" width="1" height="1"></td>
2002
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2003
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2004
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2005
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2006
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2007
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2008
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2009
      </tr>
2010
	  <%End If%>
2011
	  <%  rsRep.MoveNext
2012
	  WEnd
2013
	  %>
2014
      <tr>
2015
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2016
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2017
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2018
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2019
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2020
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2021
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2022
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2023
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2024
      </tr>
2025
    </table> 
2026
 
2027
	<!-- PRINT, SAVE, ETC. ------------>
2028
	<%If parPrint = "" Then%>
2029
	<br>
2030
	<br>
2031
	<a href="javascript:;" onClick="window.print();" class="txt_linked"><img src="images/btn_print.gif" width="23" height="24" hspace="4" border="0" align="absmiddle">Print this report</a><br>
2032
	<br>
2033
	<%End If%>
2034
	<!-- PRINT, SAVE, ETC. END -------->
2035
	<%
2036
		rsRep.Close
2037
		Set rsRep = nothing
2038
	End If
2039
 
2040
End Sub
2041
%>