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 rsCQ = Server.CreateObject("ADODB.Recordset")
622
		Set issNumDict = CreateObject("Scripting.Dictionary")
70 brianf 623
 
624
 
64 jtweddle 625
		'---- Find Issue numbers in ClearQuest ----
626
		If CDbl(NNiss_db) = enumCLEARQUEST_MASSI_ID Then
627
			iss_num_col = "new_num"
628
			SSsql = _
629
			" SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
630
			" FROM MASSI.admin.software_issue si"&_
631
			" WHERE "
70 brianf 632
 
633
 
64 jtweddle 634
		ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DPGIM_ID Then
635
			iss_num_col = "new_num"
636
			SSsql = _
637
			" SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
638
			" FROM DPGIM.admin.software_issue si"&_
639
			" WHERE "
70 brianf 640
 
641
 
64 jtweddle 642
		ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
643
			iss_num_col = "new_num"
644
			SSsql = _
645
			" SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
70 brianf 646
      " FROM CQ_DEVI.admin.software_issue si"&_
64 jtweddle 647
			" WHERE "
70 brianf 648
 
649
 
64 jtweddle 650
		ElseIf CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then
651
			iss_num_col = "job_number"
652
			SSsql = _
653
			" SELECT dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
70 brianf 654
      " FROM CQ_TDSE.admin.request si"&_
64 jtweddle 655
			" WHERE "
70 brianf 656
 
64 jtweddle 657
		End If
70 brianf 658
 
659
 
64 jtweddle 660
		'---- Split multiple search ----
661
		SSiss_num_list = Trim(SSiss_num_list)
662
		If InStr( SSiss_num_list, " " ) > 0 Then
663
			' space separator found
664
			issARR = Split ( SSiss_num_list, " ")
70 brianf 665
 
64 jtweddle 666
			For Each num_item In issARR
667
				If num_item <> "" Then
668
					SSsql = SSsql & " (si."& iss_num_col &" LIKE '"& Replace( SQLstring(num_item), "*", "%" ) &"') OR"
669
				End If
670
			Next
70 brianf 671
 
64 jtweddle 672
			SSsql = Left ( SSsql, Len(SSsql) - 2 )		' Removes last OR
70 brianf 673
 
64 jtweddle 674
		Else
675
			SSsql = SSsql & " (si."& iss_num_col &" LIKE '"& Replace( SQLstring(SSiss_num_list), "*", "%") &"')"
70 brianf 676
 
64 jtweddle 677
		End If
70 brianf 678
 
64 jtweddle 679
		rsCQ.ActiveConnection = CQ_conn
680
		rsCQ.Source = SSsql
681
		rsCQ.CursorType = 0
682
		rsCQ.CursorLocation = 2
683
		rsCQ.LockType = 3
684
		rsCQ.Open()
70 brianf 685
 
64 jtweddle 686
		' Get find results from CQ
687
		recCount = 1
688
		maxRecCount = 1000
689
		issNumDict.ADD "-1", "-1"		' take care of no results
690
		While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF) AND (recCount < maxRecCount))
691
			issNumDict.ADD Cstr(rsCQ("iss_id")), Cstr(rsCQ("iss_num"))
692
			recCount = recCount + 1
693
			rsCQ.MoveNext
694
		WEnd
70 brianf 695
 
64 jtweddle 696
		rsCQ.Close
697
		Set rsCQ = nothing
70 brianf 698
 
64 jtweddle 699
		Query_String = ReadFile( rootPath & "queries\rep_where_are_bugs_located.sql" )
700
		Query_String = Replace ( Query_String, "/*ISS_DB*/", NNiss_db )
701
		Query_String = Replace ( Query_String, "/*ISS_ID_LIST*/", Join( issNumDict.Keys, ",") )
70 brianf 702
 
64 jtweddle 703
	%>
704
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 705
      <tr>
64 jtweddle 706
        <td width="1%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
707
		<td width="1%" nowrap class="body_colb">Fixed At</td>
708
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
709
        <td width="1%" nowrap class="body_colb">Notes&nbsp;&nbsp;&nbsp;</td>
710
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
711
      </tr>
70 brianf 712
      <tr>
64 jtweddle 713
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
714
      </tr>
715
	   <%
716
	  Dim currIss_id
717
	  currIss_id = -1
718
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 719
 
64 jtweddle 720
	  If rsRep.RecordCount = 0 Then
721
	  	With Response
722
			.write "<tr>"
723
			.write "<td colspan='5' class='body_row'>Found 0 records</td>"
724
			.write "</tr>"
725
		End With
726
	  End If
70 brianf 727
 
64 jtweddle 728
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
729
		  ' -------- GROUP BY ISS_ID -----------------
730
		  If Cstr(currIss_id) <> Cstr(rsRep("iss_id")) Then
731
		  %>
70 brianf 732
		  <tr>
64 jtweddle 733
	        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
734
	        <td></td>
735
	      </tr>
70 brianf 736
	      <tr>
64 jtweddle 737
	        <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>
738
			<td colspan='4' class="body_scol"></td>
739
	      </tr>
740
		  <%
741
		  	currIss_id = Cstr(rsRep("iss_id"))
742
		  End If
743
		  ' -------- END GROUP ------------------------
744
		  %>
70 brianf 745
	      <tr>
64 jtweddle 746
		  	<td class="body_row"></td>
747
			<%If CDbl(rsRep("iss_state")) = enumISSUES_STATE_FIXED Then%>
748
		    	<td align="right"><img src="images/i_tick.gif" width="7" height="7" hspace="6"></td>
749
			<%Else%>
70 brianf 750
		    	<td align="right"><img src='images/spacer.gif' width='7' height='7' hspace='6'></td>
64 jtweddle 751
			<%End If%>
752
	        <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>
753
	        <td nowrap><%=rsRep("notes")%></td>
754
			<td class="body_row"></td>
755
	      </tr>
756
	  <%  rsRep.MoveNext
757
	  WEnd
758
	  %>
70 brianf 759
	  <tr>
64 jtweddle 760
        <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
761
      </tr>
762
    </table>
763
	<!-- PRINT, SAVE, ETC. ------------>
764
	<%If parPrint = "" Then%>
765
	<br>
766
	<br>
767
	<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>
768
	<br>
769
	<%End If%>
770
	<!-- PRINT, SAVE, ETC. END -------->
771
	<%
772
		rsRep.Close
773
		Set rsRep = nothing
774
	End If
70 brianf 775
 
64 jtweddle 776
End Sub
777
%>
778
<%
779
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
780
'==================================================================================
781
' Report Name		: 	Find a Package
782
' Description		:	Locate a package in Release Manager
783
' Form Input		:	Package Name, version extension
784
'==================================================================================
785
Sub Find_Package ( SSsection, SSpkg_name, SSv_ext )
786
	Dim Query_String, rsRep, oRegExp
70 brianf 787
 
788
 
64 jtweddle 789
	If SSsection = "TITLE" Then
790
		Response.write "Find a Package"
791
		Exit Sub
792
	End If
70 brianf 793
 
794
 
64 jtweddle 795
	If SSsection = "FORM" Then
796
	%>
797
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
798
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
70 brianf 799
      <tr>
64 jtweddle 800
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
801
        <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
802
        <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
803
		HINTS:<br>
804
		- You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></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" valign="top">Version Extension (optional)</td>
809
        <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
810
		e.g. .mas or .lvs or .oso or blank etc.</td>
811
      </tr>
70 brianf 812
      <tr>
64 jtweddle 813
        <td nowrap class="form_field">&nbsp;</td>
814
        <td align="right" nowrap class="form_field">&nbsp;</td>
815
        <td><br>
816
		<input type="hidden" name="group" value="<%=parGroup%>">
817
		<input type="hidden" name="repnum" value="<%=parRepNum%>">
818
		<input type="hidden" name="action" value="true">
70 brianf 819
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 820
        </td>
821
      </tr>
822
	  </form>
823
    </table>
824
	<%	Exit Sub
825
	End If
70 brianf 826
 
827
 
64 jtweddle 828
	If SSsection = "BODY" Then
829
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 830
 
64 jtweddle 831
		If SSpkg_name = "" Then SSpkg_name = "%"
832
		If SSv_ext = "" Then SSv_ext = "%"
833
		If Request("withwcard") <> "" Then SSpkg_name = "%"& Replace( SQLstring(SSpkg_name), "*", "") &"%"		'Place wild card automatically
70 brianf 834
 
835
 
836
 
64 jtweddle 837
		' -- Check if this is PV_ID
838
		Set oRegExp = New RegExp
70 brianf 839
 
64 jtweddle 840
		oRegExp.Global = False	'Find only first match
841
	    oRegExp.Pattern = "\D" 'Match number only
70 brianf 842
 
843
 
64 jtweddle 844
		If NOT oRegExp.Test(Request("FRpkg_name")) Then
845
			Query_String = ReadFile( rootPath & "queries\rep_find_package_by_pv_id.sql" )
846
			Query_String = Replace ( Query_String, "/*PV_ID*/", SQLstring(Request("FRpkg_name") )  )
70 brianf 847
 
64 jtweddle 848
		Else
849
			Query_String = ReadFile( rootPath & "queries\rep_find_package.sql" )
850
			Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
851
			Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
852
		End If
70 brianf 853
 
64 jtweddle 854
		Response.Write(Query_String)
855
	%>
856
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 857
      <tr>
64 jtweddle 858
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
859
		<td width="1%" nowrap class="body_colb">Location</td>
860
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
861
      </tr>
70 brianf 862
      <tr>
64 jtweddle 863
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
864
      </tr>
865
	   <%
866
	  Dim currPv_id
867
	  currPv_id = -1
868
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 869
 
64 jtweddle 870
	  If rsRep.RecordCount = 0 Then
871
	  	With Response
872
			.write "<tr>"
873
			.write "<td colspan='3' class='body_row'>Found 0 records</td>"
874
			.write "</tr>"
875
		End With
876
	  End If
70 brianf 877
 
64 jtweddle 878
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
879
		  ' -------- GROUP BY Package Version -----------------
880
		  If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
881
		  %>
70 brianf 882
	      <tr>
64 jtweddle 883
	        <td colspan="2" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
884
	        <td></td>
885
	      </tr>
886
		  <tr>
887
		    <%If Request("withwcard") <> "" Then%>
888
			<%' Highlight results for package search from index page%>
889
	        <td nowrap class="body_scol"><%=Highlight_Substring ( rsRep("pkg_name"), Replace( SQLstring(SSpkg_name), "%", "") )  &" "& rsRep("pkg_version")%></td>
890
			<%Else%>
891
			<td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
892
			<%End If%>
893
			<td colspan='2' class="body_scol"></td>
894
	      </tr>
895
		  <%
896
		  	currPv_id = Cstr(rsRep("pv_id"))
897
		  End If
898
		  ' -------- END GROUP ------------------------
899
		  %>
900
		  <%If NOT IsNull(rsRep("proj_name")) Then%>
70 brianf 901
	      <tr>
64 jtweddle 902
		  	<td class="body_row"></td>
903
	        <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>
904
			<td class="body_row"></td>
905
	      </tr>
906
		  <%Else%>
70 brianf 907
		  <tr>
64 jtweddle 908
		  	<td class="body_row"></td>
909
	        <td class="body_row"></td>
910
			<td class="body_row"></td>
911
	      </tr>
912
		  <%End If%>
913
	  <%  rsRep.MoveNext
914
	  WEnd
915
	  %>
70 brianf 916
	  <tr>
64 jtweddle 917
        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
918
      </tr>
919
    </table>
920
	<!-- PRINT, SAVE, ETC. ------------>
921
	<%If parPrint = "" Then%>
922
	<br>
923
	<br>
924
	<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>
925
	<br>
926
	<%End If%>
927
	<!-- PRINT, SAVE, ETC. END -------->
928
	<%
929
		rsRep.Close
930
		Set rsRep = nothing
931
	End If
70 brianf 932
 
64 jtweddle 933
End Sub
934
%>
935
<%
936
'==================================================================================
937
' Report Name		: 	Find Package Version History
938
' Description		:	Locate all package versions and their current location
939
' Form Input		:	Package Name, version extension
940
'==================================================================================
941
Sub Find_Package_Version_History ( SSsection, SSpkg_name, SSv_ext )
942
	Dim Query_String, rsRep
70 brianf 943
 
944
 
64 jtweddle 945
	If SSsection = "TITLE" Then
946
		Response.write "Find Package Version History"
947
		Exit Sub
948
	End If
70 brianf 949
 
950
 
64 jtweddle 951
	If SSsection = "FORM" Then
952
	%>
953
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
954
	  <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
70 brianf 955
      <tr>
64 jtweddle 956
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
957
        <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
958
        <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
959
		HINTS:<br>
960
		- You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></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" valign="top">Version Extension (optional)</td>
965
        <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
966
		e.g. .mas or .lvs or .oso or blank etc.</td>
967
      </tr>
70 brianf 968
      <tr>
64 jtweddle 969
        <td nowrap class="form_field">&nbsp;</td>
970
        <td align="right" nowrap class="form_field">&nbsp;</td>
971
        <td><br>
972
		<input type="hidden" name="group" value="<%=parGroup%>">
973
		<input type="hidden" name="repnum" value="<%=parRepNum%>">
974
		<input type="hidden" name="action" value="true">
70 brianf 975
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 976
        </td>
977
      </tr>
978
	  </form>
979
    </table>
980
	<%	Exit Sub
981
	End If
70 brianf 982
 
983
 
64 jtweddle 984
	If SSsection = "BODY" Then
985
		Const img_Official = "<img src='images/i_locked.gif' width='7' height='10' hspace='3' align='absmiddle'>"
986
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 987
 
64 jtweddle 988
		If SSpkg_name = "" Then SSpkg_name = "%"
989
		If SSv_ext = "" Then SSv_ext = "%"
70 brianf 990
 
64 jtweddle 991
		Query_String = ReadFile( rootPath & "queries\rep_package_version_history.sql" )
992
		Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
993
		Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
994
	%>
995
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 996
      <tr>
64 jtweddle 997
	    <td width="1%" nowrap class="body_colb" align="right">Official<%=img_Official%></td>
998
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
999
		<td width="1%" nowrap class="body_colb">Location</td>
1000
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
1001
      </tr>
70 brianf 1002
      <tr>
64 jtweddle 1003
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1004
      </tr>
1005
	   <%
1006
	  Dim currPv_id
1007
	  currPv_id = -1
1008
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 1009
 
64 jtweddle 1010
	  If rsRep.RecordCount = 0 Then
1011
	  	With Response
1012
			.write "<tr>"
1013
			.write "<td colspan='4' class='body_row'>Found 0 records</td>"
1014
			.write "</tr>"
1015
		End With
1016
	  End If
70 brianf 1017
 
64 jtweddle 1018
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1019
		  ' -------- GROUP BY Package Version -----------------
1020
		  If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
1021
		  %>
70 brianf 1022
	      <tr>
64 jtweddle 1023
	        <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1024
	        <td></td>
1025
	      </tr>
70 brianf 1026
		  <tr>
64 jtweddle 1027
		    <td align="right"><%If rsRep("dlocked") = "Y" Then%><%=img_Official%><%End If%></td>
1028
	        <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
1029
			<td colspan='2' class="body_scol"></td>
1030
	      </tr>
1031
		  <%
1032
		  	currPv_id = Cstr(rsRep("pv_id"))
1033
		  End If
1034
		  ' -------- END GROUP ------------------------
1035
		  %>
70 brianf 1036
	      <tr>
64 jtweddle 1037
		    <td class="body_row"></td>
1038
		  	<td class="body_row"></td>
1039
			<%If IsNull(rsRep("rtag_id")) Then%>
1040
	        	<td nowrap class="body_txt_gray" valign="top">Not Used!</td>
1041
			<%Else%>
1042
				<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>
1043
			<%End If%>
1044
			<td class="body_row"></td>
1045
	      </tr>
1046
	  <%  rsRep.MoveNext
1047
	  WEnd
1048
	  %>
70 brianf 1049
	  <tr>
64 jtweddle 1050
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1051
      </tr>
1052
    </table>
1053
	<!-- PRINT, SAVE, ETC. ------------>
1054
	<%If parPrint = "" Then%>
1055
	<br>
1056
	<br>
1057
	<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>
1058
	<br>
1059
	<%End If%>
1060
	<!-- PRINT, SAVE, ETC. END -------->
1061
	<%
1062
		rsRep.Close
1063
		Set rsRep = nothing
1064
	End If
70 brianf 1065
 
64 jtweddle 1066
End Sub
1067
%>
1068
<%
1069
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1070
'==================================================================================
1071
' Report Name		: 	Obsolete Packages
1072
' Description		:	List packages that are not used (exclude products)
1073
' INPUT				:	Project, Vesion Tree, Release Label
1074
'==================================================================================
1075
Sub Obsolete_Packages ( SSsection, NNproj_id, NNrtag_id )
1076
	Dim Query_String, rsRep
1077
	Const Allow_All = TRUE
1078
	Const Disallow_All = FALSE
70 brianf 1079
 
64 jtweddle 1080
	If NNproj_id = "" Then NNproj_id = -1
1081
	If NNrtag_id = "" Then NNrtag_id = -1
70 brianf 1082
 
64 jtweddle 1083
	If SSsection = "TITLE" Then
1084
		Response.write "Unused Packages"
1085
		Exit Sub
1086
	End If
70 brianf 1087
 
1088
 
64 jtweddle 1089
	If SSsection = "FORM" Then
1090
	%>
1091
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1092
	  <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 1093
      <tr>
64 jtweddle 1094
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1095
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1096
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1097
      </tr>
70 brianf 1098
      <tr>
64 jtweddle 1099
        <td nowrap class="form_field">&nbsp;</td>
1100
        <td align="right" nowrap class="form_field">Release</td>
1101
        <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1102
      </tr>
70 brianf 1103
      <tr>
64 jtweddle 1104
        <td nowrap class="form_field">&nbsp;</td>
1105
        <td align="right" nowrap class="form_field">&nbsp;</td>
1106
        <td><br>
1107
			<input type="hidden" name="group" value="<%=parGroup%>">
1108
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1109
			<input type="hidden" name="action" value="true">
70 brianf 1110
		<input name="Submit" type="submit" class="form_btn" value="Submit">
64 jtweddle 1111
        </td>
1112
      </tr>
1113
	  </form>
1114
    </table>
1115
	<%	Exit Sub
1116
	End If
70 brianf 1117
 
1118
 
64 jtweddle 1119
	If SSsection = "BODY" Then
1120
		If NOT CBool(Request("action")) Then Exit Sub
70 brianf 1121
 
64 jtweddle 1122
		Query_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )
70 brianf 1123
 
64 jtweddle 1124
		OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1125
	%>
1126
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
70 brianf 1127
      <tr>
64 jtweddle 1128
	    <td width="1%" nowrap class="body_colb">&nbsp;</td>
1129
        <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1130
		<td width="1%" nowrap class="body_colb">Released&nbsp;&nbsp;&nbsp;</td>
1131
		<td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
1132
        <td width="100%" nowrap class="body_colb">&nbsp;</td>
1133
      </tr>
70 brianf 1134
      <tr>
64 jtweddle 1135
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1136
      </tr>
1137
	   <%
1138
	  Dim currView_id
1139
	  currView_id = -1
1140
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
70 brianf 1141
 
64 jtweddle 1142
	  If rsRep.RecordCount = 0 Then
1143
	  	With Response
1144
			.write "<tr>"
1145
			.write "<td colspan='5' class='body_row'>Found 0 records</td>"
1146
			.write "</tr>"
1147
		End With
1148
	  End If
1149
 
1150
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1151
		  ' -------- GROUP BY BASE VIEW  -----------------
1152
		  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1153
		  %>
1154
	      <tr> 
1155
	        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1156
	        <td></td>
1157
	      </tr>
1158
		  <tr> 
1159
	        <td nowrap class="body_scol"><%=rsRep("view_name")%></td>
1160
			<td class="body_scol"></td>
1161
			<td class="body_scol"></td>
1162
			<td class="body_scol"></td>
1163
			<td class="body_scol"></td>
1164
	      </tr>
1165
		  <%
1166
		  	currView_id = CDbl(rsRep("view_id"))
1167
		  End If
1168
		  ' -------- END GROUP ------------------------
1169
		  %>
1170
	      <tr> 
1171
		  	<td class="body_row"></td>
1172
	        <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>
1173
	        <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>
1174
			<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>
1175
			<td class="body_row"></td>
1176
	      </tr>
1177
	  <%  rsRep.MoveNext
1178
	  WEnd
1179
	  %>
1180
	  <tr> 
1181
        <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1182
      </tr>
1183
    </table>
1184
	<!-- PRINT, SAVE, ETC. ------------>
1185
	<%If parPrint = "" Then%>
1186
	<br>
1187
	<br>
1188
	<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>
1189
	<br>
1190
	<%End If%>
1191
	<!-- PRINT, SAVE, ETC. END -------->
1192
	<%
1193
		rsRep.Close
1194
		Set rsRep = nothing
1195
	End If
1196
 
1197
End Sub
1198
%>
1199
<%
1200
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1201
'==================================================================================
1202
' Report Name		: 	Deployable Software Modules
1203
' Description		:	Shows packages that are deployed to the customers and shows new packages marked as deployable.
1204
' INPUT				:	Project, Vesion Tree, Release Label, Base View (hard-coded to PRODUCTS)
1205
'==================================================================================
1206
Sub Deployable_Software_Modules ( sSection, nProj_id,  nRtag_id, nBase_view_id )
1207
	Dim Query_String, rsRep
1208
	Const Allow_All = TRUE
1209
	Const Disallow_All = FALSE
1210
 
1211
	If nProj_id = "" Then nProj_id = -1
1212
	If nRtag_id = "" Then nRtag_id = -1
1213
 
1214
	If sSection = "TITLE" Then
1215
		Response.write "Deployable Software Modules"
1216
		Exit Sub
1217
	End If
1218
 
1219
 
1220
	If sSection = "FORM" Then
1221
	%>
1222
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1223
	  <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">
1224
      <tr> 
1225
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1226
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1227
        <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
1228
      </tr>
1229
      <tr> 
1230
        <td nowrap class="form_field">&nbsp;</td>
1231
        <td align="right" nowrap class="form_field">Release</td>
1232
        <td><%Call Get_Release_Labels ( nProj_id, nRtag_id, Disallow_All )%></td>
1233
      </tr>
1234
	  <tr> 
1235
        <td nowrap class="form_field">&nbsp;</td>
1236
        <td align="right" nowrap class="form_field">Base View</td>
1237
        <td><select name="noname" class='form_item' disabled>
1238
				<option>PRODUCTS</option>
1239
		    </select></td>
1240
      </tr>
1241
      <tr> 
1242
        <td nowrap class="form_field">&nbsp;</td>
1243
        <td align="right" nowrap class="form_field">&nbsp;</td>
1244
        <td><br>
1245
			<input type="hidden" name="group" value="<%=parGroup%>">
1246
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1247
			<input type="hidden" name="FRbase_view_id" value="<%=enumBASE_VIEW_PRODUCTS%>">
1248
			<input type="hidden" name="action" value="true">
1249
		<input name="Submit" type="submit" class="form_btn" value="Submit"> 
1250
        </td>
1251
      </tr>
1252
	  </form>
1253
    </table>
1254
	<%	Exit Sub
1255
	End If
1256
 
1257
 
1258
	If sSection = "BODY" Then
1259
		If NOT CBool(Request("action")) Then Exit Sub
1260
		'--- New Deployable Modules ---
1261
		Query_String = ReadFile( rootPath & "queries\rep_new_deployable_packages.sql" )
1262
 
1263
		OraDatabase.Parameters.Add "RTAG_ID", 		nRtag_id, 		ORAPARM_INPUT, ORATYPE_NUMBER
1264
		OraDatabase.Parameters.Add "BASE_VIEW_ID", 	nBase_view_id, 	ORAPARM_INPUT, ORATYPE_NUMBER
1265
	%>
1266
	<table width="100%"  border="0" cellspacing="0" cellpadding="2">
1267
      <tr>
1268
        <td nowrap class="body_colb" colspan="3" background="images/bg_bage.gif">&nbsp;New Deployable Package</td>
1269
      </tr>
1270
      <tr>
1271
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1272
      </tr>
1273
	  <tr>
1274
        <td width="1%" class="body_txt">Package Name</td>
1275
		<td width="1%" class="body_txt">Version</td>
1276
		<td width="100%" class="body_txt">Last Modifier</td>
1277
      </tr>
1278
	  <tr>
1279
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1280
      </tr>
1281
	  <%
1282
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1283
	  %>
1284
	  <%If rsRep.RecordCount = 0 Then%>
1285
	  <tr>
1286
        <td nowrap class="body_row" colspan="3">Found 0 records! </td>
1287
      </tr>
1288
	  <%End If%>
1289
	  <%While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))%>
1290
      <tr>
1291
        <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>
1292
		<td nowrap class="body_row"><%=rsRep("pkg_version")%></td>		
1293
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>	
1294
      </tr>
1295
	  <%rsRep.MoveNext
1296
	    WEnd
1297
	  rsRep.Close
1298
	  Set rsRep = Nothing%>
1299
	  <tr>
1300
        <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1301
      </tr>
1302
	  <%
1303
	  ' Go To Release link...
1304
	  Query_String = _
1305
	  " SELECT proj.PROJ_NAME, rt.RTAG_NAME"&_
1306
	  "   FROM PROJECTS proj,"&_
1307
	  "		   RELEASE_TAGS rt"&_
1308
	  "	 WHERE rt.PROJ_ID = proj.proj_id"&_
1309
	  "	   AND rt.rtag_id = :RTAG_ID"
1310
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1311
	  %>
1312
      <tr>
1313
        <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>
1314
      </tr>
1315
	  <%
1316
	  rsRep.Close
1317
	  Set rsRep = Nothing%>
1318
    </table>
1319
	<br><br>
1320
	<%
1321
		'--- Current Deployable Modules ---
1322
		Query_String = ReadFile( rootPath & "queries\rep_current_deployable_packages.sql" )
1323
	%>
1324
	<table width="100%"  border="0" cellspacing="0" cellpadding="2">
1325
      <tr>
1326
        <td colspan="4" nowrap class="body_colb" background="images/bg_bage.gif">&nbsp;Current Deployable Packages </td>
1327
      </tr>
1328
      <tr>
1329
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1330
      </tr>
1331
	  <%
1332
	  Dim currPv_id
1333
	  currPv_id = -1
1334
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1335
 
1336
	  If rsRep.RecordCount = 0 Then
1337
	  	With Response
1338
			.write "<tr>"
1339
			.write "<td colspan='4' class='body_row'>Found 0 records</td>"
1340
			.write "</tr>"
1341
		End With
1342
	  End If
1343
 
1344
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1345
		  ' -------- GROUP BY PRODUCT NAME  -----------------
1346
		  If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
1347
		  %>
1348
      <tr>
1349
        <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1350
        <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1351
		<td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1352
        <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
1353
      </tr>
1354
      <tr>
1355
        <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>
1356
        <td>&nbsp;</td>
1357
		<td>&nbsp;</td>
1358
        <td>&nbsp;</td>
1359
      </tr>
1360
	  <%
1361
		  	currPv_id = CDbl(rsRep("pv_id"))
1362
		  End If
1363
		  ' -------- END GROUP ------------------------
1364
		  %>
1365
      <tr>
1366
        <td>&nbsp;</td>
1367
        <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("dpkg_name")%></a></td>
1368
		<td nowrap class="body_row"><%=rsRep("dpkg_version")%></td>
1369
        <td nowrap class="err_alert"><%=rsRep("is_dep_deployable")%></td>
1370
      </tr>
1371
	  <%  rsRep.MoveNext
1372
	  WEnd
1373
	  %>
1374
      <tr>
1375
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1376
      </tr>
1377
    </table> 
1378
	<!-- PRINT, SAVE, ETC. ------------>
1379
	<%If parPrint = "" Then%>
1380
	<br>
1381
	<br>
1382
	<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>
1383
	<br>
1384
	<%End If%>
1385
	<!-- PRINT, SAVE, ETC. END -------->
1386
	<%
1387
		rsRep.Close
1388
		Set rsRep = nothing
1389
	End If
1390
 
1391
End Sub
1392
%>
1393
 
1394
<%
1395
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1396
'==================================================================================
1397
' Report Name		: 	Bill Of Materials
1398
' Description		:	List products for a BOM
1399
' INPUT				:	
1400
'==================================================================================
1401
Sub Bill_of_Materials ( SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion )
1402
	Dim Query_String, rsRep, rsQry
1403
	Const Allow_All = TRUE
1404
	Const Disallow_All = FALSE
1405
 
1406
	If NNproj_id = "" Then NNproj_id = -1
1407
	If NNrtag_id = "" Then NNrtag_id = -1
1408
	If NNversion = "" Then NNversion = -1
1409
 
1410
	If SSsection = "TITLE" Then
1411
		Response.write "BOM - History Track"
1412
		Exit Sub
1413
	End If
1414
 
1415
 
1416
	If SSsection = "FORM" Then
1417
	%>
1418
	<script language="JavaScript" src="images/calendar.js"></script>	
1419
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1420
	  <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">
1421
      <tr> 
1422
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1423
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1424
        <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1425
      </tr>
1426
      <tr> 
1427
        <td nowrap class="form_field">&nbsp;</td>
1428
        <td align="right" nowrap class="form_field">Release</td>
1429
        <td><%Call Get_Release_labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1430
      </tr>
1431
 	  <tr> 
1432
        <td nowrap class="form_field">&nbsp;</td>
1433
        <td align="right" nowrap class="form_field">SBOM Version</td>
1434
        <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
1435
      </tr> 
1436
      <tr>
1437
        <td colspan="3" nowrap class="form_field">Between 
1438
        <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>"> 
1439
		<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> 
1440
        And 
1441
        <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
1442
        <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>
1443
		</tr>	  
1444
      <tr> 
1445
        <td nowrap class="form_field">&nbsp;</td>
1446
        <td align="right" nowrap class="form_field">&nbsp;</td>
1447
        <td><br>
1448
			<input type="hidden" name="group" value="<%=parGroup%>">
1449
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1450
			<input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
1451
 
1452
			<input type="hidden" name="action" value="true">
1453
		<input name="Submit" type="submit" class="form_btn" value="Submit"> 
1454
        </td>
1455
      </tr>
1456
	  </form>
1457
    </table>
1458
	<p>
1459
      <%	Exit Sub
1460
	End If
1461
 
1462
 
1463
 
1464
	OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1465
	OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
1466
	Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
1467
	Dim bomId 
1468
	bomId = rsQry("bom_id")
1469
	rsQry.close
1470
	Set rsQry = nothing	
1471
 
1472
 
1473
	If SSsection = "BODY" Then
1474
		If NOT CBool(Request("action")) Then Exit Sub
1475
 
1476
		'Query_String = ReadFile( rootPath & "queries\AllProducts.sql" )
1477
 
1478
		'OraDatabase.Parameters.Add "BOM_ID", bomId, ORAPARM_INPUT, ORATYPE_NUMBER
1479
	%>
1480
	</p>
1481
	<table width="20%" border="0" cellspacing="0" cellpadding="2">
1482
                <tr>
1483
				  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Trail</td>
1484
                  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>Date</td>
1485
                  <td width="40%" background="images/bg_bage_0.gif" class="body_col" nowrap>Action</td>
1486
				  <td width="1%" background="images/bg_bage_0.gif" class="body_col" nowrap>User</td>
1487
                </tr>
1488
      <tr>
1489
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1490
      </tr>
1491
      <%
1492
 
1493
	  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 )
1494
 
1495
 
1496
	  If rsRep.RecordCount = 0 Then
1497
	  	With Response
1498
			.write "<tr>"
1499
 
1500
 
1501
			.write "<td colspan='5' class='body_row'>Found 0 bom trail records</td>"
1502
			.write "</tr>"
1503
		End With
1504
	  Else
1505
	  %>
1506
	        <tr>
1507
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1508
      </tr>
1509
      <tr>
1510
        <td nowrap class="body_scol">Bom</td>
1511
		<td nowrap class="body_scol"></td>	  
1512
        <td nowrap class="body_scol"></td>
1513
        <td nowrap class="body_scol"></td>
1514
      </tr>
1515
	  <%
1516
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1517
		  %>
1518
      <tr>
1519
 		<td nowrap class="body_scol"></td>
1520
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
1521
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
1522
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>
1523
      </tr>
1524
      <%  rsRep.MoveNext
1525
	  WEnd
1526
	  End If
1527
	  %>
1528
      <tr>
1529
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1530
      </tr>
1531
      <%
1532
 
1533
	  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 )
1534
 
1535
 
1536
	  If rsRep.RecordCount = 0 Then
1537
	  	With Response
1538
			.write "<tr>"
1539
 
1540
 
1541
			.write "<td colspan='5' class='body_row'>Found 0 node trail records</td>"
1542
			.write "</tr>"
1543
		End With
1544
	  Else	
1545
	  %>
1546
 
1547
      <tr>
1548
        <td nowrap class="body_scol">Node</td>
1549
		<td nowrap class="body_scol"></td>	  
1550
        <td nowrap class="body_scol"></td>
1551
        <td nowrap class="body_scol"></td>
1552
      </tr>
1553
	  <%
1554
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1555
		  %>
1556
      <tr>
1557
 		<td nowrap class="body_scol"></td>
1558
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
1559
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
1560
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>
1561
      </tr>
1562
      <%  rsRep.MoveNext
1563
	  WEnd
1564
	  End If
1565
	  %>	
1566
      <tr>
1567
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1568
      </tr>	  
1569
      <%
1570
 
1571
	  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 )
1572
 
1573
 
1574
	  If rsRep.RecordCount = 0 Then
1575
	  	With Response
1576
			.write "<tr>"
1577
 
1578
 
1579
			.write "<td colspan='5' class='body_row'>Found 0 operating systems trail records</td>"
1580
			.write "</tr>"
1581
		End With
1582
	  Else
1583
	  %>
1584
	        <tr>
1585
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1586
      </tr>
1587
      <tr>
1588
        <td nowrap class="body_scol">Operating System</td>
1589
		<td nowrap class="body_scol"></td>	  
1590
        <td nowrap class="body_scol"></td>
1591
        <td nowrap class="body_scol"></td>
1592
      </tr>
1593
	  <%
1594
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1595
		  %>
1596
      <tr>
1597
 		<td nowrap class="body_scol"></td>
1598
        <td nowrap class="body_row"><%=rsRep("date_time_stamp")%></td>
1599
        <td nowrap class="body_row"><%=rsRep("trail_action")%></td>
1600
		<td nowrap class="body_row"><%=rsRep("full_name")%></td>
1601
      </tr>
1602
      <%  rsRep.MoveNext
1603
	  WEnd
1604
	  End If
1605
	  %>	 
1606
      <tr>
1607
        <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1608
      </tr>	     
1609
    </table>
1610
	<p>&nbsp;	  </p>
1611
	<p>        <!-- PRINT, SAVE, ETC. ------------>
1612
      <%If parPrint = "" Then%>
1613
      <br>
1614
      <br>
1615
        <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>
1616
      <br>
1617
      <%End If%>
1618
      <!-- PRINT, SAVE, ETC. END -------->
1619
      <%
1620
		rsRep.Close
1621
		Set rsRep = nothing
1622
	End If
1623
 
1624
End Sub
1625
%>
1626
 
1627
<%
1628
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1629
'==================================================================================
1630
' Report Name		: 	Build History
1631
' Description		:	List packages which were build between certain dates.
1632
' INPUT				:	
1633
'==================================================================================
1634
Sub Build_History ( SSsection, NNproj_id, NNrtag_id)
1635
	Dim Query_String, rsRep, rsQry
1636
	Const Allow_All = TRUE
1637
	Const Disallow_All = FALSE
1638
 
1639
	If NNproj_id = "" Then NNproj_id = -1
1640
	If NNrtag_id = "" Then NNrtag_id = -1
1641
 
1642
	If SSsection = "TITLE" Then
1643
		Response.write "Build History"
1644
		Exit Sub
1645
	End If
1646
 
1647
 
1648
	If SSsection = "FORM" Then
1649
	%>
1650
	<script language="JavaScript" src="images/calendar.js"></script>
1651
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1652
	  <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">
1653
      <tr> 
1654
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1655
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1656
        <td width="100%"><%Call Get_Projects( NNproj_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">Release</td>
1662
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
1663
 
1664
      </tr>
1665
      <tr> 
1666
        <td nowrap class="form_field">&nbsp;</td>
1667
        <td align="right" nowrap class="form_field">SBOM Version</td>
1668
        <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
1669
      </tr>	  
1670
      <tr>
1671
        <td colspan="3" nowrap class="form_field">Between 
1672
        <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>"> 
1673
		<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> 
1674
        And 
1675
        <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
1676
        <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>
1677
		</tr>
1678
      <tr> 
1679
        <td nowrap class="form_field">&nbsp;</td>
1680
        <td align="right" nowrap class="form_field">&nbsp;</td>
1681
        <td><br>
1682
			<input type="hidden" name="group" value="<%=parGroup%>">
1683
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1684
			<input type="hidden" name="action" value="true">
1685
		<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"> 
1686
        </td>
1687
      </tr>
1688
	  </form>
1689
    </table>
1690
	<p>
1691
      <%	Exit Sub
1692
	End If
1693
 
1694
 
1695
	If SSsection = "BODY" Then
1696
		If NOT CBool(Request("action")) Then Exit Sub
1697
	%>
1698
	</p>
1699
	<table width="20%" border="0" cellspacing="0" cellpadding="2">
1700
      <tr>
1701
        <td width="1%" nowrap class="body_colb">&nbsp;</td>	  
1702
        <td width="5%" nowrap class="body_colb">Package</td>
1703
        <td width="95%" nowrap class="body_colb">Version</td>
1704
      </tr>
1705
      <tr>
1706
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1707
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1708
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>				
1709
      </tr>
1710
      <%
1711
	  Dim currView_id
1712
	  currView_id = -1
1713
 
1714
  		OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1715
		OraDatabase.Parameters.Add "INITDATE", Request.Form("FRinitdate"), ORAPARM_INPUT, ORATYPE_STRING
1716
		OraDatabase.Parameters.Add "DUEDATE", Request.Form("FRduedate"), ORAPARM_INPUT, ORATYPE_STRING
1717
 
1718
	  Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("rep_build_history.sql"), cint(0) )
1719
 
1720
	  If rsRep.RecordCount = 0 Then
1721
	  	With Response
1722
			.write "<tr>"
1723
			.write "<td colspan='5' class='body_row'>Found 0 records</td>"
1724
			.write "</tr>"
1725
		End With
1726
	  End If
1727
 
1728
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1729
		  ' -------- GROUP BY BASE VIEW  -----------------
1730
		  If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1731
		  %>
1732
      <tr>
1733
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1734
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>		
1735
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1736
      </tr>
1737
 
1738
       <tr>
1739
        <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
1740
        <td>&nbsp;</td>
1741
		<td>&nbsp;</td>
1742
 
1743
      </tr>
1744
 
1745
      <%
1746
		  	currView_id = CDbl(rsRep("view_id"))
1747
		  End If
1748
		  ' -------- END GROUP ------------------------
1749
		  %>
1750
      <tr>
1751
	    <td width="1%" nowrap class="body_colb">&nbsp;</td>
1752
        <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>
1753
        <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>
1754
      </tr>
1755
      <%  rsRep.MoveNext
1756
	  WEnd
1757
	  %>
1758
      <tr>
1759
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1760
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1761
        <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>				
1762
      </tr>
1763
    </table>
1764
	<p>&nbsp;	  </p>
1765
	<p>        <!-- PRINT, SAVE, ETC. ------------>
1766
      <%If parPrint = "" Then%>
1767
      <br>
1768
      <br>
1769
        <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>
1770
      <br>
1771
      <%End If%>
1772
      <!-- PRINT, SAVE, ETC. END -------->
1773
      <%
1774
		rsRep.Close
1775
		Set rsRep = nothing
1776
	End If
1777
 
1778
End Sub
1779
%>
1780
 
1781
 
1782
<%
1783
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1784
'==================================================================================
1785
' Report Name		: 	Unit Tests per Package
1786
' Description		:	List unit tests per package showing the unit test completeness
1787
' INPUT				:	Project, Vesion Tree, Release Label, Base View, Level of Completeness, Show/Hide Dependencies, PV_ID
1788
'==================================================================================
1789
Sub Unit_Tests_Per_Package ( sSection, nProj_id,  nRtag_id, nBase_view_id, nLevel_of_complete, nShow_dependencies, nPv_id )
1790
	Dim Query_String, rsRep
1791
	Const Allow_All = TRUE
1792
	Const Disallow_All = FALSE
1793
 
1794
	If nProj_id = "" Then nProj_id = -1
1795
	If nRtag_id = "" Then nRtag_id = -1
1796
	If nShow_dependencies = "" Then nShow_dependencies = 0
1797
	If nPv_id = "" Then nPv_id = -1
1798
 
1799
	If sSection = "TITLE" Then
1800
		Response.write "Unit Tests per Package"
1801
		Exit Sub
1802
	End If
1803
 
1804
 
1805
	If sSection = "FORM" Then
1806
	%>
1807
    </p>
1808
	<table width="100%" border="0" cellpadding="2" cellspacing="1">
1809
	  <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">
1810
      <tr> 
1811
        <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1812
        <td width="1%" align="right" nowrap class="form_field">Project</td>
1813
        <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
1814
      </tr>
1815
      <tr> 
1816
        <td nowrap class="form_field">&nbsp;</td>
1817
        <td align="right" nowrap class="form_field">Release</td>
1818
        <td><%Call Get_Release_Labels ( nProj_id,  nRtag_id, Disallow_All )%></td>
1819
      </tr>
1820
	  <tr> 
1821
        <td nowrap class="form_field">&nbsp;</td>
1822
        <td align="right" nowrap class="form_field">Base View</td>
1823
        <td><%Call Get_Base_Views ( nRtag_id, nBase_view_id, Allow_All )%></td>
1824
      </tr>
1825
	  <tr> 
1826
        <td nowrap class="form_field">&nbsp;</td>
1827
        <td align="right" nowrap class="form_field">Show Dependencie's Unit Tests</td>
1828
        <td><input type="checkbox" name="FRshow_deps" value="1" <%If nShow_dependencies <> 0 Then%>checked<%End If%>></td>
1829
      </tr>
1830
      <tr> 
1831
        <td nowrap class="form_field">&nbsp;</td>
1832
        <td align="right" nowrap class="form_field">&nbsp;</td>
1833
        <td><br>
1834
			<input type="hidden" name="group" value="<%=parGroup%>">
1835
			<input type="hidden" name="repnum" value="<%=parRepNum%>">
1836
			<input type="hidden" name="FRtest_complete" value="0">
1837
			<input type="hidden" name="action" value="true">
1838
		<input name="Submit" type="submit" class="form_btn" value="Submit"> 
1839
        </td>
1840
      </tr>
1841
	  </form>
1842
    </table>
1843
	<%	Exit Sub
1844
	End If
1845
 
1846
 
1847
	If sSection = "BODY" Then
1848
		If NOT CBool(Request("action")) Then Exit Sub
1849
 
1850
		Query_String = ReadFile( rootPath & "queries\rep_unit_tests_per_package.sql" )
1851
 
1852
		OraDatabase.Parameters.Add "RTAG_ID", 		nRtag_id, 		ORAPARM_INPUT, ORATYPE_NUMBER
1853
		OraDatabase.Parameters.Add "BASE_VIEW", 	nBase_view_id, 	ORAPARM_INPUT, ORATYPE_NUMBER
1854
		OraDatabase.Parameters.Add "COMPLETENESS", 	nLevel_of_complete, ORAPARM_INPUT, ORATYPE_NUMBER
1855
		OraDatabase.Parameters.Add "SHOW_DEPS", 	nShow_dependencies, ORAPARM_INPUT, ORATYPE_NUMBER
1856
		OraDatabase.Parameters.Add "PV_ID", 		nPv_id, 		ORAPARM_INPUT, ORATYPE_NUMBER
1857
	%>
1858
	<table width="100%" border="0" cellspacing="0" cellpadding="1">
1859
      <tr>
1860
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
1861
        <td width="1%" nowrap class="body_colb">&nbsp;</td>
1862
        <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
1863
        <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
1864
        <td width="1%" nowrap class="body_colb">Test Name&nbsp;&nbsp;&nbsp;</td>
1865
        <td width="100%" nowrap class="body_colb">Test Summary&nbsp; </td>
1866
        <td width="1%" nowrap class="body_colb"></td>
1867
        <td width="1%" nowrap class="body_colb">Stamp</td>
1868
        <td width="1%" nowrap class="body_colb">Test Completed &nbsp;&nbsp;&nbsp;</td>
1869
      </tr>
1870
      <tr>
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
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1875
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1876
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1877
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1878
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1879
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1880
      </tr>
1881
	  <%
1882
	  Dim currBase_view_id, currPv_id, currDpv_id, showTests
1883
	  currBase_view_id = -1
1884
	  currPv_id = -1
1885
	  currDpv_id = -1
1886
 
1887
	  Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1888
 
1889
	  If rsRep.RecordCount = 0 Then
1890
	  	With Response
1891
			.write "<tr>"
1892
			.write "<td colspan='9' class='body_row'>Found 0 records</td>"
1893
			.write "</tr>"
1894
		End With
1895
	  End If
1896
 
1897
	  While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1898
	  	  If nShow_dependencies <> 0 Then
1899
		  	' show dependency is ON
1900
		  	If rsRep("dpkg_name") = "------" Then
1901
				showTests = FALSE
1902
			Else
1903
				showTests = TRUE
1904
			End If
1905
		  Else
1906
		  	showTests = TRUE
1907
		  End If
1908
 
1909
		  ' -------- GROUP BY BASE VIEW  -----------------
1910
		  If CDbl(currBase_view_id) <> CDbl(rsRep("base_view_id")) Then
1911
		  %>
1912
	  <tr>
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
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1917
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1918
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1919
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1920
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1921
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1922
      </tr>
1923
       <tr>
1924
        <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
1925
        <td>&nbsp;</td>
1926
		<td>&nbsp;</td>
1927
		<td>&nbsp;</td>
1928
		<td>&nbsp;</td>
1929
		<td>&nbsp;</td>
1930
		<td>&nbsp;</td>
1931
		<td>&nbsp;</td>
1932
		<td>&nbsp;</td>
1933
      </tr>
1934
	      <%
1935
		  	currBase_view_id = CDbl(rsRep("base_view_id"))
1936
		  End If
1937
		  ' -------- END GROUP BASE VIEW ------------------------
1938
		  %>
1939
		  <%
1940
		  ' -------- GROUP BY PACKAGE  -----------------
1941
		  If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
1942
		  %>
1943
      <tr>
1944
        <td><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
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1949
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1950
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1951
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1952
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1953
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1954
      </tr>
1955
      <tr>
1956
        <td>&nbsp;</td>
1957
        <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>
1958
        <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>
1959
        <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>
1960
        <td>&nbsp;</td>
1961
        <td>&nbsp;</td>
1962
        <td>&nbsp;</td>
1963
        <td>&nbsp;</td>
1964
        <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>
1965
      </tr>
1966
	      <%
1967
		  	currPv_id = CDbl(rsRep("pv_id"))
1968
		  End If
1969
		  ' -------- END GROUP PACKAGE ------------------------
1970
		  %>
1971
		  <%
1972
		  ' -------- GROUP BY DEPENDENCY  -----------------
1973
		  If Not IsNull(rsRep("dpv_id")) Then
1974
		  	If CDbl(currDpv_id) <> CDbl(rsRep("dpv_id")) Then
1975
		  %>
1976
      <tr>
1977
        <td>&nbsp;</td>
1978
        <td>&nbsp;</td>
1979
        <td>&nbsp;</td>
1980
        <td>&nbsp;</td>
1981
        <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>
1982
        <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>
1983
        <td>&nbsp;</td>
1984
        <td>&nbsp;</td>
1985
        <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>
1986
      </tr>
1987
	      <%
1988
		  		currDpv_id = CDbl(rsRep("dpv_id"))
1989
		  	End If
1990
		  End If
1991
		  ' -------- END GROUP DEPENDENCY ------------------------
1992
		  %>
1993
	  <%If Not IsNull( rsRep("completed_by") ) AND showTests Then%>
1994
	  <tr>
1995
        <td>&nbsp;</td>
1996
        <td>&nbsp;</td>
1997
		<td>&nbsp;</td>
1998
		<td>&nbsp;</td>
1999
        <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>
2000
        <td bgcolor="#F5F5F5" valign="top" class="body_row"><%=NewLine_To_BR ( To_HTML ( rsRep("test_summary") ) )%></td>
2001
        <td bgcolor="#F5F5F5" align="center" valign="top">	</td>
2002
        <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>
2003
        <td>&nbsp;</td>
2004
      </tr>
2005
	  <tr>
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
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2010
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2011
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2012
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2013
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2014
		<td><img src="images/spacer.gif" width="1" height="1"></td>
2015
      </tr>
2016
	  <%End If%>
2017
	  <%  rsRep.MoveNext
2018
	  WEnd
2019
	  %>
2020
      <tr>
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
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2025
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2026
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2027
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2028
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2029
		<td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2030
      </tr>
2031
    </table> 
2032
 
2033
	<!-- PRINT, SAVE, ETC. ------------>
2034
	<%If parPrint = "" Then%>
2035
	<br>
2036
	<br>
2037
	<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>
2038
	<br>
2039
	<%End If%>
2040
	<!-- PRINT, SAVE, ETC. END -------->
2041
	<%
2042
		rsRep.Close
2043
		Set rsRep = nothing
2044
	End If
2045
 
2046
End Sub
2047
%>