Subversion Repositories DevTools

Rev

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