Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%
2
'=====================================================
3
'|                                                   |
129 ghuddy 4
'|                 REPORTS DEFINITION                |
5
'|                                                   |
119 ghuddy 6
'=====================================================
7
' Good idea to set when using redirect
129 ghuddy 8
Response.Expires = 0   ' always load the page, dont store
119 ghuddy 9
 
10
'To enable the script timeout to 10 mins
11
Server.ScriptTimeout=600
12
%>
13
 
14
<%
15
'------------ ACCESS CONTROL ------------------
16
%>
17
 
18
<%
19
'------------ Variable Definition -------------
20
Dim rsQry
21
Dim rsTemp
22
Dim parPv_id, parExt
23
Dim objReleaseContent
24
Dim aReleaseContent
25
Dim objPackageDetails
129 ghuddy 26
Dim outobjDetails
27
Dim pvIdList
28
Dim dpv_id
29
Dim BldStd
119 ghuddy 30
'------------ Constants Declaration -----------
31
'------------ Variable Init -------------------
32
 
33
parExt = Request("ext")
34
Set objReleaseContent = CreateObject("Scripting.Dictionary")
35
Set objPackageDetails = CreateObject("Scripting.Dictionary")
36
Set outobjDetails = CreateObject("Scripting.Dictionary")
37
'----------------------------------------------------------------------------------------------------------------------------------------
38
Sub GetPackageInformation ( nPv_id, ByRef oPackageDetails )
129 ghuddy 39
   Dim rsQry, query
40
   query = _
41
   " SELECT pkg.pkg_name, pv.* "&_
42
   "  FROM PACKAGES pkg,"&_
43
   "       PACKAGE_VERSIONS pv"&_
44
   " WHERE pv.pv_id = "& nPv_id &_
45
   "   AND pv.pkg_id = pkg.pkg_id   "
46
 
47
   Set rsQry = OraDatabase.DbCreateDynaset( query, 0)
48
 
49
   oPackageDetails.RemoveAll
50
 
51
   If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
52
      oPackageDetails("pkg_name") = rsQry("pkg_name")
53
      oPackageDetails("pkg_version") = rsQry("pkg_version")
54
      oPackageDetails("v_ext") = rsQry("v_ext")
55
      oPackageDetails("pv_description") = rsQry("pv_description")
56
      oPackageDetails("pv_overview") = rsQry("pv_overview")
57
      oPackageDetails("src_path") = rsQry("src_path")
58
      oPackageDetails("pkg_label") = rsQry("pkg_label")
59
      oPackageDetails("is_build_env_required") = rsQry("is_build_env_required")
60
 
61
   End If
62
 
63
   rsQry.Close()
64
   Set rsQry = Nothing
119 ghuddy 65
End Sub
66
'----------------------------------------------------------------------------------------------------------------------------------------
129 ghuddy 67
Function SQL_Build_Std ( nPv_id )
68
   SQL_Build_Std = _
69
   " SELECT bs.bs_name"&_
70
   "  FROM RELEASE_MANAGER.PACKAGE_VERSIONS pv,"&_
71
   "       RELEASE_MANAGER.BUILD_STANDARDS bs"&_
72
   " WHERE pv.PV_ID = "& nPv_id &_
73
   "   AND pv.BS_ID = bs.BS_ID "
74
End Function
75
'----------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 76
Function SQL_Build_Env ( nPv_id )
129 ghuddy 77
   SQL_Build_Env = _
78
   " SELECT bm.bm_name"&_
79
   "  FROM  RELEASE_MANAGER.PACKAGE_BUILD_INFO pbi,"&_
80
   "        RELEASE_MANAGER.BUILD_MACHINES bm"&_
81
   " WHERE pbi.PV_ID = "& nPv_id &_
82
   "   AND pbi.BM_ID = bm.BM_ID "&_
83
   " ORDER BY UPPER(bm.BM_NAME) "
119 ghuddy 84
End Function
85
'----------------------------------------------------------------------------------------------------------------------------------------
86
Function SQL_Modules (nPv_idList)
129 ghuddy 87
   SQL_Modules   = _
88
   "SELECT DISTINCT"&_
89
    "   qry.DPV_ID "&_
119 ghuddy 90
    " FROM ("&_
129 ghuddy 91
    "      SELECT dep.*,"&_
92
    "            LEVEL AS LEVEL_NUM"&_
93
    "        FROM PACKAGE_DEPENDENCIES dep"&_
94
    "      START WITH dep.PV_ID IN ( "& nPv_idList &" ) "&_
95
    "      CONNECT BY PRIOR dep.DPV_ID = dep.PV_ID"&_
96
    "   ) qry,"&_
97
    "   PACKAGES pkg,"&_
98
   "   PACKAGE_VERSIONS pv"&_
99
    " WHERE qry.PV_ID = pv.PV_ID AND pv.PKG_ID = pkg.PKG_ID"
100
End   Function
119 ghuddy 101
'----------------------------------------------------------------------------------------------------------------------------------------
102
Function SQL_Build_Dependencies ( nPv_id )
129 ghuddy 103
   SQL_Build_Dependencies = _
104
   " SELECT dpkg.pkg_name, dpv.pkg_version"&_
105
   "     FROM PACKAGE_DEPENDENCIES dep,"&_
106
   "           PACKAGES dpkg,"&_
107
   "         PACKAGE_VERSIONS dpv"&_
108
   "    WHERE dep.pv_id = "& nPv_id &_
109
   "      AND dep.DPV_ID = dpv.pv_id"&_
110
   "      AND dpv.pkg_id = dpkg.pkg_id   "&_
111
   "   ORDER BY UPPER(dpkg.pkg_name) "
119 ghuddy 112
End Function
113
'----------------------------------------------------------------------------------------------------------------------------------------
114
Sub GetReleaseContent ( nBom_id, ByRef oReleaseContent )
129 ghuddy 115
   Dim rsQry, query
116
 
117
   query = _
118
   " SELECT qry.prod_id"&_
119
   "  FROM ("&_
120
   "         SELECT DISTINCT"&_
121
   "          osc.PROD_ID,"&_
122
   "            pkg.pkg_name,"&_
123
   "         pv.pkg_version,"&_
124
   "         1   as   seq_num"&_
125
   "         FROM DEPLOYMENT_MANAGER.bom_contents bc,"&_
126
   "         DEPLOYMENT_MANAGER.operating_systems os, "&_
127
   "         DEPLOYMENT_MANAGER.os_contents osc,"&_
128
   "         PACKAGES pkg,"&_
129
   "         PACKAGE_VERSIONS pv,"&_
130
   "         DEPLOYMENT_MANAGER.PRODUCT_DETAILS pd"&_
131
   "          WHERE osc.os_id = os.os_id "&_
132
   "         AND os.node_id = bc.node_id"&_
133
   "         AND bc.bom_id =   "&   nBom_id &_
134
   "         AND pd.PROD_ID (+) = osc.PROD_ID"&_
135
   "         AND pv.pkg_id = pkg.pkg_id"&_
136
   "         AND osc.prod_id = pv.pv_id "&_
137
   "         AND (pd.is_rejected IS NULL or pd.IS_REJECTED != 'Y')  "&_
138
   "      UNION   "&_
139
   "      SELECT DISTINCT bec.prod_id,  pkg.pkg_name, pkg_version, 2   as   seq_num"&_
140
   "       FROM DEPLOYMENT_MANAGER.boms bm,"&_
141
   "            DEPLOYMENT_MANAGER.bom_contents bc,"&_
142
   "            DEPLOYMENT_MANAGER.network_nodes nn,"&_
143
   "            DEPLOYMENT_MANAGER.operating_systems os,"&_
144
   "            DEPLOYMENT_MANAGER.os_base_env obe,"&_
145
   "            DEPLOYMENT_MANAGER.base_env_contents bec,"&_
146
   "            PACKAGES pkg,"&_
147
   "            package_versions pv,"&_
148
   "            DEPLOYMENT_MANAGER.base_env be,"&_
149
   "            DEPLOYMENT_MANAGER.bos_types bt,"&_
150
   "            DEPLOYMENT_MANAGER.PRODUCT_DETAILS pd"&_
151
   "      WHERE bm.bom_id =   "&   nBom_id   &_
152
   "        AND bm.bom_id = bc.bom_id"&_
153
   "        AND nn.node_id = bc.node_id"&_
154
   "        AND os.node_id = nn.node_id"&_
155
   "        AND obe.os_id = os.os_id"&_
156
   "      AND pd.PROD_ID (+) = bec.PROD_ID"&_
157
   "      AND (pd.is_rejected IS NULL or pd.IS_REJECTED != 'Y')  "&_
158
   "        AND bec.base_env_id = obe.base_env_id"&_
159
   "        AND bec.prod_id = pv.pv_id"&_
160
   "        AND pkg.pkg_id = pv.pkg_id"&_
161
   "        AND be.base_env_id = obe.base_env_id"&_
162
   "       AND bt.bos_id = be.bos_id"&_
163
   "      ) qry  "&_
164
   " ORDER BY  qry.seq_num, UPPER(qry.pkg_name), UPPER(qry.pkg_version)"
165
 
166
   Set rsQry = OraDatabase.DbCreateDynaset( query, 0)
167
   While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
168
      oReleaseContent( CStr( rsQry("prod_id")) ) = ""
169
      rsQry.MoveNext()
170
   WEnd
171
 
172
   rsQry.Close()
173
   Set rsQry = Nothing
119 ghuddy 174
End Sub
175
'----------------------------------------------------------------------------------------------------------------------------------------
176
Function PatchIcon ( cIsPatch, cIsPatchObsolete )
129 ghuddy 177
   If IsNull(cIsPatch) Then
178
      PatchIcon = "<img src='images/rex_images/ext_blank.gif' width='16' height='16' border='0' align='absmiddle'>"
179
   Else
180
      If IsNull(cIsPatchObsolete) Then
181
         PatchIcon = "<img src='images/i_patch_small.gif' width='16' height='16' border='0' align='absmiddle' >"
182
      Else
183
         PatchIcon = "<img src='images/i_patch_small_obsolete.gif' width='16' height='16' border='0' align='absmiddle' title='Patch is obsolete'>"
184
      End If
185
   End If
119 ghuddy 186
End Function
187
%>
188
 
189
<%
190
Sub Reports_List ( SSgroup )
129 ghuddy 191
   Dim repNum
119 ghuddy 192
%>  <!-- REPORTS LIST -------------------------------------------------------->
129 ghuddy 193
   <%Select Case SSgroup%>
194
   <%Case "Advanced_Search"%>
159 ghuddy 195
      <%repNum = 1%>
196
      <strong>Find ClearQuest Bugs / Issues Location</strong><br>
197
      Use this advance search to locate bugs / issues imported to Release Manager from ClearQuest.<br>
198
      <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">
199
      <%repNum = 2%>
200
      <strong>Find Packages Using "Ignore Warnings" feature</strong><br>
201
      Lists packages which use "Ignore Warning" feature on their dependencies.<br>
202
      <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">
203
      <%repNum = 4%>
204
      <strong>Find A Package</strong><br>
205
      Use this advanced search to find a package in Release Manager<br>
206
      <a href="rep_find_package.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
207
      <%repNum = 5%>
208
      <strong>Find Package Version History</strong><br>
209
      Find all package versions and their current locations.<br>
210
      <a href="rep_package_version_history.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
129 ghuddy 211
   <%Case "Release_Status"%>
159 ghuddy 212
      <%repNum = 3%>
213
      <strong>Current Status of Release</strong><br>
214
      Shows all packages in a selected release with their current state, owner and last modifier.<br>
215
      <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">
216
      <%repNum = 8%>
217
      <strong>Deployable Software Modules</strong><br>
218
      This report shows new and current deployable software modules. Use this report to find which modules will be deployed to the customer.<br>
219
      Also, use this report to find if there are new modules flaged as 'deployable'.<br>
220
      <a href="rep_depoyable_software_modules.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
221
      <%repNum = 7%>
222
      <strong>Unit Tests per Package</strong><br>
223
      Use this report to check the unit tests performed on packages in a project.<br>
224
      <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">
225
      <%repNum = 12%>
226
      <strong>Release AutoBuildable Status</strong><br>
227
      Use this report to check the package versions that are autobuildable/not autobuildable in a given release.<br>
228
      <a href="rep_autobuildable_package.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
229
      <%repNum = 13%>
230
      <strong>Release DEVI Status</strong><br>
231
      Use this report to obtain a list of DEVIs for all packages in a given release.<br>
232
      <a href="rep_devi_status_for_release.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
129 ghuddy 233
 
234
<!--    <strong>All Packages With out-of-sync Dependencies</strong><br>
235
   List of all packages with dependencies out-of-sync with the release environment.<br>
236
   In escence, these are the packages which has versions in "latest" column of their dependencies.<br>
237
   Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
159 ghuddy 238
 -->
239
 
240
   <%Case "Release_History"%>
241
      <%repNum = 10%>
242
      <strong>Build History</strong><br>
243
      Use this report to find which packages have been officially released within specified date range.<br>
244
      <a href="rep_build_history.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
129 ghuddy 245
   <%Case "Admin_Reports"%>
159 ghuddy 246
      <strong>All Packages by Project by Version Tree by Release</strong><br>
247
      CSV output of all packages used in Release Manager per Project.<br>
248
      <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">
249
      <strong>All Runtime Dependencies by Project by Version Tree by Release</strong><br>
250
      CSV output of all runtime dependencies used in Release Manager per Project.<br>
251
      <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">
252
      <%repNum = 6%>
253
      <strong>Unused Packages</strong><br>
254
      All packages (Not Products) with no entries in "Used By" tab.<br>
255
      Use this report to help you clean up a release and remove all potentially unused packages.<br>
256
      <a href="rep_obsolete_packages.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
129 ghuddy 257
   <%Case "Escrow"%>
159 ghuddy 258
      <%repNum = 9%>
259
      <strong>Bill of Materials (BOM)</strong><br>
260
      List of all ERG Products per network node for a particular
261
      project. Use this report to integrate a particular project.<br>
262
      <a href="rep_bill_of_materials.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
263
      <%repNum = 11%>
264
      <strong>Escrow Report</strong><br>
265
      List of all Products/Patches for the BOM including modules. Use this report to provide a build roadmap.<br>
266
      <a href="escrow_report.asp?repnum=<%=repNum%>&group=<%=SSgroup%>" class="txt_linked">more...</a><br><br><hr size="1" noshade color="#DAD7C8">
267
      <strong>Build Dependencies per Package</strong><br>
268
      Use this report to build package from source code. The report
269
      include package repository location, label and build dependencies.<br>
270
      Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
271
      <strong>Build Order</strong><br>
272
      Use this reports to find the order in which packages should be built.<br>
273
      Not available yet.<br><br><hr size="1" noshade color="#DAD7C8">
129 ghuddy 274
   <%Case Else%>
159 ghuddy 275
      <b>&laquo; Select reporting category.</b>
129 ghuddy 276
   <%End Select%>
277
   <!-- REPORTS LIST END-------------------------------------------------------->
119 ghuddy 278
 
279
<%End Sub%>
280
 
281
<%
282
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
283
Sub Get_Projects ( NNproj_id, BBallow_all )
129 ghuddy 284
   Dim rsTemp, Query_String
285
 
286
   Query_String = _
287
   "SELECT * FROM projects ORDER BY proj_name ASC"
288
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
289
 
290
   Response.write "<select name='FRproj_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRvtree_id=&FRrtag_id=&group="& Request("group") &"&repnum="& Request("repnum") &"&FRproj_id=',this,0)"" class='form_item'>"
291
      If BBallow_all Then
292
         Response.write "<option value='-1'>ALL</option>"
293
      Else
294
         Response.write "<option></option>"
295
      End If
296
 
297
      While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
298
         If CDbl(NNproj_id) = CDbl(rsTemp.Fields("proj_id")) Then
299
              Response.write "<option value='"& rsTemp.Fields("proj_id") &"' selected>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
300
           Else
301
            Response.write "<option value='"& rsTemp.Fields("proj_id") &"'>"& UCase(rsTemp.Fields("proj_name")) &"</option>"
302
         End If
303
         rsTemp.MoveNext
304
      WEnd
305
   Response.write "</select>"
306
 
307
   rsTemp.Close
308
   Set rsTemp = nothing
119 ghuddy 309
End Sub
310
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
311
Sub Get_Version_Trees ( NNproj_id, NNvtree_id, BBallow_all )
129 ghuddy 312
   Dim rsTemp, Query_String
313
 
314
   Query_String = _
315
   "SELECT vtree_id, vtree_name FROM vtrees WHERE hide = 'N' AND proj_id = "& NNproj_id &" ORDER BY vtree_id ASC"
316
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
317
 
318
   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'>"
319
      If BBallow_all Then
320
         Response.write "<option value='-1'>ALL</option>"
321
      Else
322
         Response.write "<option></option>"
323
      End If
324
 
325
      If NNproj_id <> -1 Then
326
         While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
327
            If CDbl(NNvtree_id) = CDbl(rsTemp.Fields("vtree_id")) Then
328
                 Response.write "<option value='"& rsTemp.Fields("vtree_id") &"' selected>"& (rsTemp.Fields("vtree_name")) &"</option>"
329
              Else
330
               Response.write "<option value='"& rsTemp.Fields("vtree_id") &"'>"& (rsTemp.Fields("vtree_name")) &"</option>"
331
            End If
332
            rsTemp.MoveNext
333
         WEnd
334
      End If
335
   Response.write "</select>"
336
 
337
   rsTemp.Close
338
   Set rsTemp = nothing
119 ghuddy 339
End Sub
340
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
159 ghuddy 341
Sub Get_Open_Release_Labels ( NNproj_id, NNrtag_id, BBallow_all )
342
   Dim rsTemp, Query_String
343
 
344
   Query_String = _
345
   "SELECT rtag_id, rtag_name FROM release_tags WHERE proj_id = "& NNproj_id &"AND official in ('N','C','R')  ORDER BY rtag_name ASC"
346
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
347
 
348
   Response.write "<select name='FRrtag_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRproj_id="& NNproj_id &"&group="& Request("group") &"&repnum="& Request("repnum") &"&FRrtag_id=',this,0)"" class='form_item'>"
349
   If BBallow_all Then
350
      Response.write "<option value='-1'>ALL</option>"
351
   Else
352
      Response.write "<option></option>"
353
   End If
354
 
355
      If NNproj_id <> -1 Then
356
         While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
357
            If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("rtag_id")) Then
358
                 Response.write "<option value='"& rsTemp.Fields("rtag_id") &"' selected>"& (rsTemp.Fields("rtag_name")) &"</option>"
359
              Else
360
               Response.write "<option value='"& rsTemp.Fields("rtag_id") &"'>"& (rsTemp.Fields("rtag_name")) &"</option>"
361
            End If
362
            rsTemp.MoveNext
363
         WEnd
364
      End If
365
   Response.write "</select>"
366
 
367
   rsTemp.Close
368
   Set rsTemp = nothing
369
End Sub
370
 
119 ghuddy 371
Sub Get_Release_Labels ( NNproj_id, NNrtag_id, BBallow_all )
129 ghuddy 372
   Dim rsTemp, Query_String
373
 
374
   Query_String = _
375
   "SELECT rtag_id, rtag_name FROM release_tags WHERE proj_id = "& NNproj_id &" ORDER BY rtag_id ASC"
376
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
377
 
378
   Response.write "<select name='FRrtag_id' onChange=""Cascaded_Menu('parent','"& scriptName &"?FRproj_id="& NNproj_id &"&group="& Request("group") &"&repnum="& Request("repnum") &"&FRrtag_id=',this,0)"" class='form_item'>"
379
   If BBallow_all Then
380
      Response.write "<option value='-1'>ALL</option>"
381
   Else
382
      Response.write "<option></option>"
383
   End If
384
 
385
      If NNproj_id <> -1 Then
386
         While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
387
            If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("rtag_id")) Then
388
                 Response.write "<option value='"& rsTemp.Fields("rtag_id") &"' selected>"& (rsTemp.Fields("rtag_name")) &"</option>"
389
              Else
390
               Response.write "<option value='"& rsTemp.Fields("rtag_id") &"'>"& (rsTemp.Fields("rtag_name")) &"</option>"
391
            End If
392
            rsTemp.MoveNext
393
         WEnd
394
      End If
395
   Response.write "</select>"
396
 
397
   rsTemp.Close
398
   Set rsTemp = nothing
119 ghuddy 399
End Sub
400
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
401
Sub Get_SBOM_Version ( NNproj_id, NNrtag_id, BBallow_all, NNversion )
129 ghuddy 402
   Dim rsTemp, Query_String
119 ghuddy 403
 
129 ghuddy 404
   Query_String = _
405
   "SELECT BOM_ID, BRANCH_ID, BOM_VERSION ||'.'||BOM_LIFECYCLE AS VERSION FROM DEPLOYMENT_MANAGER.BOMS WHERE BRANCH_ID ="&NNrtag_id&" ORDER BY VERSION"
119 ghuddy 406
 
407
 
129 ghuddy 408
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
119 ghuddy 409
 
129 ghuddy 410
 
411
   Response.write "<select name='FRversion' class='form_item'>"
412
   If BBallow_all Then
413
      Response.write "<option value='-1'>ALL</option>"
414
   Else
415
      Response.write "<option></option>"
416
   End If
417
 
418
      If NNrtag_id <> -1 Then
419
         While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
420
            If CStr(NNversion) = CStr(rsTemp.Fields("version")) Then
421
                 Response.write "<option value='"& rsTemp.Fields("version") &"' selected>"& (rsTemp.Fields("version")) &"</option>"
422
              Else
423
               Response.write "<option value='"& rsTemp.Fields("version") &"'>"& (rsTemp.Fields("version")) &"</option>"
424
            End If
425
            rsTemp.MoveNext
426
         WEnd
427
      End If
428
   Response.write "</select>"
429
   rsTemp.Close
430
   Set rsTemp = nothing
431
 
119 ghuddy 432
End Sub
433
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
434
Sub Get_Branches ( NNproj_id, NNrtag_id, BBallow_all )
129 ghuddy 435
   Dim rsTemp, Query_String
119 ghuddy 436
 
129 ghuddy 437
   Query_String = _
438
   "SELECT * FROM deployment_manager.branches WHERE proj_id = "& NNproj_id &" ORDER BY branch_id ASC"
439
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
440
   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'>"
441
   If BBallow_all Then
442
      Response.write "<option value='-1'>ALL</option>"
443
   Else
444
      Response.write "<option></option>"
445
   End If
446
 
447
      If NNproj_id <> -1 Then
448
         While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
449
            If CDbl(NNrtag_id) = CDbl(rsTemp.Fields("branch_id")) Then
450
                 Response.write "<option value='"& rsTemp.Fields("branch_id") &"' selected>"& (rsTemp.Fields("branch_name")) &"</option>"
451
              Else
452
               Response.write "<option value='"& rsTemp.Fields("branch_id") &"'>"& (rsTemp.Fields("branch_name")) &"</option>"
453
            End If
454
            rsTemp.MoveNext
455
         WEnd
456
      End If
457
   Response.write "</select>"
458
 
459
   rsTemp.Close
460
   Set rsTemp = nothing
119 ghuddy 461
End Sub
462
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
463
 
464
Sub Get_Base_Views ( nRtag_id, nBase_view_id, BBallow_all )
129 ghuddy 465
   Dim rsTemp, Query_String
466
 
467
   Query_String = _
468
   "SELECT DISTINCT vi.view_id, vi.view_name"&_
469
   "  FROM VIEWS vi,"&_
470
   "         RELEASE_CONTENT rc"&_
471
   " WHERE rc.BASE_VIEW_ID = vi.VIEW_ID"&_
472
   "   AND rc.rtag_id = "& nRtag_id &_
473
   "ORDER BY UPPER( vi.view_name )"
474
 
475
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
476
 
477
   Response.write "<select name='FRbase_view_id' class='form_item'>"
478
   If BBallow_all Then
479
      Response.write "<option value='-1'>ALL</option>"
480
   Else
481
      Response.write "<option></option>"
482
   End If
483
 
484
      If nRtag_id <> -1 Then
485
         While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
486
            If CDbl(nBase_view_id) = CDbl(rsTemp.Fields("view_id")) Then
487
                 Response.write "<option value='"& rsTemp.Fields("view_id") &"' selected>"& (rsTemp.Fields("view_name")) &"</option>"
488
              Else
489
               Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& (rsTemp.Fields("view_name")) &"</option>"
490
            End If
491
            rsTemp.MoveNext
492
         WEnd
493
      End If
494
   Response.write "</select>"
495
 
496
   rsTemp.Close
497
   Set rsTemp = nothing
119 ghuddy 498
End Sub
499
%>
500
<%
501
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
502
'==================================================================================
129 ghuddy 503
' Report Name      :    Packages Using Ignore Feature
504
' Description      :   Lists packages which use "Ignore Warning"
505
'                  feature on their dependencies.
506
' INPUT            :   Project, Vesion Tree, Release Label
119 ghuddy 507
'==================================================================================
508
Sub Packages_Using_Ignore_Feature ( SSsection, NNproj_id, NNrtag_id )
129 ghuddy 509
   Dim Query_String, rsRep
510
   Const Allow_All = TRUE
511
 
512
   If NNproj_id = "" Then NNproj_id = -1
513
   If NNrtag_id = "" Then NNrtag_id = -1
514
 
515
   If SSsection = "TITLE" Then
516
      Response.write "Packages Using 'Ignore Warnings' Feature"
517
      Exit Sub
518
   End If
519
 
520
 
521
   If SSsection = "FORM" Then
522
      %>
523
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
524
         <form action="<%=scriptName%>" method="post" name="repform">
525
            <tr>
526
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
527
               <td width="1%" align="right" nowrap class="form_field">Project</td>
528
               <td width="100%"><%Call Get_Projects( NNproj_id, Allow_All )%></td>
529
            </tr>
530
            <tr>
531
               <td nowrap class="form_field">&nbsp;</td>
532
               <td align="right" nowrap class="form_field">Release</td>
533
               <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Allow_All )%></td>
534
            </tr>
535
            <tr>
536
               <td nowrap class="form_field">&nbsp;</td>
537
               <td align="right" nowrap class="form_field">&nbsp;</td>
538
               <td><br>
539
                  <input type="hidden" name="group" value="<%=parGroup%>">
540
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
541
                  <input type="hidden" name="action" value="true">
542
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
543
               </td>
544
            </tr>
545
         </form>
546
      </table>
547
      <%   Exit Sub
548
   End If
549
 
550
 
551
   If SSsection = "BODY" Then
552
      If NOT CBool(Request("action")) Then Exit Sub
553
 
554
      Query_String = ReadFile( rootPath & "queries\rep_packages_using_ignore_feature.sql" )
555
 
556
      OraDatabase.Parameters.Add "PROJ_ID", NNproj_id, ORAPARM_INPUT, ORATYPE_NUMBER
557
      OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
558
      %>
559
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
560
         <tr>
561
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
562
            <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
563
            <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
564
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
565
         </tr>
566
         <tr>
567
         <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
568
         </tr>
569
         <%
570
         Dim currRtag_id
571
         currRtag_id = -1
572
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
573
 
574
         If rsRep.RecordCount = 0 Then
575
            With Response
576
               .write "<tr>"
577
               .write "<td colspan='4' class='body_row'>Found 0 records</td>"
578
               .write "</tr>"
579
            End With
580
         End If
581
 
582
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
583
            ' -------- GROUP BY RTAG_ID -----------------
584
            If CDbl(currRtag_id) <> CDbl(rsRep("rtag_id")) Then
585
               %>
586
               <tr>
587
                  <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
588
               <td></td>
589
               </tr>
590
               <tr>
591
                  <td colspan="4" nowrap class="body_scol"><%=rsRep("proj_name")  &" &gt; "& rsRep("rtag_name")%></td>
592
               </tr>
593
               <%
594
               currRtag_id = CDbl(rsRep("rtag_id"))
595
            End If
596
            ' -------- END GROUP ------------------------
597
            %>
598
            <tr>
599
               <td class="body_row"></td>
600
               <td nowrap><a href="dependencies.asp?rtag_id=<%=rsRep("rtag_id")%>&pv_id=<%=rsRep("pv_id")%>" class="txt_linked"><%=rsRep("pkg_name")%></a></td>
601
               <td nowrap><a href="dependencies.asp?rtag_id=<%=rsRep("rtag_id")%>&pv_id=<%=rsRep("pv_id")%>" class="txt_linked"><%=rsRep("pkg_version")%></a></td>
602
               <td class="body_row"></td>
603
            </tr>
604
            <%  rsRep.MoveNext
605
         WEnd
606
         %>
607
         <tr>
608
            <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
609
            <td></td>
610
         </tr>
611
         <tr>
612
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
613
         </tr>
614
      </table>
615
      <!-- PRINT, SAVE, ETC. ------------>
616
      <%If parPrint = "" Then%>
617
         <br>
618
         <br>
619
         <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>
620
         <br>
621
      <%End If%>
622
      <!-- PRINT, SAVE, ETC. END -------->
623
      <%
624
      rsRep.Close
625
      Set rsRep = nothing
626
   End If
627
 
119 ghuddy 628
End Sub
629
%>
630
<%
631
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
632
'==================================================================================
129 ghuddy 633
' Report Name      :    Current State of Release
634
' Description      :   Show all packages in a release with their state, owner and modifier
635
' Form Input      :   Project, Vesion Tree, Release Label
636
' SQL INPUT         :   rtag_id
119 ghuddy 637
'==================================================================================
638
Sub Current_State_of_Release ( SSsection, NNproj_id, NNrtag_id, NNpkg_states )
129 ghuddy 639
   Dim Query_String, rsRep
640
   Const Disallow_All = FALSE
641
 
642
   If NNproj_id = "" Then NNproj_id = -1
643
   If NNrtag_id = "" Then NNrtag_id = -1
644
   If NNpkg_states = "" Then NNpkg_states = -1
645
 
646
   If SSsection = "TITLE" Then
647
      Response.write "Current State of Release"
648
      Exit Sub
649
   End If
650
 
651
 
652
   If SSsection = "FORM" Then
653
      %>
654
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
655
         <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">
656
            <tr>
657
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
658
               <td width="1%" align="right" nowrap class="form_field">Project</td>
659
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
660
            </tr>
661
            <tr>
662
               <td nowrap class="form_field">&nbsp;</td>
663
               <td align="right" nowrap class="form_field">Release</td>
664
               <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
665
            </tr>
666
            <tr>
667
               <td nowrap class="form_field">&nbsp;</td>
668
               <td align="right" nowrap class="form_field">Package States</td>
669
               <td class="form_field" nowrap>
670
                  <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;
671
                  <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;
672
                  <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;
673
                  <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;
674
                  <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;
675
               </td>
676
            </tr>
677
            <tr>
678
               <td nowrap class="form_field">&nbsp;</td>
679
               <td align="right" nowrap class="form_field">&nbsp;</td>
680
               <td><br>
681
                  <input type="hidden" name="group" value="<%=parGroup%>">
682
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
683
                  <input type="hidden" name="action" value="true">
684
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
685
               </td>
686
            </tr>
687
         </form>
688
      </table>
689
      <%   Exit Sub
690
   End If
691
 
692
 
693
   If SSsection = "BODY" Then
694
      If NOT CBool(Request("action")) Then Exit Sub
695
 
696
      Query_String = ReadFile( rootPath & "queries\rep_details_current_status_of_release.sql" )
697
      Query_String = Replace ( Query_String, "/*PKG_STATES*/", NNpkg_states )
698
 
699
      OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
700
      %>
701
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
702
         <tr>
703
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
704
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
705
            <td width="1%" nowrap class="body_colb">&nbsp;</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">Owner&nbsp;&nbsp;&nbsp;</td>
708
            <td width="1%" nowrap class="body_colb">Last Modifier&nbsp;&nbsp;&nbsp;</td>
709
            <td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
710
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
711
         </tr>
712
         <tr>
713
         <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
714
         </tr>
715
         <%
716
         Dim currView_id
717
         currView_id = -1
718
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
719
 
720
         If rsRep.RecordCount = 0 Then
721
            With Response
722
               .write "<tr>"
723
               .write "<td colspan='8' class='body_row'>Found 0 records</td>"
724
               .write "</tr>"
725
            End With
726
         End If
727
 
728
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
729
            ' -------- GROUP BY RTAG_ID -----------------
730
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
731
               %>
732
               <tr>
733
                  <td colspan="7" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
734
                  <td></td>
735
               </tr>
736
               <tr>
737
                  <td colspan="8" nowrap class="body_scol"><%=rsRep("view_name")%></td>
738
               </tr>
739
               <%
740
               currView_id = CDbl(rsRep("view_id"))
741
            End If
742
            ' -------- END GROUP ------------------------
743
            %>
744
            <tr>
745
               <td class="body_row"></td>
746
               <td><%=DefineStateIcon ( rsRep("pkg_state"), rsRep("dlocked"), NULL, NULL, NULL, NULL )%></td>
747
               <%If rsRep("dlocked") = "Y" Then%>
748
                  <td align="center" class="form_item"><img src='images/i_locked.gif' width='7' height='10' hspace='6'></td>
749
               <%Else%>
750
                  <td align="center" class="form_item"><img src='images/spacer.gif' width='7' height='10' hspace='6'></td>
751
               <%End If%>
752
               <td nowrap class="body_row"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
753
               <td nowrap><a href="mailto:<%=rsRep("owner_email")%>" class="txt_linked"><%=rsRep("owner")%></a>&nbsp;&nbsp;&nbsp;</td>
754
               <td nowrap><a href="mailto:<%=rsRep("modifier_email")%>" class="txt_linked"><%=rsRep("modifier")%></a>&nbsp;&nbsp;&nbsp;</td>
755
               <td class="body_row"><%=EuroDate( rsRep("insert_stamp") )%></td>
756
               <td class="body_row"></td>
757
            </tr>
758
            <%  rsRep.MoveNext
759
         WEnd
760
         %>
761
         <tr>
762
            <td colspan="8" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
763
         </tr>
764
      </table>
765
      <!-- PRINT, SAVE, ETC. ------------>
766
      <%If parPrint = "" Then%>
767
         <br>
768
         <br>
769
         <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>
770
         <br>
771
      <%End If%>
772
      <!-- PRINT, SAVE, ETC. END -------->
773
      <%
774
      rsRep.Close
775
      Set rsRep = nothing
776
   End If
777
 
119 ghuddy 778
End Sub
779
%>
780
<%
781
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
782
'==================================================================================
129 ghuddy 783
' Report Name      :    Find ClearQuest Bugs / Issues Location
784
' Description      :   Locates bugs / issues imported from ClearQuest
785
' Form Input      :   CQ issue Database, CQ issue number list space separated
119 ghuddy 786
'==================================================================================
787
Sub Where_Are_Bugs_Located ( SSsection, NNiss_db, SSiss_num_list )
129 ghuddy 788
   Dim Query_String, rsRep
119 ghuddy 789
 
129 ghuddy 790
   If SSsection = "TITLE" Then
791
      Response.write "Find ClearQuest Bugs / Issues Location"
792
      Exit Sub
793
   End If
794
 
795
 
796
   If SSsection = "FORM" Then
797
      %>
798
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
799
         <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRiss_num_list','Issue Number','R');return document.MM_returnValue">
800
            <tr>
801
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
802
               <td width="1%" align="right" nowrap class="form_field" valign="top">ClearQuest Database</td>
803
               <td width="100%">
804
                  <select name="FRiss_db" class="form_item">
805
                     <option value="<%=enumCLEARQUEST_DEVI_ID%>" <%If CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then%>selected<%End If%>>DEVI</option>
806
                  </select>
807
               </td>
808
            </tr>
809
            <tr>
810
               <td nowrap class="form_field">&nbsp;</td>
811
               <td align="right" nowrap class="form_field" valign="top">Issue Numbers</td>
812
               <td class="form_txt"><input type="text" name="FRiss_num_list" size="50" class="form_item" value="<%=SSiss_num_list%>"><br>
813
               HINTS:<br>
814
               - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br>
815
               - Use space separated issue numbers for multiple search.</td>
816
            </tr>
817
            <tr>
818
               <td nowrap class="form_field">&nbsp;</td>
819
               <td align="right" nowrap class="form_field">&nbsp;</td>
820
               <td><br>
821
                  <input type="hidden" name="group" value="<%=parGroup%>">
822
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
823
                  <input type="hidden" name="action" value="true">
824
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
825
               </td>
826
            </tr>
827
         </form>
828
      </table>
829
      <%   Exit Sub
830
   End If
831
 
832
 
833
   If SSsection = "BODY" Then
834
      If NOT CBool(Request("action")) Then Exit Sub
835
 
836
      Dim SSsql, issARR, num_item, iss_num_col, issNumDict, rsCQ, recCount, maxRecCount
837
      Set rsCQ = Server.CreateObject("ADODB.Recordset")
838
      Set issNumDict = CreateObject("Scripting.Dictionary")
839
 
840
 
841
      '---- Find Issue numbers in ClearQuest ----
3975 dpurdie 842
      If CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
129 ghuddy 843
         iss_num_col = "new_num"
844
         SSsql = _
845
         " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
159 ghuddy 846
         " FROM CQ_DEVI.admin.software_issue si"&_
129 ghuddy 847
         " WHERE "
848
      End If
849
 
850
 
851
      '---- Split multiple search ----
852
      SSiss_num_list = Trim(SSiss_num_list)
853
      If InStr( SSiss_num_list, " " ) > 0 Then
854
         ' space separator found
855
         issARR = Split ( SSiss_num_list, " ")
856
 
857
         For Each num_item In issARR
858
            If num_item <> "" Then
859
               SSsql = SSsql & " (si."& iss_num_col &" LIKE '%"& Replace( SQLstring(num_item), "*", "%" ) &"%') OR"
860
            End If
861
         Next
862
 
863
         SSsql = Left ( SSsql, Len(SSsql) - 2 )      ' Removes last OR
864
 
865
      Else
866
         SSsql = SSsql & " (si."& iss_num_col &" LIKE '%"& Replace( SQLstring(SSiss_num_list), "*", "%") &"%')"
867
 
868
      End If
869
 
870
      rsCQ.ActiveConnection = CQ_conn
871
      rsCQ.Source = SSsql
872
      rsCQ.CursorType = 0
873
      rsCQ.CursorLocation = 2
874
      rsCQ.LockType = 3
875
      rsCQ.Open()
876
 
877
      ' Get find results from CQ
878
      recCount = 1
879
      maxRecCount = 1000
880
      issNumDict.ADD "-1", "-1"      ' take care of no results
881
      While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF) AND (recCount < maxRecCount))
882
         issNumDict.ADD Cstr(rsCQ("iss_id")), Cstr(rsCQ("iss_num"))
883
         recCount = recCount + 1
884
         rsCQ.MoveNext
885
      WEnd
886
 
887
      rsCQ.Close
888
      Set rsCQ = nothing
889
 
890
      Query_String = ReadFile( rootPath & "queries\rep_where_are_bugs_located.sql" )
891
      Query_String = Replace ( Query_String, "/*ISS_DB*/", NNiss_db )
892
      Query_String = Replace ( Query_String, "/*ISS_ID_LIST*/", Join( issNumDict.Keys, ",") )
893
 
894
      %>
895
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
896
         <tr>
897
            <td width="1%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
898
            <td width="1%" nowrap class="body_colb">Fixed</td>
899
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
900
            <td width="1%" nowrap class="body_colb">Notes&nbsp;&nbsp;&nbsp;</td>
901
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
902
         </tr>
903
         <tr>
904
         <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
905
         </tr>
906
         <%
907
         Dim currIss_id
908
         currIss_id = -1
909
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
910
 
911
         If rsRep.RecordCount = 0 Then
912
            With Response
913
               .write "<tr>"
914
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
915
               .write "</tr>"
916
            End With
917
         End If
918
 
919
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
920
            ' -------- GROUP BY ISS_ID -----------------
921
            If Cstr(currIss_id) <> Cstr(rsRep("iss_id")) Then
922
               %>
923
               <tr>
924
                  <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
925
                  <td></td>
926
               </tr>
927
               <tr>
928
                  <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>
929
                  <td colspan='5' class="body_scol"></td>
930
               </tr>
931
               <%
932
               currIss_id = Cstr(rsRep("iss_id"))
933
            End If
934
            ' -------- END GROUP ------------------------
935
            %>
936
            <tr>
937
               <td nowrap class="body_row" valign="top"></td>
938
               <%If CDbl(rsRep("iss_state")) = enumISSUES_STATE_FIXED Then%>
939
                  <td align="left"><img src="images/i_tick.gif" width="7" height="7" hspace="6"></td>
940
               <%Else%>
941
                  <td align="left"><img src='images/spacer.gif' width='7' height='7' hspace='6'></td>
942
               <%End If%>
943
               <td nowrap align="left" class="body_row" valign="top"><%=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."></td>
944
               <%
945
               Set rsQry = OraDatabase.DbCreateDynaset( "select * from release_content rc, release_tags rt where rc.rtag_id = rt.rtag_id and "&_
946
                                          " pv_id ="&rsRep("pv_id"), 0 )
947
 
948
               While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
949
                  %>
950
                  <tr>
951
                     <td nowrap align="left" class="body_row" valign="top"></td>
952
                     <td nowrap align="left" class="body_row" valign="top"></td>
953
                     <td nowrap align="left" class="body_row" valign="top"><a href="fixed_issues.asp?rtag_id=<%=rsQry("rtag_id")%>&pv_id=<%=rsQry("pv_id")%>" class="txt_linked" target="_blank"><%=rsQry("rtag_name")%></a></td>
954
                  </tr>
955
                  <%
956
                  rsQry.MoveNext()
957
               WEnd
958
               rsQry.Close()
959
               Set rsQry = Nothing
960
               %>
961
               <td nowrap align="left" class="body_row" valign="top"><%=rsRep("notes")%></td>
962
               <td nowrap align="left" class="body_row" valign="top"></td>
963
            </tr>
964
            <%  rsRep.MoveNext
965
         WEnd
966
         %>
967
         <tr>
968
            <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
969
         </tr>
970
      </table>
971
      <!-- PRINT, SAVE, ETC. ------------>
972
      <%If parPrint = "" Then%>
973
         <br>
974
         <br>
975
         <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>
976
         <br>
977
      <%End If%>
978
      <!-- PRINT, SAVE, ETC. END -------->
979
      <%
980
      rsRep.Close
981
      Set rsRep = nothing
982
   End If
983
 
119 ghuddy 984
End Sub
985
%>
986
<%
987
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
988
'==================================================================================
129 ghuddy 989
' Report Name      :    Find a Package
990
' Description      :   Locate a package in Release Manager
991
' Form Input      :   Package Name, version extension
119 ghuddy 992
'==================================================================================
993
Sub Find_Package ( SSsection, SSpkg_name, SSv_ext )
129 ghuddy 994
   Dim Query_String, rsRep, oRegExp
995
 
996
 
997
   If SSsection = "TITLE" Then
998
      Response.write "Find a Package"
999
      Exit Sub
1000
   End If
1001
 
1002
 
1003
   If SSsection = "FORM" Then
1004
      %>
1005
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1006
         <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
1007
            <tr>
1008
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
1009
               <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
1010
               <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
1011
               HINTS:<br>
1012
               - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
1013
            </tr>
1014
            <tr>
1015
               <td nowrap class="form_field">&nbsp;</td>
1016
               <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
1017
               <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
1018
               e.g. .mas or .lvs or .oso or blank etc.</td>
1019
            </tr>
1020
            <tr>
1021
               <td nowrap class="form_field">&nbsp;</td>
1022
               <td align="right" nowrap class="form_field">&nbsp;</td>
1023
               <td><br>
1024
                  <input type="hidden" name="group" value="<%=parGroup%>">
1025
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1026
                  <input type="hidden" name="action" value="true">
1027
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1028
               </td>
1029
            </tr>
1030
         </form>
1031
      </table>
1032
      <%   Exit Sub
1033
   End If
1034
 
1035
 
1036
   If SSsection = "BODY" Then
1037
      If NOT CBool(Request("action")) Then Exit Sub
1038
 
1039
      If SSpkg_name = "" Then SSpkg_name = "%"
1040
      If SSv_ext = "" Then SSv_ext = "%"
1041
      If Request("withwcard") <> "" Then SSpkg_name = "%"& Replace( SQLstring(SSpkg_name), "*", "") &"%"      'Place wild card automatically
1042
 
1043
 
1044
 
1045
      ' -- Check if this is PV_ID
1046
      Set oRegExp = New RegExp
1047
 
1048
      oRegExp.Global = False   'Find only first match
1049
      oRegExp.Pattern = "\D" 'Match number only
1050
 
1051
 
1052
      If NOT oRegExp.Test(Request("FRpkg_name")) Then
1053
         Query_String = ReadFile( rootPath & "queries\rep_find_package_by_pv_id.sql" )
1054
         Query_String = Replace ( Query_String, "/*PV_ID*/", SQLstring(Request("FRpkg_name") )  )
1055
 
1056
      Else
1057
         Query_String = ReadFile( rootPath & "queries\rep_find_package.sql" )
1058
         Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
1059
         Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
1060
      End If
1061
      %>
1062
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1063
         <tr>
1064
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1065
            <td width="1%" nowrap class="body_colb">Location</td>
1066
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
1067
         </tr>
1068
         <tr>
1069
            <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1070
         </tr>
1071
         <%
1072
         Dim currPv_id
1073
         currPv_id = -1
1074
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1075
 
1076
         If rsRep.RecordCount = 0 Then
1077
            With Response
1078
               .write "<tr>"
1079
               .write "<td colspan='3' class='body_row'>Found 0 records</td>"
1080
               .write "</tr>"
1081
            End With
1082
         End If
1083
 
1084
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1085
            ' -------- GROUP BY Package Version -----------------
1086
            If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
1087
               %>
1088
               <tr>
1089
                  <td colspan="2" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1090
               <td></td>
1091
               </tr>
1092
               <tr>
1093
                  <%If Request("withwcard") <> "" Then%>
1094
                     <%' Highlight results for package search from index page%>
1095
                     <td nowrap class="body_scol"><%=Highlight_Substring ( rsRep("pkg_name"), Replace( SQLstring(SSpkg_name), "%", "") )  &" "& rsRep("pkg_version")%></td>
1096
                  <%Else%>
1097
                     <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
1098
                  <%End If%>
1099
                  <td colspan='2' class="body_scol"></td>
1100
               </tr>
1101
               <%
1102
               currPv_id = Cstr(rsRep("pv_id"))
1103
            End If
1104
            ' -------- END GROUP ------------------------
1105
            %>
1106
            <%If NOT IsNull(rsRep("proj_name")) Then%>
1107
               <tr>
1108
                  <td class="body_row"></td>
1109
                  <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>
1110
                  <td class="body_row"></td>
1111
               </tr>
1112
            <%Else%>
1113
               <tr>
1114
                  <td class="body_row"></td>
1115
                  <td class="body_row"></td>
1116
                  <td class="body_row"></td>
1117
               </tr>
1118
            <%End If%>
1119
            <%  rsRep.MoveNext
1120
         WEnd
1121
         %>
1122
         <tr>
1123
            <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1124
         </tr>
1125
      </table>
1126
      <!-- PRINT, SAVE, ETC. ------------>
1127
      <%If parPrint = "" Then%>
1128
         <br>
1129
         <br>
1130
         <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>
1131
         <br>
1132
      <%End If%>
1133
      <!-- PRINT, SAVE, ETC. END -------->
1134
      <%
1135
      rsRep.Close
1136
      Set rsRep = nothing
1137
   End If
1138
 
119 ghuddy 1139
End Sub
1140
%>
1141
<%
1142
'==================================================================================
129 ghuddy 1143
' Report Name      :    Find Package Version History
1144
' Description      :   Locate all package versions and their current location
1145
' Form Input      :   Package Name, version extension
119 ghuddy 1146
'==================================================================================
1147
Sub Find_Package_Version_History ( SSsection, SSpkg_name, SSv_ext )
129 ghuddy 1148
   Dim Query_String, rsRep
1149
 
1150
 
1151
   If SSsection = "TITLE" Then
1152
      Response.write "Find Package Version History"
1153
      Exit Sub
1154
   End If
1155
 
1156
 
1157
   If SSsection = "FORM" Then
1158
      %>
1159
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1160
         <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
1161
            <tr>
1162
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
1163
               <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
1164
               <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
1165
               HINTS:<br>
1166
               - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
1167
            </tr>
1168
            <tr>
1169
               <td nowrap class="form_field">&nbsp;</td>
1170
               <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
1171
               <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
1172
               e.g. .mas or .lvs or .oso or blank etc.</td>
1173
            </tr>
1174
            <tr>
1175
               <td nowrap class="form_field">&nbsp;</td>
1176
               <td align="right" nowrap class="form_field">&nbsp;</td>
1177
               <td><br>
1178
                  <input type="hidden" name="group" value="<%=parGroup%>">
1179
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1180
                  <input type="hidden" name="action" value="true">
1181
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1182
               </td>
1183
            </tr>
1184
         </form>
1185
      </table>
1186
      <%   Exit Sub
1187
   End If
1188
 
1189
 
1190
   If SSsection = "BODY" Then
1191
      Const img_Official = "<img src='images/i_locked.gif' width='7' height='10' hspace='3' align='absmiddle'>"
1192
      If NOT CBool(Request("action")) Then Exit Sub
1193
 
1194
      If SSpkg_name = "" Then SSpkg_name = "%"
1195
      If SSv_ext = "" Then SSv_ext = "%"
1196
 
1197
      Query_String = ReadFile( rootPath & "queries\rep_package_version_history.sql" )
1198
      Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
1199
      Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
1200
      %>
1201
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1202
         <tr>
1203
            <td width="1%" nowrap class="body_colb" align="right">Official<%=img_Official%></td>
1204
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1205
            <td width="1%" nowrap class="body_colb">Location</td>
1206
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
1207
         </tr>
1208
         <tr>
1209
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1210
         </tr>
1211
         <%
1212
         Dim currPv_id
1213
         currPv_id = -1
1214
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1215
 
1216
         If rsRep.RecordCount = 0 Then
1217
            With Response
1218
               .write "<tr>"
1219
               .write "<td colspan='4' class='body_row'>Found 0 records</td>"
1220
               .write "</tr>"
1221
            End With
1222
         End If
1223
 
1224
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1225
            ' -------- GROUP BY Package Version -----------------
1226
            If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
1227
            %>
1228
               <tr>
1229
               <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1230
               <td></td>
1231
               </tr>
1232
            <tr>
1233
               <td align="right"><%If rsRep("dlocked") = "Y" Then%><%=img_Official%><%End If%></td>
1234
               <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
1235
               <td colspan='2' class="body_scol"></td>
1236
               </tr>
1237
            <%
1238
               currPv_id = Cstr(rsRep("pv_id"))
1239
            End If
1240
            ' -------- END GROUP ------------------------
1241
            %>
1242
               <tr>
1243
               <td class="body_row"></td>
1244
               <td class="body_row"></td>
1245
               <%If IsNull(rsRep("rtag_id")) Then%>
1246
                  <td nowrap class="body_txt_gray" valign="top">Not Used!</td>
1247
               <%Else%>
1248
                  <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>
1249
               <%End If%>
1250
               <td class="body_row"></td>
1251
               </tr>
1252
         <%  rsRep.MoveNext
1253
         WEnd
1254
         %>
1255
         <tr>
1256
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1257
         </tr>
1258
      </table>
1259
      <!-- PRINT, SAVE, ETC. ------------>
1260
      <%If parPrint = "" Then%>
1261
         <br>
1262
         <br>
1263
         <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>
1264
         <br>
1265
      <%End If%>
1266
      <!-- PRINT, SAVE, ETC. END -------->
1267
      <%
1268
      rsRep.Close
1269
      Set rsRep = nothing
1270
   End If
1271
 
119 ghuddy 1272
End Sub
1273
%>
1274
<%
1275
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1276
'==================================================================================
129 ghuddy 1277
' Report Name      :    Obsolete Packages
1278
' Description      :   List packages that are not used (exclude products)
1279
' INPUT            :   Project, Vesion Tree, Release Label
119 ghuddy 1280
'==================================================================================
1281
Sub Obsolete_Packages ( SSsection, NNproj_id, NNrtag_id )
129 ghuddy 1282
   Dim Query_String, rsRep
1283
   Const Allow_All = TRUE
1284
   Const Disallow_All = FALSE
1285
 
1286
   If NNproj_id = "" Then NNproj_id = -1
1287
   If NNrtag_id = "" Then NNrtag_id = -1
1288
 
1289
   If SSsection = "TITLE" Then
1290
      Response.write "Unused Packages"
1291
      Exit Sub
1292
   End If
1293
 
1294
 
1295
   If SSsection = "FORM" Then
1296
      %>
1297
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1298
         <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">
1299
            <tr>
1300
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1301
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1302
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1303
            </tr>
1304
            <tr>
1305
               <td nowrap class="form_field">&nbsp;</td>
1306
               <td align="right" nowrap class="form_field">Release</td>
1307
               <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1308
            </tr>
1309
            <tr>
1310
               <td nowrap class="form_field">&nbsp;</td>
1311
               <td align="right" nowrap class="form_field">&nbsp;</td>
1312
               <td><br>
1313
                  <input type="hidden" name="group" value="<%=parGroup%>">
1314
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1315
                  <input type="hidden" name="action" value="true">
1316
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1317
               </td>
1318
            </tr>
1319
         </form>
1320
      </table>
1321
      <%   Exit Sub
1322
   End If
1323
 
1324
 
1325
   If SSsection = "BODY" Then
1326
      If NOT CBool(Request("action")) Then Exit Sub
1327
 
1328
      Query_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )
1329
 
1330
      OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1331
      %>
1332
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1333
         <tr>
1334
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
1335
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1336
            <td width="1%" nowrap class="body_colb">Released&nbsp;&nbsp;&nbsp;</td>
1337
            <td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
1338
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
1339
         </tr>
1340
         <tr>
1341
            <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1342
         </tr>
1343
         <%
1344
         Dim currView_id
1345
         currView_id = -1
1346
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1347
 
1348
         If rsRep.RecordCount = 0 Then
1349
            With Response
1350
               .write "<tr>"
1351
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
1352
               .write "</tr>"
1353
            End With
1354
         End If
1355
 
1356
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1357
            ' -------- GROUP BY BASE VIEW  -----------------
1358
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1359
               %>
1360
               <tr>
1361
                  <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1362
                  <td></td>
1363
               </tr>
1364
               <tr>
1365
                  <td nowrap class="body_scol"><%=rsRep("view_name")%></td>
1366
                  <td class="body_scol"></td>
1367
                  <td class="body_scol"></td>
1368
                  <td class="body_scol"></td>
1369
                  <td class="body_scol"></td>
1370
               </tr>
1371
               <%
1372
               currView_id = CDbl(rsRep("view_id"))
1373
            End If
1374
            ' -------- END GROUP ------------------------
1375
            %>
1376
            <tr>
1377
               <td class="body_row"></td>
1378
               <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>
1379
               <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>
1380
               <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>
1381
               <td class="body_row"></td>
1382
            </tr>
1383
            <%  rsRep.MoveNext
1384
         WEnd
1385
         %>
1386
         <tr>
1387
            <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1388
         </tr>
1389
      </table>
1390
      <!-- PRINT, SAVE, ETC. ------------>
1391
      <%If parPrint = "" Then%>
1392
         <br>
1393
         <br>
1394
         <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>
1395
         <br>
1396
      <%End If%>
1397
      <!-- PRINT, SAVE, ETC. END -------->
1398
      <%
1399
      rsRep.Close
1400
      Set rsRep = nothing
1401
   End If
1402
 
119 ghuddy 1403
End Sub
1404
%>
1405
<%
1406
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1407
'==================================================================================
129 ghuddy 1408
' Report Name      :    Deployable Software Modules
1409
' Description      :   Shows packages that are deployed to the customers and shows new packages marked as deployable.
1410
' INPUT            :   Project, Vesion Tree, Release Label, Base View (hard-coded to PRODUCTS)
119 ghuddy 1411
'==================================================================================
1412
Sub Deployable_Software_Modules ( sSection, nProj_id,  nRtag_id, nBase_view_id )
129 ghuddy 1413
   Dim Query_String, rsRep
1414
   Const Allow_All = TRUE
1415
   Const Disallow_All = FALSE
1416
 
1417
   If nProj_id = "" Then nProj_id = -1
1418
   If nRtag_id = "" Then nRtag_id = -1
1419
 
1420
   If sSection = "TITLE" Then
1421
      Response.write "Deployable Software Modules"
1422
      Exit Sub
1423
   End If
1424
 
1425
 
1426
   If sSection = "FORM" Then
1427
      %>
1428
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1429
         <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">
1430
            <tr>
1431
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1432
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1433
               <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
1434
            </tr>
1435
            <tr>
1436
               <td nowrap class="form_field">&nbsp;</td>
1437
               <td align="right" nowrap class="form_field">Release</td>
1438
               <td><%Call Get_Release_Labels ( nProj_id, nRtag_id, Disallow_All )%></td>
1439
            </tr>
1440
         <tr>
1441
            <td nowrap class="form_field">&nbsp;</td>
1442
            <td align="right" nowrap class="form_field">Base View</td>
1443
            <td><select name="noname" class='form_item' disabled>
1444
                  <option>PRODUCTS</option>
1445
               </select></td>
1446
            </tr>
1447
            <tr>
1448
               <td nowrap class="form_field">&nbsp;</td>
1449
               <td align="right" nowrap class="form_field">&nbsp;</td>
1450
               <td><br>
1451
                  <input type="hidden" name="group" value="<%=parGroup%>">
1452
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1453
                  <input type="hidden" name="FRbase_view_id" value="<%=enumBASE_VIEW_PRODUCTS%>">
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
      <%   Exit Sub
1461
   End If
1462
 
1463
 
1464
   If sSection = "BODY" Then
1465
      If NOT CBool(Request("action")) Then Exit Sub
1466
      '--- New Deployable Modules ---
1467
      Query_String = ReadFile( rootPath & "queries\rep_new_deployable_packages.sql" )
1468
 
1469
      OraDatabase.Parameters.Add "RTAG_ID",       nRtag_id,       ORAPARM_INPUT, ORATYPE_NUMBER
1470
      OraDatabase.Parameters.Add "BASE_VIEW_ID",    nBase_view_id,    ORAPARM_INPUT, ORATYPE_NUMBER
1471
      %>
1472
      <table width="100%"  border="0" cellspacing="0" cellpadding="2">
1473
         <tr>
1474
            <td nowrap class="body_colb" colspan="3" background="images/bg_bage.gif">&nbsp;New Deployable Package</td>
1475
         </tr>
1476
         <tr>
1477
            <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1478
         </tr>
1479
         <tr>
1480
            <td width="1%" class="body_txt">Package Name</td>
1481
            <td width="1%" class="body_txt">Version</td>
1482
            <td width="100%" class="body_txt">Last Modifier</td>
1483
         </tr>
1484
         <tr>
1485
            <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1486
         </tr>
1487
         <%
1488
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1489
         %>
1490
         <%If rsRep.RecordCount = 0 Then%>
1491
            <tr>
1492
               <td nowrap class="body_row" colspan="3">Found 0 records! </td>
1493
            </tr>
1494
         <%End If%>
1495
         <%While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))%>
1496
            <tr>
1497
               <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>
1498
               <td nowrap class="body_row"><%=rsRep("pkg_version")%></td>
1499
               <td nowrap class="body_row"><%=rsRep("full_name")%></td>
1500
            </tr>
1501
            <%rsRep.MoveNext
1502
         WEnd
1503
         rsRep.Close
1504
         Set rsRep = Nothing%>
1505
         <tr>
1506
            <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1507
         </tr>
1508
         <%
1509
         ' Go To Release link...
1510
         Query_String = _
1511
         " SELECT proj.PROJ_NAME, rt.RTAG_NAME"&_
1512
         "   FROM PROJECTS proj,"&_
1513
         "         RELEASE_TAGS rt"&_
1514
         "    WHERE rt.PROJ_ID = proj.proj_id"&_
1515
         "      AND rt.rtag_id = :RTAG_ID"
1516
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1517
         %>
1518
         <tr>
1519
            <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>
1520
         </tr>
1521
         <%
1522
         rsRep.Close
1523
         Set rsRep = Nothing%>
1524
      </table>
1525
      <br><br>
1526
      <%
1527
      '--- Current Deployable Modules ---
1528
      Query_String = ReadFile( rootPath & "queries\rep_current_deployable_packages.sql" )
1529
      %>
1530
      <table width="100%"  border="0" cellspacing="0" cellpadding="2">
1531
         <tr>
1532
            <td colspan="4" nowrap class="body_colb" background="images/bg_bage.gif">&nbsp;Current Deployable Packages </td>
1533
         </tr>
1534
         <tr>
1535
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1536
         </tr>
1537
         <%
1538
         Dim currPv_id
1539
         currPv_id = -1
1540
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1541
 
1542
         If rsRep.RecordCount = 0 Then
1543
            With Response
1544
               .write "<tr>"
1545
               .write "<td colspan='4' class='body_row'>Found 0 records</td>"
1546
               .write "</tr>"
1547
            End With
1548
         End If
1549
 
1550
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1551
            ' -------- GROUP BY PRODUCT NAME  -----------------
1552
            If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
1553
               %>
1554
               <tr>
1555
                  <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1556
                  <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1557
                  <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1558
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
1559
               </tr>
1560
               <tr>
1561
                  <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>
1562
                  <td>&nbsp;</td>
1563
                  <td>&nbsp;</td>
1564
                  <td>&nbsp;</td>
1565
               </tr>
1566
               <%
1567
               currPv_id = CDbl(rsRep("pv_id"))
1568
            End If
1569
            ' -------- END GROUP ------------------------
1570
            %>
1571
            <tr>
1572
               <td>&nbsp;</td>
1573
               <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("dpkg_name")%></a></td>
1574
               <td nowrap class="body_row"><%=rsRep("dpkg_version")%></td>
1575
               <td nowrap class="err_alert"><%=rsRep("is_dep_deployable")%></td>
1576
            </tr>
1577
            <%  rsRep.MoveNext
1578
         WEnd
1579
         %>
1580
         <tr>
1581
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1582
         </tr>
1583
      </table>
1584
      <!-- PRINT, SAVE, ETC. ------------>
1585
      <%If parPrint = "" Then%>
1586
         <br>
1587
         <br>
1588
         <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>
1589
         <br>
1590
      <%End If%>
1591
      <!-- PRINT, SAVE, ETC. END -------->
1592
      <%
1593
      rsRep.Close
1594
      Set rsRep = nothing
1595
   End If
1596
 
119 ghuddy 1597
End Sub
1598
%>
1599
 
1600
<%
1601
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1602
'==================================================================================
129 ghuddy 1603
' Report Name      :    Bill Of Materials
1604
' Description      :   List products for a BOM
1605
' INPUT            :
119 ghuddy 1606
'==================================================================================
1607
Sub Bill_of_Materials ( SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion )
129 ghuddy 1608
   Dim Query_String, rsRep, rsQry
1609
   Const Allow_All = TRUE
1610
   Const Disallow_All = FALSE
119 ghuddy 1611
 
129 ghuddy 1612
   If NNproj_id = "" Then NNproj_id = -1
1613
   If NNrtag_id = "" Then NNrtag_id = -1
1614
   If NNversion = "" Then NNversion = -1
1615
 
1616
   If SSsection = "TITLE" Then
1617
      Response.write "Software Bill Of Materials (SBOM) products"
1618
      Exit Sub
1619
   End If
1620
 
1621
 
1622
   If SSsection = "FORM" Then
1623
      %>
1624
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1625
         <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">
1626
            <tr>
1627
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1628
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1629
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1630
            </tr>
1631
            <tr>
1632
               <td nowrap class="form_field">&nbsp;</td>
1633
               <td align="right" nowrap class="form_field">Release</td>
1634
               <td><%Call Get_Branches ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1635
            </tr>
1636
            <tr>
1637
               <td nowrap class="form_field">&nbsp;</td>
1638
               <td align="right" nowrap class="form_field">SBOM Version</td>
1639
               <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
1640
            </tr>
1641
            <tr>
1642
               <td nowrap class="form_field">&nbsp;</td>
1643
               <td align="right" nowrap class="form_field">&nbsp;</td>
1644
               <td><br>
1645
                  <input type="hidden" name="group" value="<%=parGroup%>">
1646
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1647
                  <input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
1648
                  <input type="hidden" name="action" value="true">
1649
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1650
               </td>
1651
            </tr>
1652
         </form>
1653
      </table>
1654
      <p>
1655
      <%   Exit Sub
1656
   End If
1657
 
1658
 
1659
 
1660
   OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1661
   OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
1662
   Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
1663
   Dim bomId
1664
   bomId = rsQry("bom_id")
1665
   rsQry.close
1666
   Set rsQry = nothing
1667
 
1668
 
1669
   If SSsection = "BODY" Then
1670
      If NOT CBool(Request("action")) Then Exit Sub
1671
 
1672
      Query_String = ReadFile( rootPath & "queries\AllProducts.sql" )
1673
 
1674
      OraDatabase.Parameters.Add "BOM_ID", bomId, ORAPARM_INPUT, ORATYPE_NUMBER
1675
      %>
1676
      </p>
1677
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1678
         <tr>
1679
            <td nowrap class="body_colb">Node Name</td>
1680
            <td nowrap class="body_colb">Operating System</td>
1681
            <td nowrap class="body_colb">Product</td>
1682
            <td nowrap class="body_colb">Version</td>
1683
         </tr>
1684
         <tr>
1685
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1686
         </tr>
1687
         <%
1688
         Dim currNode_id, currOs_id
1689
         currNode_id = -1
1690
         currOs_id = -1
1691
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1692
 
1693
         If rsRep.RecordCount = 0 Then
1694
            With Response
1695
               .write "<tr>"
1696
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
1697
               .write "</tr>"
1698
            End With
1699
         End If
1700
 
1701
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1702
            ' -------- GROUP BY BASE VIEW  -----------------
1703
            If CDbl(currNode_id) <> CDbl(rsRep("node_id")) Then
1704
               %>
1705
               <tr>
1706
                  <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1707
               </tr>
1708
               <tr>
1709
                  <td nowrap class="body_scol"><%=rsRep("node_name")%></td>
1710
                  <td nowrap class="body_scol"></td>
1711
                  <td nowrap class="body_scol"></td>
1712
                  <td nowrap class="body_scol"></td>
1713
               </tr>
1714
               <%
1715
               currNode_id = CDbl(rsRep("node_id"))
1716
            End If
1717
            ' -------- END GROUP ------------------------
1718
            If CDbl(currOs_id) <> CDbl(rsRep("os_id")) Then
1719
               %>
1720
               <tr>
1721
                  <td nowrap class="body_row"></td>
1722
                  <td nowrap class="body_scol"><%=rsRep("os_name")%></td>
1723
                  <td nowrap class="body_scol"></td>
1724
                  <td nowrap class="body_scol"></td>
1725
               </tr>
1726
               <%
1727
               currOs_id = CDbl(rsRep("Os_id"))
1728
            End If
1729
            %>
1730
            <tr>
1731
               <td nowrap class="body_row"></td>
1732
               <td nowrap class="body_row"></td>
1733
               <td nowrap class="body_row"><%=PatchIcon ( rsRep("is_patch"), rsRep("is_obsolete") )%><%=rsRep("pkg_name")%></td>
1734
               <td nowrap class="body_row"><%=rsRep("pkg_version")%></td>
1735
            </tr>
1736
            <%  rsRep.MoveNext
1737
         WEnd
1738
         %>
1739
         <tr>
1740
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1741
         </tr>
1742
      </table>
1743
      <p>&nbsp;     </p>
1744
      <p>        <!-- PRINT, SAVE, ETC. ------------>
119 ghuddy 1745
      <%If parPrint = "" Then%>
129 ghuddy 1746
         <br>
1747
         <br>
1748
         <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>
1749
         <br>
119 ghuddy 1750
      <%End If%>
1751
      <!-- PRINT, SAVE, ETC. END -------->
1752
      <%
129 ghuddy 1753
      rsRep.Close
1754
      Set rsRep = nothing
1755
   End If
1756
 
119 ghuddy 1757
End Sub
1758
%>
1759
 
1760
<%
1761
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1762
'==================================================================================
129 ghuddy 1763
' Report Name      :    Build History
1764
' Description      :   List packages which were build between certain dates.
1765
' INPUT            :
119 ghuddy 1766
'==================================================================================
1767
Sub Build_History ( SSsection, NNproj_id, NNrtag_id)
129 ghuddy 1768
   Dim Query_String, rsRep, rsQry
1769
   Const Allow_All = TRUE
1770
   Const Disallow_All = FALSE
119 ghuddy 1771
 
129 ghuddy 1772
   If NNproj_id = "" Then NNproj_id = -1
1773
   If NNrtag_id = "" Then NNrtag_id = -1
119 ghuddy 1774
 
129 ghuddy 1775
   If SSsection = "TITLE" Then
1776
      Response.write "Build History"
1777
      Exit Sub
1778
   End If
119 ghuddy 1779
 
129 ghuddy 1780
 
1781
   If SSsection = "FORM" Then
1782
      %>
1783
      <script language="JavaScript" src="images/calendar.js"></script>
1784
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1785
         <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">
1786
            <tr>
1787
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1788
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1789
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1790
            </tr>
1791
            <tr>
1792
               <td nowrap class="form_field">&nbsp;</td>
1793
               <td align="right" nowrap class="form_field">Release</td>
1794
               <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
1795
            </tr>
1796
            <tr>
1797
               <td colspan="3" nowrap class="form_field">Between
1798
               <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>">
1799
               <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>
1800
               And
1801
               <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
1802
               <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>
1803
            </tr>
1804
            <tr>
1805
               <td nowrap class="form_field">&nbsp;</td>
1806
               <td align="right" nowrap class="form_field">&nbsp;</td>
1807
               <td><br>
1808
                  <input type="hidden" name="group" value="<%=parGroup%>">
1809
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1810
                  <input type="hidden" name="action" value="true">
1811
                  <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">
1812
               </td>
1813
            </tr>
1814
         </form>
1815
      </table>
1816
      <p>
1817
      <%   Exit Sub
1818
   End If
1819
 
1820
 
1821
   If SSsection = "BODY" Then
1822
      If NOT CBool(Request("action")) Then Exit Sub
1823
      %>
1824
      </p>
1825
      <table width="20%" border="0" cellspacing="0" cellpadding="2">
1826
         <tr>
1827
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
1828
            <td width="5%" nowrap class="body_colb">Package</td>
1829
            <td width="95%" nowrap class="body_colb">Version</td>
1830
         </tr>
1831
         <tr>
1832
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1833
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1834
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1835
         </tr>
1836
         <%
1837
         Dim currView_id
1838
         currView_id = -1
1839
 
1840
         OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1841
         OraDatabase.Parameters.Add "INITDATE", Request.Form("FRinitdate"), ORAPARM_INPUT, ORATYPE_STRING
1842
         OraDatabase.Parameters.Add "DUEDATE", Request.Form("FRduedate"), ORAPARM_INPUT, ORATYPE_STRING
1843
 
1844
         Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("rep_build_history.sql"), cint(0) )
1845
 
1846
         If rsRep.RecordCount = 0 Then
1847
            With Response
1848
               .write "<tr>"
1849
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
1850
               .write "</tr>"
1851
            End With
1852
         End If
1853
 
1854
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1855
            ' -------- GROUP BY BASE VIEW  -----------------
1856
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1857
               %>
1858
               <tr>
1859
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1860
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1861
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1862
               </tr>
1863
 
1864
               <tr>
1865
                  <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
1866
                  <td>&nbsp;</td>
1867
                  <td>&nbsp;</td>
1868
               </tr>
1869
 
1870
               <%
1871
               currView_id = CDbl(rsRep("view_id"))
1872
            End If
1873
            ' -------- END GROUP ------------------------
1874
            %>
1875
            <tr>
1876
               <td width="1%" nowrap class="body_colb">&nbsp;</td>
1877
               <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>
1878
               <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>
1879
            </tr>
1880
            <%  rsRep.MoveNext
1881
         WEnd
1882
         %>
1883
         <tr>
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
         </tr>
1888
      </table>
1889
      <p>&nbsp;     </p>
1890
      <p>        <!-- PRINT, SAVE, ETC. ------------>
119 ghuddy 1891
      <%If parPrint = "" Then%>
129 ghuddy 1892
         <br>
1893
         <br>
1894
         <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>
1895
         <br>
119 ghuddy 1896
      <%End If%>
1897
      <!-- PRINT, SAVE, ETC. END -------->
1898
      <%
129 ghuddy 1899
      rsRep.Close
1900
      Set rsRep = nothing
1901
   End If
1902
 
119 ghuddy 1903
End Sub
1904
%>
1905
<%
1906
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1907
'==================================================================================
129 ghuddy 1908
' Report Name      :    Escrow Report
1909
' Description      :   Report to extract Products/Patches for Building A RoadMap
1910
' INPUT            :
119 ghuddy 1911
'==================================================================================
1912
Sub Escrow_Report (SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion)
129 ghuddy 1913
   Dim Query_String, rsRep, rsQry
1914
   Const Allow_All = TRUE
1915
   Const Disallow_All = FALSE
119 ghuddy 1916
 
129 ghuddy 1917
   If NNproj_id = "" Then NNproj_id = -1
1918
   If NNrtag_id = "" Then NNrtag_id = -1
1919
   If NNversion = "" Then NNversion = -1
119 ghuddy 1920
 
129 ghuddy 1921
   If SSsection = "TITLE" Then
1922
      Response.write "Generation of ESCROW REPORT"
1923
      Exit Sub
1924
   End If
119 ghuddy 1925
 
1926
 
129 ghuddy 1927
   If SSsection = "FORM" Then
1928
      %>
1929
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1930
         <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">
1931
            <tr>
1932
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1933
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1934
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1935
            </tr>
1936
            <tr>
1937
               <td nowrap class="form_field">&nbsp;</td>
1938
               <td align="right" nowrap class="form_field">Release</td>
1939
               <td><%Call Get_Branches ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1940
            </tr>
1941
            <tr>
1942
               <td nowrap class="form_field">&nbsp;</td>
1943
               <td align="right" nowrap class="form_field">SBOM Version</td>
1944
               <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
1945
            </tr>
1946
            <tr>
1947
               <td nowrap class="form_field">&nbsp;</td>
1948
               <td align="right" nowrap class="form_field">&nbsp;</td>
1949
               <td><br>
1950
                  <input type="hidden" name="group" value="<%=parGroup%>">
1951
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1952
                  <input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
1953
                  <input type="hidden" name="action" value="true">
1954
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1955
               </td>
1956
            </tr>
1957
         </form>
1958
      </table>
1959
      <p>
1960
      <%   Exit Sub
1961
   End If
119 ghuddy 1962
 
129 ghuddy 1963
   OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1964
   OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
1965
   Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
1966
   Dim bomId, ext
1967
   bomId = rsQry("bom_id")
1968
   Set rsQry = OraDatabase.DbCreateDynaset( "select * from release_manager.project_extentions where proj_id="&NNproj_id, cint(0))
1969
   ext = rsQry("ext_name")
1970
   rsQry.close
1971
   Set rsQry = nothing
119 ghuddy 1972
 
129 ghuddy 1973
   If SSsection = "BODY" Then
1974
      If NOT CBool(Request("action")) Then Exit Sub
119 ghuddy 1975
 
129 ghuddy 1976
      '---------------------- Run Before Page ---------------------------
1977
      Call GetReleaseContent ( bomId, objReleaseContent )
119 ghuddy 1978
 
129 ghuddy 1979
      'Call   GetBomDetails   (bomId, outobjDetails)
1980
      'outobjDetails.Item("bom_full_version") = outobjDetails.Item("bom_name")&"   "&   outobjDetails.Item("bom_version") &"."& outobjDetails.Item("bom_lifecycle")
119 ghuddy 1981
 
129 ghuddy 1982
 
1983
      '------------------------------------------------------------------
1984
      %>
1985
      <html>
1986
      <head>
1987
      <title>Release Manager - Escrow Report</title>
1988
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
1989
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
1990
      </head>
1991
      <body>
1992
      <div align="center"><b><font col color="#FF0000" size="+3"><%=outobjDetails.Item("bom_full_version")%></font></b></div>
1993
      <div align="center"><b><font col color="#FF0000" size="+3">Products</font></b></div>
1994
      <%
1995
      Set outobjDetails = Nothing
1996
 
1997
      aReleaseContent = objReleaseContent.Keys
1998
      For Each parPv_id In aReleaseContent
1999
         pvIdList = pvIdList +   parPv_id   +   ","
2000
         Call GetPackageInformation ( parPv_id, objPackageDetails )
2001
         Response.Flush
2002
         %>
2003
         <a name="<%=objPackageDetails.Item("pkg_name")%>"></a>
2004
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2005
            <tr>
2006
               <td class="body_colb"><h3><%=objPackageDetails.Item("pkg_name")%></h3></td>
2007
            </tr>
2008
         </table>
2009
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2010
            <tr>
2011
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Version:</strong></td>
2012
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_version")%></td>
2013
            </tr>
2014
            <tr>
2015
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Path:</strong> </td>
2016
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("src_path")%></td>
2017
            </tr>
2018
            <tr>
2019
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Label:</strong></td>
2020
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_label")%></td>
2021
            </tr>
2022
            <tr>
2023
               <td width="1%" nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Short Description:</strong></td>
2024
               <td witdh="100%" bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_description") ) )%></td>
2025
            </tr>
2026
            <tr>
2027
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Package Overview:</strong> </td>
2028
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_overview") ) )%></td>
2029
            </tr>
2030
            <tr>
2031
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>General Sublicense Material:</strong> </td>
2032
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("v_ext") = ext Then%>Yes<%Else%>No<%End If%></td>
2033
            </tr>
2034
            <tr>
2035
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Environment:</strong> </td>
2036
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("is_build_env_required") = enumDB_NO Then%>Not Required.<%End If%>
2037
                  <%
2038
                  '--- Get Build Env Details
2039
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Std ( parPv_id ), cint(0))
2040
                  If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
2041
                     BldStd = rsQry("bs_name")
2042
                     rsQry.Close
2043
 
2044
                     Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Env ( parPv_id ), cint(0))
2045
                     %>
2046
                     <ul>
2047
                     <%
2048
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2049
                     %>
2050
                        <li><%=BldStd%>, <%=rsQry("bm_name")%></li>
2051
                        <%rsQry.MoveNext
2052
                     WEnd
2053
                     %>
2054
                     </ul>
2055
                  <%End If%>
2056
               </td>
2057
            </tr>
2058
            <tr>
2059
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Dependencies:</strong> </td>
2060
               <td bgcolor="#FFFFFF" class="sublbox_txt">
2061
                  <%
2062
                  '--- Get Build Dependencies Details
2063
 
2064
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Dependencies ( parPv_id ), cint(0))
2065
                  %>
2066
                  <table width="100%"  cellspacing="0" cellpadding="2" border="1">
2067
                     <tr>
2068
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="1%"><strong>Software Component</strong></td>
2069
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="100%"><strong>Version</strong></td>
2070
                     </tr>
2071
                     <%If rsQry.RecordCount < 1 Then%>
2072
                        <tr>
2073
                           <td nowrap class="sublbox_txt">No Dependencies</td>
2074
                           <td nowrap class="sublbox_txt"></td>
2075
                        </tr>
2076
                     <%End If%>
2077
                     <%
2078
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2079
                        %>
2080
                        <tr>
2081
                           <td nowrap class="sublbox_txt"><a href="#<%=rsQry("pkg_name")%>"><%=rsQry("pkg_name")%></a></td>
2082
                           <td nowrap class="sublbox_txt"><%=rsQry("pkg_version")%></td>
2083
                        </tr>
2084
                        <%rsQry.MoveNext
2085
                     WEnd
2086
                     %>
2087
                  </table>
2088
               </td>
2089
            </tr>
2090
         </table>
2091
         <br><br>
2092
         <%
2093
      'Exit For
2094
      Next
2095
 
2096
      pvIdList = Mid(pvIdList, 1, Len(pvIdList) - 1)
2097
      Set   rsTemp   =   OraDatabase.DbCreateDynaset( SQL_Modules ( pvIdList ), cint(0))
2098
 
2099
      %>
2100
      <div align="center"><b><font col color="#FF0000" size="+3">Modules</font></b></div>
2101
      <%
2102
      While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
2103
         Response.Flush
2104
 
2105
         dpv_id = rsTemp("dpv_id")
2106
         Call GetPackageInformation ( dpv_id, objPackageDetails )
2107
         %>
2108
         <a name="<%=objPackageDetails.Item("pkg_name")%>"></a>
2109
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2110
            <tr>
2111
               <td class="body_colb"><h3><%=objPackageDetails.Item("pkg_name")%></h3></td>
2112
            </tr>
2113
         </table>
2114
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2115
            <tr>
2116
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Version:</strong></td>
2117
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_version")%></td>
2118
            </tr>
2119
            <tr>
2120
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Path:</strong> </td>
2121
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("src_path")%></td>
2122
            </tr>
2123
            <tr>
2124
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Label:</strong></td>
2125
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_label")%></td>
2126
            </tr>
2127
            <tr>
2128
               <td width="1%" nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Short Description:</strong></td>
2129
               <td witdh="100%" bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_description") ) )%></td>
2130
            </tr>
2131
            <tr>
2132
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Package Overview:</strong> </td>
2133
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_overview") ) )%></td>
2134
            </tr>
2135
            <tr>
2136
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>General Sublicense Material:</strong> </td>
2137
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("v_ext") = parExt Then%>Yes<%Else%>No<%End If%></td>
2138
            </tr>
2139
            <tr>
2140
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Environment:</strong> </td>
2141
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("is_build_env_required") = enumDB_NO Then%>Not Required.<%End If%>
2142
                  <%
2143
                  '--- Get Build Env Details
2144
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Std ( dpv_id ), cint(0))
2145
                  If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
2146
                     BldStd = rsQry("bs_name")
2147
                     rsQry.Close
2148
 
2149
                     Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Env ( dpv_id ), cint(0))
2150
                     %>
2151
                     <ul>
2152
                        <%
2153
                        While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2154
                           %>
2155
                           <li><%=BldStd%>, <%=rsQry("bm_name")%></li>
2156
                           <%rsQry.MoveNext
2157
                        WEnd
2158
                        %>
2159
                     </ul>
2160
                  <%End If%>
2161
               </td>
2162
            </tr>
2163
            <tr>
2164
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Dependencies:</strong> </td>
2165
               <td bgcolor="#FFFFFF" class="sublbox_txt">
2166
                  <%
2167
                  '--- Get Build Dependencies Details
2168
 
2169
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Dependencies ( dpv_id ), cint(0))
2170
                  %>
2171
                  <table width="100%"  cellspacing="0" cellpadding="2" border="1">
2172
                     <tr>
2173
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="1%"><strong>Software Component</strong></td>
2174
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="100%"><strong>Version</strong></td>
2175
                     </tr>
2176
                     <%If rsQry.RecordCount < 1 Then%>
2177
                        <tr>
2178
                           <td nowrap class="sublbox_txt">No Dependencies</td>
2179
                           <td nowrap class="sublbox_txt"></td>
2180
                        </tr>
2181
                     <%End If%>
2182
                     <%
2183
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2184
                        %>
2185
                        <tr>
2186
                           <td nowrap class="sublbox_txt"><a href="#<%=rsQry("pkg_name")%>"><%=rsQry("pkg_name")%></a></td>
2187
                           <td nowrap class="sublbox_txt"><%=rsQry("pkg_version")%></td>
2188
                        </tr>
2189
                        <%rsQry.MoveNext
2190
                     WEnd
2191
                     %>
2192
                  </table>
2193
               </td>
2194
            </tr>
2195
         </table>
2196
         <br><br>
2197
 
2198
         <%
2199
         rsTemp.MoveNext
2200
      WEnd
2201
 
2202
      rsTemp.Close()
2203
      Set rsTemp = Nothing
2204
   End If
119 ghuddy 2205
End Sub
2206
%>
2207
 
2208
<%
2209
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2210
'==================================================================================
129 ghuddy 2211
' Report Name      :    AutoBuildable_Report
2212
' Description      :   List packages which were build between certain dates.
2213
' INPUT            :
119 ghuddy 2214
'==================================================================================
2215
Sub AutoBuildable_Report ( SSsection, NNproj_id, NNrtag_id)
129 ghuddy 2216
   Dim Query_String, rsRep, rsQry
2217
   Const Allow_All = TRUE
2218
   Const Disallow_All = FALSE
119 ghuddy 2219
 
129 ghuddy 2220
   If NNproj_id = "" Then NNproj_id = -1
2221
   If NNrtag_id = "" Then NNrtag_id = -1
119 ghuddy 2222
 
129 ghuddy 2223
   If SSsection = "TITLE" Then
2224
      Response.write "Release AutoBuildable Status"
2225
      Exit Sub
2226
   End If
119 ghuddy 2227
 
2228
 
129 ghuddy 2229
   If SSsection = "FORM" Then
2230
      %>
2231
      <script language="JavaScript" src="images/calendar.js"></script>
2232
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
2233
         <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">
2234
            <tr>
2235
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
2236
               <td width="1%" align="right" nowrap class="form_field">Project</td>
2237
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
2238
            </tr>
2239
            <tr>
2240
               <td nowrap class="form_field">&nbsp;</td>
2241
               <td align="right" nowrap class="form_field">Release</td>
2242
               <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
2243
            </tr>
2244
            <tr>
2245
               <td nowrap class="form_field">&nbsp;</td>
2246
               <td align="right" nowrap class="form_field">&nbsp;</td>
2247
               <td><br>
2248
                  <input type="hidden" name="group" value="<%=parGroup%>">
2249
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
2250
                  <input type="hidden" name="action" value="true">
2251
                  <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">
2252
               </td>
2253
            </tr>
2254
      </table>
2255
      <p>
2256
      <%   Exit Sub
2257
   End If
119 ghuddy 2258
 
2259
 
129 ghuddy 2260
   If SSsection = "BODY" Then
2261
      If NOT CBool(Request("action")) Then Exit Sub
2262
      If Request("btn") = "Assign" Then
2263
         OraDatabase.Parameters.Add "RTAG_ID",       NNrtag_id,   ORAPARM_INPUT, ORATYPE_NUMBER
2264
         OraDatabase.Parameters.Add "PV_ID_LIST",   Request("prod_id_list"),   ORAPARM_INPUT, ORATYPE_VARCHAR2
119 ghuddy 2265
 
129 ghuddy 2266
         objEH.TryORA ( OraSession )
2267
         On Error Resume Next
2268
 
2269
         OraDatabase.ExecuteSQL _
2270
         "BEGIN  SET_TO_AUTOBUILDABLE( :RTAG_ID, :PV_ID_LIST );  END;"
2271
 
2272
         objEH.CatchORA ( OraSession )
2273
 
2274
         OraDatabase.Parameters.Remove "PV_ID_LIST"
2275
         OraDatabase.Parameters.Remove "RTAG_ID"
2276
 
2277
      End   If
2278
      %>
2279
      </p>
2280
      <table width="20%" border="0" cellspacing="0" cellpadding="2">
2281
         <tr>
2282
            <td width="1%" nowrap class="body_colb">Base View</td>
2283
            <td width="5%" nowrap class="body_colb">Package</td>
2284
            <td width="95%" nowrap class="body_colb">Version</td>
2285
            <td width="95%" nowrap class="body_colb">Autobuildable</td>
2286
         </tr>
2287
         <tr>
2288
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2289
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2290
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2291
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2292
         </tr>
2293
         <%
2294
         Dim currView_id
2295
         currView_id = -1
2296
 
2297
         OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
2298
 
2299
         Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM RELEASE_CONTENT rc, VIEWS vw, PACKAGES pkg, PACKAGE_VERSIONS pv "&_
2300
            " WHERE pv.pv_id = rc.pv_id and rc.base_view_id   "&_
2301
            " = vw.view_id and pkg.pkg_id = pv.pkg_id and rc.RTAG_ID ="&NNrtag_id&"   order by vw.view_name, pkg.pkg_name", cint(0) )
2302
         If rsRep.RecordCount = 0 Then
2303
            With Response
2304
               .write "<tr>"
2305
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
2306
               .write "</tr>"
2307
            End With
2308
         End If
2309
 
2310
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
2311
            ' -------- GROUP BY BASE VIEW  -----------------
2312
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
2313
               %>
2314
               <tr>
2315
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2316
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2317
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2318
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2319
               </tr>
2320
 
2321
               <tr>
2322
                  <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
2323
                  <td>&nbsp;</td>
2324
                  <td>&nbsp;</td>
2325
               </tr>
2326
 
2327
               <%
2328
               currView_id = CDbl(rsRep("view_id"))
2329
            End If
2330
            ' -------- END GROUP ------------------------
2331
            %>
2332
            <%If rsRep("is_autobuildable") = "Y" Then%>
2333
               <tr>
2334
                  <td width="1%" nowrap class="body_colb">&nbsp;</td>
2335
                  <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>
2336
                  <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>
2337
                  <%If objAccessControl.IsVisible( "SetToReproducible" ) Then%>
2338
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>" checked></td>
2339
                  <%Else%>
2340
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>" checked disabled></td>
2341
                  <%End If%>
2342
               </tr>
2343
            <%Else%>
2344
               <tr>
2345
                  <td width="1%" nowrap class="body_colb">&nbsp;</td>
2346
                  <td nowrap class="body_row"><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNRtag_id%>" class="body_txtr"><strong><%=rsRep("pkg_name")%></strong></a></td>
2347
                  <td nowrap class="body_row"><a href="fixed_issues.asp?pv_id=<%=rsRep("pv_id")%>&rtag_id=<%=NNRtag_id%>" class="body_txtr"><strong><%=rsRep("pkg_version")%></strong></a></td>
2348
                  <%If objAccessControl.IsVisible( "SetToReproducible" ) Then%>
2349
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>"></td>
2350
                  <%Else%>
2351
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>" disabled></td>
2352
                  <%End If%>
2353
               </tr>
2354
            <%End If%>
2355
 
2356
 
2357
            <%  rsRep.MoveNext
2358
         WEnd
2359
         %>
2360
 
2361
         <tr>
2362
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2363
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2364
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2365
            <%If objAccessControl.IsVisible( "SetToReproducible" ) Then%>
2366
               <td><input name="btn" type="submit" class="form_btn" value="Assign" onClick="clickedButton=true;MM_validateForm('FRduedate','Due Date','R','FRmsg','Message details','R');return document.MM_returnValue"></td>
2367
            <%End If%>
2368
         </tr>
2369
      </table>
2370
      </form>
2371
      <p>&nbsp;     </p>
2372
      <p>        <!-- PRINT, SAVE, ETC. ------------>
119 ghuddy 2373
      <%If parPrint = "" Then%>
129 ghuddy 2374
         <br>
2375
         <br>
2376
         <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>
2377
         <br>
2378
 
119 ghuddy 2379
      <%End If%>
2380
      <!-- PRINT, SAVE, ETC. END -------->
2381
      <%
129 ghuddy 2382
      OraDatabase.Parameters.Remove "RTAG_ID"
2383
      rsRep.Close()
2384
      Set rsRep = nothing
2385
   End If
2386
 
119 ghuddy 2387
End Sub
129 ghuddy 2388
%>
119 ghuddy 2389
 
2390
<%
2391
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2392
'==================================================================================
129 ghuddy 2393
' Report Name      :    Unit Tests per Package
2394
' Description      :   List unit tests per package showing the unit test completeness
2395
' INPUT            :   Project, Vesion Tree, Release Label, Base View, Level of Completeness, Show/Hide Dependencies, PV_ID
119 ghuddy 2396
'==================================================================================
2397
Sub Unit_Tests_Per_Package ( sSection, nProj_id,  nRtag_id, nBase_view_id, nLevel_of_complete, nShow_dependencies, nPv_id )
129 ghuddy 2398
   Dim Query_String, rsRep
2399
   Const Allow_All = TRUE
2400
   Const Disallow_All = FALSE
119 ghuddy 2401
 
129 ghuddy 2402
   If nProj_id = "" Then nProj_id = -1
2403
   If nRtag_id = "" Then nRtag_id = -1
2404
   If nShow_dependencies = "" Then nShow_dependencies = 0
2405
   If nPv_id = "" Then nPv_id = -1
119 ghuddy 2406
 
129 ghuddy 2407
   If sSection = "TITLE" Then
2408
      Response.write "Unit Tests per Package"
2409
      Exit Sub
2410
   End If
2411
 
2412
 
2413
   If sSection = "FORM" Then
2414
      %>
2415
 
2416
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
2417
         <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">
2418
            <tr>
2419
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
2420
               <td width="1%" align="right" nowrap class="form_field">Project</td>
2421
               <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
2422
            </tr>
2423
            <tr>
2424
               <td nowrap class="form_field">&nbsp;</td>
2425
               <td align="right" nowrap class="form_field">Release</td>
2426
               <td><%Call Get_Release_Labels ( nProj_id,  nRtag_id, Disallow_All )%></td>
2427
            </tr>
2428
            <tr>
2429
               <td nowrap class="form_field">&nbsp;</td>
2430
               <td align="right" nowrap class="form_field">Base View</td>
2431
               <td><%Call Get_Base_Views ( nRtag_id, nBase_view_id, Allow_All )%></td>
2432
            </tr>
2433
            <tr>
2434
               <td nowrap class="form_field">&nbsp;</td>
2435
               <td align="right" nowrap class="form_field">Show Dependencie's Unit Tests</td>
2436
               <td><input type="checkbox" name="FRshow_deps" value="1" <%If nShow_dependencies <> 0 Then%>checked<%End If%>></td>
2437
            </tr>
2438
            <tr>
2439
               <td nowrap class="form_field">&nbsp;</td>
2440
               <td align="right" nowrap class="form_field">&nbsp;</td>
2441
               <td><br>
2442
                  <input type="hidden" name="group" value="<%=parGroup%>">
2443
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
2444
                  <input type="hidden" name="FRtest_complete" value="0">
2445
                  <input type="hidden" name="action" value="true">
2446
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
2447
               </td>
2448
            </tr>
2449
         </form>
2450
      </table>
2451
      <%   Exit Sub
2452
   End If
2453
 
2454
 
2455
   If sSection = "BODY" Then
2456
      If NOT CBool(Request("action")) Then Exit Sub
2457
 
2458
      Query_String = ReadFile( rootPath & "queries\rep_unit_tests_per_package.sql" )
2459
 
2460
      OraDatabase.Parameters.Add "RTAG_ID",       nRtag_id,       ORAPARM_INPUT, ORATYPE_NUMBER
2461
      OraDatabase.Parameters.Add "BASE_VIEW",    nBase_view_id,    ORAPARM_INPUT, ORATYPE_NUMBER
2462
      OraDatabase.Parameters.Add "COMPLETENESS",    nLevel_of_complete, ORAPARM_INPUT, ORATYPE_NUMBER
2463
      OraDatabase.Parameters.Add "SHOW_DEPS",    nShow_dependencies, ORAPARM_INPUT, ORATYPE_NUMBER
2464
      OraDatabase.Parameters.Add "PV_ID",       nPv_id,       ORAPARM_INPUT, ORATYPE_NUMBER
2465
      %>
2466
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
2467
         <tr>
2468
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
2469
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
2470
            <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
2471
            <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
2472
            <td width="1%" nowrap class="body_colb">Test Name&nbsp;&nbsp;&nbsp;</td>
2473
            <td width="100%" nowrap class="body_colb">Test Summary&nbsp; </td>
2474
            <td width="1%" nowrap class="body_colb"></td>
2475
            <td width="1%" nowrap class="body_colb">Stamp</td>
2476
            <td width="1%" nowrap class="body_colb">Test Completed &nbsp;&nbsp;&nbsp;</td>
2477
         </tr>
2478
         <tr>
2479
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2480
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2481
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2482
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2483
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2484
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2485
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2486
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2487
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2488
         </tr>
2489
         <%
2490
         Dim currBase_view_id, currPv_id, currDpv_id, showTests
2491
         currBase_view_id = -1
2492
         currPv_id = -1
2493
         currDpv_id = -1
2494
 
2495
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
2496
 
2497
         If rsRep.RecordCount = 0 Then
2498
            With Response
2499
               .write "<tr>"
2500
               .write "<td colspan='9' class='body_row'>Found 0 records</td>"
2501
               .write "</tr>"
2502
            End With
2503
         End If
2504
 
2505
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
2506
            If nShow_dependencies <> 0 Then
2507
               ' show dependency is ON
2508
               If rsRep("dpkg_name") = "------" Then
2509
                  showTests = FALSE
2510
               Else
2511
                  showTests = TRUE
2512
               End If
2513
            Else
2514
               showTests = TRUE
2515
            End If
2516
 
2517
            ' -------- GROUP BY BASE VIEW  -----------------
2518
            If CDbl(currBase_view_id) <> CDbl(rsRep("base_view_id")) Then
2519
               %>
2520
               <tr>
2521
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2522
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2523
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2524
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2525
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2526
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2527
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2528
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2529
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2530
               </tr>
2531
               <tr>
2532
                  <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
2533
                  <td>&nbsp;</td>
2534
                  <td>&nbsp;</td>
2535
                  <td>&nbsp;</td>
2536
                  <td>&nbsp;</td>
2537
                  <td>&nbsp;</td>
2538
                  <td>&nbsp;</td>
2539
                  <td>&nbsp;</td>
2540
                  <td>&nbsp;</td>
2541
               </tr>
2542
               <%
2543
               currBase_view_id = CDbl(rsRep("base_view_id"))
2544
            End If
2545
            ' -------- END GROUP BASE VIEW ------------------------
2546
            %>
2547
            <%
2548
            ' -------- GROUP BY PACKAGE  -----------------
2549
            If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
2550
               %>
2551
               <tr>
2552
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2553
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2554
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2555
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2556
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2557
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2558
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2559
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2560
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2561
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2562
               </tr>
2563
               <tr>
2564
                  <td>&nbsp;</td>
2565
                  <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>
2566
                  <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>
2567
                  <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>
2568
                  <td>&nbsp;</td>
2569
                  <td>&nbsp;</td>
2570
                  <td>&nbsp;</td>
2571
                  <td>&nbsp;</td>
2572
                  <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>
2573
               </tr>
2574
               <%
2575
               currPv_id = CDbl(rsRep("pv_id"))
2576
            End If
2577
            ' -------- END GROUP PACKAGE ------------------------
2578
            %>
2579
            <%
2580
            ' -------- GROUP BY DEPENDENCY  -----------------
2581
            If Not IsNull(rsRep("dpv_id")) Then
2582
               If CDbl(currDpv_id) <> CDbl(rsRep("dpv_id")) Then
2583
                  %>
2584
                  <tr>
2585
                     <td>&nbsp;</td>
2586
                     <td>&nbsp;</td>
2587
                     <td>&nbsp;</td>
2588
                     <td>&nbsp;</td>
2589
                     <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>
2590
                     <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>
2591
                     <td>&nbsp;</td>
2592
                     <td>&nbsp;</td>
2593
                     <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>
2594
                  </tr>
2595
                  <%
2596
                  currDpv_id = CDbl(rsRep("dpv_id"))
2597
               End If
2598
            End If
2599
            ' -------- END GROUP DEPENDENCY ------------------------
2600
            %>
2601
            <%If Not IsNull( rsRep("completed_by") ) AND showTests Then%>
2602
               <tr>
2603
                  <td>&nbsp;</td>
2604
                  <td>&nbsp;</td>
2605
                  <td>&nbsp;</td>
2606
                  <td>&nbsp;</td>
2607
                  <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>
2608
                  <td bgcolor="#F5F5F5" valign="top" class="body_row"><%=NewLine_To_BR ( To_HTML ( rsRep("test_summary") ) )%></td>
2609
                  <td bgcolor="#F5F5F5" align="center" valign="top">   </td>
2610
                  <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>
2611
                  <td>&nbsp;</td>
2612
               </tr>
2613
               <tr>
2614
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2615
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2616
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2617
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2618
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2619
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2620
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2621
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2622
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2623
               </tr>
2624
            <%End If%>
2625
            <%  rsRep.MoveNext
2626
         WEnd
2627
         %>
2628
         <tr>
2629
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2630
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2631
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2632
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2633
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2634
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2635
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2636
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2637
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2638
         </tr>
2639
      </table>
2640
 
2641
      <!-- PRINT, SAVE, ETC. ------------>
2642
      <%If parPrint = "" Then%>
2643
         <br>
2644
         <br>
2645
         <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>
2646
         <br>
2647
      <%End If%>
2648
      <!-- PRINT, SAVE, ETC. END -------->
2649
      <%
2650
      rsRep.Close
2651
      Set rsRep = nothing
2652
   End If
2653
 
119 ghuddy 2654
End Sub
129 ghuddy 2655
%>
159 ghuddy 2656
 
2657
 
2658
<%
2659
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2660
Function  Get_CQ_Issues ( SSsql, OOrsCQ )
2661
   If OOrsCQ.State = 1 Then
2662
      OOrsCQ.Close()
2663
   End If
2664
 
2665
   On Error Resume Next
2666
   OOrsCQ.ActiveConnection = CQ_conn
2667
   OOrsCQ.Source = SSsql
2668
   OOrsCQ.CursorType = 0
2669
   OOrsCQ.CursorLocation = 2
2670
   OOrsCQ.LockType = 3
2671
   OOrsCQ.Open()
2672
 
2673
   Get_CQ_Issues = Err.Number
2674
 
2675
End Function
2676
'----------------------------------------------------------------------------------------------------------------------------------------
2677
Function GetRMIssueState (NNpv_id, NNissId)
2678
   Dim rsTemp, Query_String
2679
   Dim s
2680
   Query_String = _
2681
   " SELECT (CASE WHEN iss_state = 0 THEN ' (O)' ELSE ' (F)' END) AS issState "&_
2682
   "   FROM cq_issues cq "&_
2683
   "  WHERE cq.pv_id = "& NNpv_id &_
2684
   "    AND cq.iss_id = "& NNissId
2685
 
2686
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
2687
 
2688
   s = ""
2689
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
2690
      s = (rsTemp.Fields("issState"))
2691
   End If
2692
 
2693
   rsTemp.Close
2694
   Set rsTemp = nothing
2695
 
2696
   GetRMIssueState = s
2697
End Function
2698
'----------------------------------------------------------------------------------------------------------------------------------------
2699
' Function returns the number of imported clearquest issues
2700
' and builds a string suitable for querying the clearquest issues database
2701
Function Get_Package_Issues ( NNpv_id, SSsql, DDfixedIss, DDnotesIssDict, nIssState )
3975 dpurdie 2702
   Dim rsTemp, sqlstr, DEVIiss, retVal
159 ghuddy 2703
 
2704
   sqlstr = "SELECT iss_db, iss_id, iss_state, notes FROM CQ_ISSUES WHERE pv_id="& NNpv_id &"  AND iss_state IN (" & nIssState & ")"
2705
 
2706
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
2707
   retVal = rsTemp.RecordCount
2708
 
2709
   DEVIiss  = "-1"
2710
 
2711
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
2712
      If CInt(rsTemp("iss_db")) = CInt(enumCLEARQUEST_DEVI_ID) Then
2713
         DEVIiss = DEVIiss &","& rsTemp("iss_id")
2714
      End If
2715
 
2716
      rsTemp.MoveNext
2717
   WEnd
2718
 
2719
   ' Construct SQL statement for CQ database
2720
   SSsql = ReadFile( rootPath & "queries\cq_issues_rep1.sql" )
2721
   SSsql = Replace( SSsql, "/*enumCLEARQUEST_DEVI_ID*/", enumCLEARQUEST_DEVI_ID)
2722
   SSsql = Replace( SSsql, "/*DEVIiss*/", DEVIiss)
2723
 
2724
   rsTemp.Close()
2725
   Set rsTemp = nothing
2726
 
2727
   Get_Package_Issues = retVal
2728
 
2729
End Function
2730
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2731
Sub sdAdd( dict, key, value )
2732
   if IsNull(value) Then
2733
      dict.Add CStr(key),""
2734
   else
2735
      dict.Add CStr(key),CStr(value)
2736
   End If
2737
End Sub
2738
 
2739
Function sdItem( dict, i )
2740
   Dim a
2741
   Dim s
2742
   a = dict.Items
2743
   s = a(i)
2744
   sdItem=s
2745
End Function
2746
 
2747
Function sdKey( dict, i )
2748
   Dim a
2749
   a = dict.Keys
2750
   sdKey = a(i)
2751
End Function
2752
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2753
Function ReleaseDeviStatus_ReportCheckbox( width, NameAndValue, Label, bCheck )
2754
   Dim s
2755
   If (IsNull(Request(NameAndValue)) OR (Request(NameAndValue) = "")) AND (not bCheck) Then
2756
      s = "<td width=""" & width & """><INPUT Type=Checkbox  name=""" & NameAndValue & """ value=""" & NameAndValue & """>" & Label & "</td>"
2757
   Else
2758
      s = "<td width=""" & width & """><INPUT Type=Checkbox  CHECKED name=""" & NameAndValue & """ value=""" & NameAndValue & """>" & Label & "</td>"
2759
   End If
2760
   ReleaseDeviStatus_ReportCheckbox = s
2761
End Function
2762
 
2763
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2764
Function GetCQIssuesListFilter
2765
   Dim s
2766
   s = ""
2767
   If not (IsNull(Request("CB_FILTER_FIXED")) OR (Request("CB_FILTER_FIXED") = "")) Then
2768
      s = CStr(enumISSUES_STATE_FIXED)
2769
      If not (IsNull(Request("CB_FILTER_OUTSTANDING")) OR (Request("CB_FILTER_OUTSTANDING") = "")) Then
2770
         s = s & "," & CStr(enumISSUES_STATE_IMPORTED)
2771
      End If
2772
   Else
2773
      If not (IsNull(Request("CB_FILTER_OUTSTANDING")) OR (Request("CB_FILTER_OUTSTANDING") = "")) Then
2774
         s = CStr(enumISSUES_STATE_IMPORTED)
2775
      End If
2776
   End If
2777
   GetCQIssuesListFilter = s
2778
End Function
2779
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2780
Function GetPkgNameAndVersion(SSPvId, SSPkgNameAndVer)
2781
   Dim SSpkgID, SSpkgName, SSpkgVersion, SSsrc_path, SSpkgDesc, BBdlocked
2782
   SSpkgID      = ""
2783
   SSpkgName    = ""
2784
   SSpkgVersion = ""
2785
   SSsrc_path   = ""
2786
   SSpkgDesc    = ""
2787
   BBdlocked    = 0
2788
   Call Get_Pkg_Short_Info( SSPvId, SSpkgID, SSpkgName, SSpkgVersion, SSsrc_path, SSpkgDesc, BBdlocked )
2789
   If not ((SSpkgName = "") and (SSpkgVersion = "")) Then
2790
      SSPkgNameAndVer = SSpkgName & " " & SSpkgVersion
2791
      GetPkgNameAndVersion = True
2792
   Else
2793
      SSPkgNameAndVer = ""
2794
      GetPkgNameAndVersion = False
2795
   End If
2796
End Function
2797
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2798
'==================================================================================
2799
' Report Name      :   ReleaseDeviStatus_Report
2800
' Description      :   List DEVIs for all Package Versions in a Release
2801
' INPUT            :
2802
'==================================================================================
2803
Sub ReleaseDeviStatus_Report ( SSsection, NNproj_id, NNrtag_id)
2804
   Dim rsCQQry                   ' Query for the CLEARQUEST database
2805
   Dim rsRMQry                   ' Query for the RELEASE MANAGER database
2806
   Dim SQLstr                    ' String to contain a query
2807
   Dim issueCnt                  ' Records how many CQ issues were found for a given RM package version
2808
   Dim retVal                    ' General return value
2809
   Dim isFirstDeviRow            ' HTML rendering helper
2810
   Dim isRowOpen                 ' HTML rendering helper
2811
   Dim dict_Iss_Id_to_Iss_Num    ' Dictionaries populated during the formation of the package DEVI list
2812
   Dim dict_Iss_Id_to_Iss_DB     '   creation, supporting the generation of the DEVI details list.
2813
   Dim dict_Iss_Id_to_Risk
2814
   Dim dict_Iss_Id_to_Summary
2815
   Dim dict_Iss_Id_to_CodeRev
2816
   Dim dict_Iss_Id_to_IntNotes
2817
   Dim dict_Iss_Id_to_RelDBPatches
2818
   Dim dict_Iss_Id_to_Pkg
2819
   Dim dict_Iss_Id_to_PvId
2820
   Dim dict_Iss_Id_to_Iss_Status
2821
   Dim dict_Iss_Id_to_Iss_Type
2822
   Dim dict_Iss_Id_to_Aff_Pkg
2823
   Dim i,j,k                     ' General loop vars
2824
   Dim s,strIn,strOut,sDisplay   ' General string vars
2825
   Dim a                         ' General array var
2826
   Dim pkgArr                    ' Holds an array of CSV strings listing RM package names, 1 array element per unique CQ issue found
2827
   Dim pkgCsv                    ' Holds a single CSV string listing RM package names, related to a single unique CQ issue
2828
   Dim pvIdArr                   ' Holds an array of CSV strings listing RM package PV IDs, 1 array element per unique CQ issue found
2829
   Dim pvIdCsv                   ' Holds a single CSV string listing RM package PV IDs, related to a single unique CQ issue
2830
   Dim crRefArr                  ' Holds an array of code review reference strings
2831
   Dim relDbPatchArr             ' Holds an array of related DB patch strings
2832
   Dim sqlTblCnt                 ' Counts the number of tables in the RM query string
2833
   Dim FSO                       ' File System Object
2834
   Dim NewTextFile               ' File Object
2835
   Dim emailReport               ' Boolean flag signalling email generation
2836
   Dim cqFilterStr               ' Fixed and/or Outstanding Issues Filter for RM Query
2837
   Dim cbWIPChecked              ' Default checkbox states
2838
   Dim cbPendingChecked
2839
   Dim cbReleasedChecked
2840
   Dim cbFixed
2841
   Dim cbOutstanding
2842
   Dim cbWithoutIssues
2843
   Dim cbTraverseRipples
2844
   Dim reObj                     ' regular expression object
2845
   Dim reObjMatch
2846
   Dim NumPkgsListed             ' Stats collection vars
2847
   Dim NumIssuesListed
2848
   Dim parRipDate                ' traverse ripple limit date
2849
   Dim lastNonRipplePvId         ' pv_id after ripple version traversal
2850
   Dim cqIssId                   ' clearquest database ID for a given issue (not a human readable number)
2851
 
2852
   Const Allow_All = TRUE
2853
   Const Disallow_All = FALSE
2854
 
2855
   NumPkgsListed = 0
2856
   NumIssuesListed = 0
2857
 
2858
   If NNproj_id = "" Then NNproj_id = -1
2859
   If NNrtag_id = "" Then NNrtag_id = -1
2860
 
2861
   If SSsection = "TITLE" Then
2862
      Response.write "Release DEVI Status"
2863
      Exit Sub
2864
   End If
2865
 
2866
   ' Determine if we have to assert default check status on one of the checkboxes
2867
   cbWIPChecked      = False
2868
   cbPendingChecked  = False
2869
   cbReleasedChecked = False
2870
   cbFixed           = False
2871
   cbOutstanding     = False
2872
   cbWithoutIssues   = False
2873
   cbTraverseRipples = False
2874
   If  (IsNull(Request("CB_FILTER_WIP")) OR (Request("CB_FILTER_WIP") = "")) _
2875
   and (IsNull(Request("CB_FILTER_PENDING")) OR (Request("CB_FILTER_PENDING") = "")) _
2876
   and (IsNull(Request("CB_FILTER_RELEASED")) OR (Request("CB_FILTER_RELEASED") = "")) Then
2877
      cbWIPChecked = True
2878
   End If
2879
   If  (IsNull(Request("CB_FILTER_FIXED")) OR (Request("CB_FILTER_FIXED") = "")) _
2880
   and (IsNull(Request("CB_FILTER_OUTSTANDING")) OR (Request("CB_FILTER_OUTSTANDING") = "")) Then
2881
      cbFixed = True
2882
   End If
2883
 
2884
   If (IsNull(Request("FRripdate")) OR (Request("FRripdate") = "")) Then
2885
      parRipDate = EuroDate(DateAdd("d",-31,Date))
2886
   Else
2887
      parRipDate = Request("FRripdate")
2888
   End If
2889
 
2890
   If SSsection = "FORM" Then
2891
      %>
2892
      <script language="JavaScript" src="images/calendar.js"></script>
2893
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
2894
         <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">
2895
            <table width="100%" border="0" cellpadding="2" cellspacing="1">
2896
               <tr>
2897
                  <td width="50%">
2898
                     <table width="100%" border="0" cellpadding="2" cellspacing="1">
2899
                        <tr>
2900
                           <td width="10%" align="left" valign="top" nowrap class="form_field">Project</td>
2901
                           <td width="90%" valign="top"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
2902
                        </tr>
2903
                        <tr>
2904
                           <td align="left" nowrap class="form_field">Release</td>
2905
                           <td><%Call Get_Open_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
2906
                        </tr>
2907
                        <tr><td colspan="2" height="130px"><img src="images/spacer.gif" width="1" height="1"></td></tr>
2908
                        <tr>
2909
                           <td>
2910
                              <input name="btn" type="submit" class="form_btn" value="Submit"            >
2911
                           </td>
2912
                           <td>
2913
                              <input name="btn" type="submit" class="form_btn" value="Mail Me CSV Report">
2914
                              <input type="hidden" name="group" value="<%=parGroup%>">
2915
                              <input type="hidden" name="repnum" value="<%=parRepNum%>">
2916
                              <input type="hidden" name="action" value="true">
2917
                           </td>
2918
                        </tr>
2919
                     </table>
2920
                  </td>
2921
                  <td width="50%">
2922
                     <table width="100%" border="0" cellpadding="2" cellspacing="1">
2923
                        <tr>
2924
                           <td width="60%" valign="top">
2925
                              <fieldset>
2926
                                 <legend><a href="javascript:;" class="body_scol" >Include&nbsp;Package&nbsp;Versions<%=Quick_Help("RepRDS_pv")%>&nbsp;</a></legend>
2927
                                 <table width="100%" border="0" cellpadding="2" cellspacing="1">
2928
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("25%", "CB_FILTER_WIP", "From Work-in-progress", cbWIPChecked)%></tr>
2929
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("17%", "CB_FILTER_PENDING", "From Pending", cbPendingChecked)%></tr>
2930
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("20%", "CB_FILTER_RELEASED", "From Released", cbReleasedChecked)%></tr>
2931
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("100%", "CB_FILTER_WITHOUT_ISSUES", "Without Issues", cbWithoutIssues)%></tr>
2932
                                 </table>
2933
                              </fieldset>
2934
                           </td>
2935
                           <td width="40%" valign="top">
2936
                              <fieldset>
2937
                                 <legend><a href="javascript:;" class="body_scol" >&nbsp;Include&nbsp;Issues<%=Quick_Help("RepRDS_iss")%>&nbsp;</a></legend>
2938
                                 <table width="100%" border="0" cellpadding="2" cellspacing="1">
2939
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("100%", "CB_FILTER_FIXED",       "Fixed", cbFixed)%></tr>
2940
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("100%", "CB_FILTER_OUTSTANDING", "Outstanding", cbOutstanding)%></tr>
2941
                                 </table>
2942
                              </fieldset>
2943
                           </td>
2944
                        </tr>
2945
                        <tr>
2946
                           <td width="60%" valign="top" colspan="2">
2947
                              <fieldset>
2948
                                 <legend><a href="javascript:;" class="body_scol" >&nbsp;From&nbsp;Released<%=Quick_Help("RepRDS_trav")%>&nbsp;</a></legend>
2949
                                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
2950
                                    <tr>
2951
                                       <%=ReleaseDeviStatus_ReportCheckbox("60%", "CB_FILTER_TRAVERSE_RIPPLES", "Traverse Ripples as far back as", cbTraverseRipples)%>
2952
                                       <td>
2953
                                          <input type="text" name="FRripdate" maxlength="10" size="12" value="<%=parRipDate%>"><A onmouseover="window.status='Select a date';return true;" onmouseout="window.status='';return true;" href="javascript:show_calendar('repform.FRripdate',null,null,null);"><img src="images/i_calendar.gif" width="16" height="16" border="0"></a>
2954
                                       </td>
2955
                                    </tr>
2956
                                 </table>
2957
                              </fieldset>
2958
                           </td>
2959
                        </tr>
2960
                     </table>
2961
                  </td>
2962
               </tr>
2963
            </table>
2964
         </form>
2965
      </table>
2966
      <%
2967
      Exit Sub
2968
   End If
2969
 
2970
   If SSsection = "BODY" Then
2971
      emailReport = false
2972
      If Request("btn") = "Mail Me CSV Report" Then
2973
         emailReport = true
2974
      End If
2975
 
2976
      If NOT CBool(Request("action")) Then Exit Sub
2977
      If NNrtag_id = -1 then Exit Sub
2978
 
2979
      ' Construct Release Manager Query based upon form settings (rtag and checkbox states)
2980
      sqlTblCnt = 0
2981
      SQLstr = "SELECT * FROM ( "
2982
      If not (IsNull(Request("CB_FILTER_WIP")) OR (Request("CB_FILTER_WIP") = "")) Then
2983
         sqlTblCnt = sqlTblCnt + 1
2984
         SQLstr = SQLstr & " SELECT p.PROJ_ID,   rt.RTAG_ID,   v.VIEW_ID,   pk.PKG_ID,   pv.PV_ID,"&_
2985
                           "        p.PROJ_NAME, rt.RTAG_NAME, v.VIEW_NAME, pk.PKG_NAME, pv.PKG_VERSION, pv.PKG_LABEL, pv.BUILD_TYPE, pv.DLOCKED, 'WIP' as STATE"&_
2986
                           "   FROM PACKAGE_VERSIONS pv,"&_
2987
                           "        PACKAGES pk,"&_
2988
                           "        RELEASE_TAGS rt,"&_
2989
                           "        PROJECTS p,"&_
2990
                           "        VIEWS v," &_
2991
                           "        WORK_IN_PROGRESS wip"&_
2992
                           "  WHERE wip.RTAG_ID =   :RTAG_ID"&_
2993
                           "    AND wip.RTAG_ID = rt.RTAG_ID"&_
2994
                           "    AND wip.PV_ID   = pv.PV_ID"&_
2995
                           "    AND wip.VIEW_ID = v.VIEW_ID"&_
2996
                           "    AND pv.PKG_ID   = pk.PKG_ID"&_
2997
                           "    AND rt.PROJ_ID  = p.PROJ_ID"
2998
      End If
2999
 
3000
      If not (IsNull(Request("CB_FILTER_PENDING")) OR (Request("CB_FILTER_PENDING") = "")) Then
3001
         If sqlTblCnt > 0 Then
3002
            SQLstr = SQLstr & " UNION ALL "
3003
         End If
3004
         sqlTblCnt = sqlTblCnt + 1
3005
         SQLstr = SQLstr & " SELECT p.PROJ_ID,   rt.RTAG_ID,   v.VIEW_ID,   pk.PKG_ID,   pv.PV_ID,"&_
3006
                           "        p.PROJ_NAME, rt.RTAG_NAME, v.VIEW_NAME, pk.PKG_NAME, pv.PKG_VERSION, pv.PKG_LABEL, pv.BUILD_TYPE, pv.DLOCKED, 'Pending' as STATE"&_
3007
                           "   FROM PACKAGE_VERSIONS pv,"&_
3008
                           "        PACKAGES pk,"&_
3009
                           "        RELEASE_TAGS rt,"&_
3010
                           "        PROJECTS p,"&_
3011
                           "        VIEWS v," &_
3012
                           "        PLANNED pl"&_
3013
                           "  WHERE pl.RTAG_ID  =   :RTAG_ID"&_
3014
                           "    AND pl.RTAG_ID  = rt.RTAG_ID"&_
3015
                           "    AND pl.PV_ID    = pv.PV_ID"&_
3016
                           "    AND pl.VIEW_ID  = v.VIEW_ID"&_
3017
                           "    AND pv.PKG_ID   = pk.PKG_ID"&_
3018
                           "    AND rt.PROJ_ID  = p.PROJ_ID"
3019
      End If
3020
 
3021
      If not (IsNull(Request("CB_FILTER_RELEASED")) OR (Request("CB_FILTER_RELEASED") = "")) Then
3022
         If sqlTblCnt > 0 Then
3023
            SQLstr = SQLstr & " UNION ALL "
3024
         End If
3025
         sqlTblCnt = sqlTblCnt + 1
3026
         SQLstr = SQLstr & " SELECT p.PROJ_ID,   rt.RTAG_ID,   v.VIEW_ID,   pk.PKG_ID,   pv.PV_ID,"&_
3027
                           "        p.PROJ_NAME, rt.RTAG_NAME, v.VIEW_NAME, pk.PKG_NAME, pv.PKG_VERSION, pv.PKG_LABEL, pv.BUILD_TYPE, pv.DLOCKED, 'Released' as STATE"&_
3028
                           "   FROM PACKAGE_VERSIONS pv,"&_
3029
                           "        PACKAGES pk,"&_
3030
                           "        RELEASE_TAGS rt,"&_
3031
                           "        PROJECTS p,"&_
3032
                           "        VIEWS v," &_
3033
                           "        RELEASE_CONTENT rc"&_
3034
                           "  WHERE rc.RTAG_ID      =   :RTAG_ID"&_
3035
                           "    AND rc.RTAG_ID      = rt.RTAG_ID"&_
3036
                           "    AND rc.PV_ID        = pv.PV_ID"&_
3037
                           "    AND rc.BASE_VIEW_ID = v.VIEW_ID"&_
3038
                           "    AND pv.PKG_ID       = pk.PKG_ID"&_
3039
                           "    AND rt.PROJ_ID      = p.PROJ_ID"
3040
      End If
3041
 
3042
      SQLstr = SQLstr & " )"
3043
      SQLstr = SQLstr & " ORDER BY UPPER(PKG_NAME), PKG_VERSION"
3044
 
3045
      ' Exit if nothing to do
3046
      If sqlTblCnt = 0 Then
3047
         Response.Write "Select one or more of Work-in-progress/Pending/Released package version states to be considered"
3048
         Exit Sub
3049
      End If
3050
 
3051
      ' Get SQL string for querying the CLEARQUEST database for this package version's fixed issues  enumISSUES_STATE_IMPORTED or enumISSUES_STATE_FIXED
3052
      cqFilterStr = GetCQIssuesListFilter()
3053
      If cqFilterStr = "" Then
3054
         Response.Write "Select one or both of Fixed/Outstanding issues lists to be considered"
3055
         Exit Sub
3056
      End If
3057
 
3058
      ' Create ADODB recordset for CLEARQUEST query
3059
      Set rsCQQry = Server.CreateObject("ADODB.Recordset")
3060
 
3061
      ' Query RELEASE MANAGER for Package versions
3062
      OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
3063
      Set rsRMQry = OraDatabase.DbCreateDynaset( SQLstr, cint(0))
3064
      OraDatabase.Parameters.Remove "RTAG_ID"
3065
 
3066
      ' If no records returned issue a message to user and exit
3067
      If rsRMQry.RecordCount = 0 Then
3068
         Response.Write "No records returned - try including additional package version states"
3069
         Exit Sub
3070
      End If
3071
 
3072
      ' Create a downloadable file
3073
      Set FSO = Server.CreateObject("Scripting.FileSystemObject")
3074
      Set NewTextFile = FSO.CreateTextFile(Server.MapPath("docs\ReleaseDEVIStatus_"&objAccessControl.UserName&".csv"), true)
3075
 
3076
      ' Create some dictionaries
3077
      set dict_Iss_Id_to_Iss_Num      = CreateObject("Scripting.Dictionary")
3078
      set dict_Iss_Id_to_Iss_DB       = CreateObject("Scripting.Dictionary")
3079
      set dict_Iss_Id_to_Pkg          = CreateObject("Scripting.Dictionary")
3080
      set dict_Iss_Id_to_Risk         = CreateObject("Scripting.Dictionary")
3081
      set dict_Iss_Id_to_Summary      = CreateObject("Scripting.Dictionary")
3082
      set dict_Iss_Id_to_CodeRev      = CreateObject("Scripting.Dictionary")
3083
      set dict_Iss_Id_to_IntNotes     = CreateObject("Scripting.Dictionary")
3084
      set dict_Iss_Id_to_RelDBPatches = CreateObject("Scripting.Dictionary")
3085
      set dict_Iss_Id_to_PvId         = CreateObject("Scripting.Dictionary")
3086
      set dict_Iss_Id_to_Iss_Status   = CreateObject("Scripting.Dictionary")
3087
      set dict_Iss_Id_to_Iss_Type     = CreateObject("Scripting.Dictionary")
3088
      set dict_Iss_Id_to_Aff_Pkg      = CreateObject("Scripting.Dictionary")
3089
 
3090
      set reObj  = new RegExp
3091
 
3092
      NewTextFile.WriteLine(DoubleQuotes("Release DEVI Status Report for " & Get_Proj_Name(Request("FRproj_id")) & ", release " & Get_Release_Name(Request("FRrtag_id"))))
3093
      NewTextFile.WriteLine("")
3094
      NewTextFile.WriteLine("Package DEVI List")
3095
      NewTextFile.WriteLine("")
3096
      NewTextFile.WriteLine("""Package"",""Label"",""State"",""Issue Number"",""Issue Summary""")
3097
      %>
3098
      <H3>Release DEVI Status Report for
3099
      &nbsp;project&nbsp;<a href="rtree.asp?proj_id=<%=NNproj_id%>" class="txt_linked"><%=Get_Proj_Name(Request("FRproj_id"))%></a>,
3100
      &nbsp;release&nbsp;<a href="dependencies.asp?rtag_id=<%=NNrtag_id%>" class="txt_linked"><%=Get_Release_Name(Request("FRrtag_id"))%></a>
3101
      </H3>
3102
      <H4>Contents</H4>
3103
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
3104
         <tr>
3105
            <td valign="top" nowrap width="15%"><a href="#C1">Package DEVI List</a></td>
3106
            <td valign="top" width="85%">This contains the list of package versions in the release, along with the CLEARQUEST issues assigned to them.</td>
3107
         </tr>
3108
         <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
3109
         <tr>
3110
            <td valign="top"><a href="#C2">DEVI Details List</a></td>
3111
            <td valign="top">This contains the list of CLEARQUEST issues for the release, along with selected details for each, and a reference back to the package versions to which they have been assigned.</td>
3112
         </tr>
3113
         <tr>
3114
            <td valign="top"><a href="#C3">Statistics</a></td>
3115
            <td valign="top">This contains some statistics collected during the report generation.</td>
3116
         </tr>
3117
         <tr>
3118
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3119
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3120
         </tr>
3121
      </table>
3122
 
3123
      <H5><a name="C1">Package DEVI List</a></H5>
3124
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
3125
         <tr>
3126
            <td width="10%" nowrap class="body_colb">Package&nbsp;&nbsp;&nbsp;</td>
3127
            <td width="10%" nowrap class="body_colb">Label&nbsp;&nbsp;&nbsp;</td>
3128
            <td width="10%" nowrap class="body_colb">State&nbsp;&nbsp;&nbsp;</td>
3129
            <td width="10%" class="body_colb">Issue Number<br>(F)=Fixed<br>(O)=Outstanding</td>
3130
            <td width="60%" nowrap class="body_colb">Issue Summary&nbsp;&nbsp;&nbsp;</td>
3131
         </tr>
3132
         <tr>
3133
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3134
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3135
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3136
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3137
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3138
         </tr>
3139
         <%
3140
         while ((NOT rsRMQry.BOF) AND (NOT rsRMQry.EOF))
3141
            isFirstDeviRow = 1
3142
            isRowOpen = 1
3143
 
3144
            ' If this package version is a ripple, try and find its non-ripple predecessor in order to get at the
3145
            ' issues that were addressed
3146
            lastNonRipplePvId = rsRMQry("PV_ID")
3147
            If not (IsNull(Request("CB_FILTER_TRAVERSE_RIPPLES")) OR (Request("CB_FILTER_TRAVERSE_RIPPLES") = "")) Then
3148
               if ((rsRMQry("BUILD_TYPE") = "Y") and (rsRMQry("DLOCKED") = "Y")) Then
3149
                  If (IsNull(Request("FRripdate")) OR (Request("FRripdate") = "")) Then
3150
                     lastNonRipplePvId = getLastNonRippleVersionPVID(rsRMQry("PV_ID"))
3151
                  Else
3152
                     lastNonRipplePvId = getLastNonRippleVersionPVIDLimitedByDate(rsRMQry("PV_ID"), Request("FRripdate"))
3153
                  End If
3154
                  If IsNull(lastNonRipplePvId) or (lastNonRipplePvId = "") Then
3155
                     lastNonRipplePvId = rsRMQry("PV_ID")
3156
                  End If
3157
               End If
3158
            End If
3159
 
3160
            issueCnt = Get_Package_Issues (lastNonRipplePvId, SQLstr, NULL, NULL, cqFilterStr )
3161
            if (issueCnt > 0) _
3162
            or not(IsNull(Request("CB_FILTER_WITHOUT_ISSUES")) OR (Request("CB_FILTER_WITHOUT_ISSUES") = "")) Then
3163
 
3164
               NumPkgsListed = NumPkgsListed + 1
3165
 
3166
               %>
3167
               <tr>
3168
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3169
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3170
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3171
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3172
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3173
               </tr>
3174
               <%
3175
 
3176
               NewTextFile.Write(DoubleQuotes(rsRMQry("PKG_NAME")) & ",")
3177
               NewTextFile.Write(DoubleQuotes(rsRMQry("PKG_LABEL")) & ",")
3178
               NewTextFile.Write(DoubleQuotes(rsRMQry("STATE")) & ",")
3179
               %>
3180
               <tr>
3181
               <td valign="top"><a href="fixed_issues.asp?rtag_id=<%=NNrtag_id%>&pv_id=<%=rsRMQRy("PV_ID")%>" class="txt_linked"><%=rsRMQry("PKG_NAME")%></a></td>
3182
               <td valign="top"><%=rsRMQry("PKG_LABEL")%></td>
3183
               <td valign="top"><%=rsRMQry("STATE")%></td>
3184
               <%
3185
 
3186
               ' Complete the row immediately if this package version has no issues, else process the issues.
3187
               if issueCnt = 0 Then
3188
                  NewTextFile.WriteLine(",")
3189
                  %>
3190
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
3191
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
3192
                  </tr>
3193
                  <%
3194
                  isRowOpen = 0
3195
               Else
3196
                  ' Query the CLEARQUEST database
3197
                  retVal = Get_CQ_Issues ( SQLstr, rsCQQry )
3198
                  If retVal = 0 Then
3199
                     While ((NOT rsCQQry.BOF) AND (NOT rsCQQry.EOF))
3200
                        Dim issueNumber
3201
                        issueNumber = rsCQQry("ISS_NUM") & GetRMIssueState (lastNonRipplePvId, rsCQQry("ISS_ID"))
3202
 
3203
                        ' Keep dictionary of issue IDs to human readable issue numbers, plus other info we will need later on for the report
3204
                        If not dict_Iss_Id_to_Iss_Num.Exists(CStr(rsCQQry("ISS_ID"))) Then
3205
                           sdAdd dict_Iss_Id_to_Iss_Num,      rsCQQry("ISS_ID"), issueNumber
3206
                           sdAdd dict_Iss_Id_to_Iss_DB,       rsCQQry("ISS_ID"), rsCQQry("ISS_DB")
3207
                           sdAdd dict_Iss_Id_to_Risk,         rsCQQry("ISS_ID"), rsCQQry("RISK")
3208
                           sdAdd dict_Iss_Id_to_Summary,      rsCQQry("ISS_ID"), rsCQQry("SUMMARY")
3209
                           sdAdd dict_Iss_Id_to_CodeRev,      rsCQQry("ISS_ID"), rsCQQry("CR_REF")
3210
                           sdAdd dict_Iss_Id_to_IntNotes,     rsCQQry("ISS_ID"), rsCQQry("INT_NOTES")
3211
                           sdAdd dict_Iss_Id_to_RelDBPatches, rsCQQry("ISS_ID"), rsCQQry("DB_PATCHES")
3212
                           sdAdd dict_Iss_Id_to_Iss_Type,     rsCQQry("ISS_ID"), rsCQQry("ISSUE_TYPE")
3213
                           sdAdd dict_Iss_Id_to_Iss_Status,   rsCQQry("ISS_ID"), rsCQQry("STATUS")
3214
                           sdAdd dict_Iss_Id_to_Aff_Pkg,      rsCQQry("ISS_ID"), rsCQQry("AFFECTED_PACKAGES")
3215
                        End If
3216
 
3217
                        ' Keep dictionary of issue IDs to release manager package names (latter is a comma separated list)
3218
                        If dict_Iss_Id_to_Pkg.Exists(CStr(rsCQQry("ISS_ID"))) Then
3219
                           dict_Iss_Id_to_Pkg.Item(CStr(rsCQQry("ISS_ID"))) = dict_Iss_Id_to_Pkg.Item(CStr(rsCQQry("ISS_ID"))) & "," & CStr(rsRMQry("PKG_NAME")) & " " & CStr(rsRMQry("PKG_VERSION"))
3220
                        Else
3221
                           sdAdd dict_Iss_Id_to_Pkg, rsCQQry("ISS_ID"), rsRMQry("PKG_NAME") & " " & CStr(rsRMQry("PKG_VERSION"))
3222
                        End If
3223
 
3224
                        ' Keep dictionary of issue IDs to release manager package version IDs (latter is a comma separated list)
3225
                        If dict_Iss_Id_to_PvId.Exists(CStr(rsCQQry("ISS_ID"))) Then
3226
                           dict_Iss_Id_to_PvId.Item(CStr(rsCQQry("ISS_ID"))) = dict_Iss_Id_to_PvId.Item(CStr(rsCQQry("ISS_ID"))) & "," & CStr(rsRMQry("PV_ID"))
3227
                        Else
3228
                           sdAdd dict_Iss_Id_to_PvId, rsCQQry("ISS_ID"), rsRMQry("PV_ID")
3229
                        End If
3230
 
3231
                        ' Begin new row if needed
3232
                        if isRowOpen = 0 Then
3233
                           isRowOpen = 1
3234
                           %><tr><%
3235
                        End If
3236
 
3237
                        ' If first row, no need to pad since those columns have already been filled in outer loop
3238
                        If isFirstDeviRow = 1 Then
3239
                           isFirstDeviRow = 0
3240
                           NewTextFile.Write(DoubleQuotes(issueNumber) & ",")
3241
                           NewTextFile.WriteLine(DoubleQuotes(rsCQQry("SUMMARY")))
3242
                           %>
3243
                           <td valign="top"><a class="txt_linked"  href="#<%=rsCQQry("ISS_ID")%>"><%=issueNumber%></a></td>
3244
                           <td valign="top"><%=rsCQQry("SUMMARY")%></td>
3245
                           <%
3246
                        Else
3247
                           NewTextFile.Write(",,," & DoubleQuotes(issueNumber) & ",")
3248
                           NewTextFile.WriteLine(DoubleQuotes(rsCQQry("SUMMARY")))
3249
                           %>
3250
                           <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3251
                           <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3252
                           <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3253
                           <td valign="top"><a class="txt_linked" href="#<%=rsCQQry("ISS_ID")%>"><%=issueNumber%></a></td>
3254
                           <td valign="top"><%=rsCQQry("SUMMARY")%></td>
3255
                           <%
3256
                        End If
3257
 
3258
                        ' End this row
3259
                        isRowOpen = 0
3260
                        %></tr><%
3261
                        rsCQQry.MoveNext
3262
                     Wend  ' end of loop processing each issue
3263
                     rsCQQry.Close
3264
                  Else
3265
                     NewTextFile.WriteLine("," & DoubleQuotes("ERROR - could not get issue details from CLEARQUEST"))
3266
                     %>
3267
                     <td><img src="images/spacer.gif" width="1" height="1"></td>
3268
                     <td>ERROR - could not get issue details from CLEARQUEST</td>
3269
                     <%
3270
                  End If
3271
 
3272
                  ' Complete the row if needed
3273
                  if isRowOpen = 1 Then
3274
                     if (isFirstDeviRow = 1) Then
3275
                        NewTextFile.WriteLine(",")
3276
                        %>
3277
                        <td><img src="images/spacer.gif" width="1" height="1"></td>
3278
                        <td><img src="images/spacer.gif" width="1" height="1"></td>
3279
                        <%
3280
                     End If
3281
                     isRowOpen = 0
3282
                     %></tr><%
3283
                  End If
3284
               End If
3285
            End If
3286
            rsRMQry.MoveNext
3287
         Wend  ' End of loop processing each package version
3288
         set rsCQQry = nothing
3289
         %>
3290
         <tr>
3291
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3292
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3293
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3294
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3295
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3296
         </tr>
3297
      </table>
3298
 
3299
      <%
3300
      NewTextFile.WriteLine("")
3301
      NewTextFile.WriteLine("DEVI Details List")
3302
      NewTextFile.WriteLine("")
3303
      NewTextFile.WriteLine("""Issue Number"",""Property"",""Details""")
3304
      %>
3305
 
3306
      <H5><a name="C2">DEVI Details List</a></H5>
3307
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
3308
         <tr>
3309
            <td width="10%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
3310
            <td width="20%" nowrap class="body_colb">Property&nbsp;&nbsp;&nbsp;</td>
3311
            <td width="70%" nowrap class="body_colb">Details&nbsp;&nbsp;&nbsp;</td>
3312
         </tr>
3313
         <tr>
3314
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3315
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3316
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3317
         </tr>
3318
         <%
3319
         For i = 0 To (dict_Iss_Id_to_Iss_Num.Count - 1)
3320
 
3321
            cqIssId = sdKey(dict_Iss_Id_to_Iss_Num, i)
3322
 
3323
            NumIssuesListed = NumIssuesListed + 1
3324
            %>
3325
            <tr>
3326
               <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3327
               <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3328
               <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3329
            </tr>
3330
            <%
3331
            '-------------------------------------------------------------------------------------------------------------------------------
3332
            ' First line is the DEVI Number, and its summary info
3333
            s = sdItem(dict_Iss_Id_to_Summary,i)   ' Prepare for CSV
3334
            s = Replace(s,"""","""""")
3335
            NewTextFile.WriteLine(DoubleQuotes(sdItem(dict_Iss_Id_to_Iss_Num,i)) & ",Issue Summary," & DoubleQuotes(s))
3336
            s = sdItem(dict_Iss_Id_to_Summary,i)   ' Prepare for HTML
3337
            s = NewLine_To_BR(To_HTML(s))
3338
            %>
3339
            <tr>
3340
            <td valign="top"><a name="<%=cqIssId%>" class="txt_linked" onclick="MM_openBrWindow('_wform_issues_details.asp?iss_db=<%=sdItem(dict_Iss_Id_to_Iss_DB,i)%>&iss_id=<%=sdKey(dict_Iss_Id_to_Iss_Num,i)%>','IssueDetails','resizeable=yes,width=580,height=500')" href="javascript:;"><%=sdItem(dict_Iss_Id_to_Iss_Num,i)%></a></td>
3341
            <td valign="top">Issue Summary:</td>
3342
            <td valign="top"><%=s%></td>
3343
            </tr><%
3344
            '-------------------------------------------------------------------------------------------------------------------------------
3345
            ' Next line is the DEVI Type Value (ie Defect, Future Enhancement, etc)
3346
            NewTextFile.WriteLine(",Type," & DoubleQuotes(sdItem(dict_Iss_Id_to_Iss_Type,i)))
3347
            %>
3348
            <tr>
3349
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3350
            <td valign="top">Type:</td>
3351
            <td valign="top"><%=sdItem(dict_Iss_Id_to_Iss_Type, i)%></td>
3352
            </tr>
3353
            <%
3354
            '-------------------------------------------------------------------------------------------------------------------------------
3355
            ' Next line is the DEVI Status Value
3356
            NewTextFile.WriteLine(",Status," & DoubleQuotes(sdItem(dict_Iss_Id_to_Iss_Status,i)))
3357
            %>
3358
            <tr>
3359
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3360
            <td valign="top">Status:</td>
3361
            <td valign="top"><%=sdItem(dict_Iss_Id_to_Iss_Status, i)%></td>
3362
            </tr>
3363
            <%
3364
            '-------------------------------------------------------------------------------------------------------------------------------
3365
            ' Next line is the DEVI Risk Value
3366
            NewTextFile.WriteLine(",Risk," & DoubleQuotes(sdItem(dict_Iss_Id_to_Risk,i)))
3367
            %>
3368
            <tr>
3369
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3370
            <td valign="top">Risk:</td>
3371
            <td valign="top"><%=sdItem(dict_Iss_Id_to_Risk, i)%></td>
3372
            </tr>
3373
            <%
3374
            '-------------------------------------------------------------------------------------------------------------------------------
3375
            ' Next line is the DEVI's code review reference
3376
            a = dict_Iss_Id_to_CodeRev.Items  ' Get collection into an array
3377
            s = a(i)                          ' Get array element into a string
3378
            s = Replace(s, chr(13), "+")      ' Replace possible delimiters with a single delimiter ("+")
3379
            s = Replace(s, chr(10), "+")
3380
            s = Replace(s, " ", "+")
3381
            crRefArr = Split(s,"+")           ' Split on our contrived delimiter and iterate through results
3382
 
3383
            NewTextFile.Write(",Code Review Ref,""")
3384
            %>
3385
            <tr>
3386
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3387
            <td valign="top">Code Review Ref:</td>
3388
            <td valign="top">
3389
            <%
3390
            For j = 0 To UBOUND(crRefArr)
3391
               if not ((crRefArr(j) = "+") or (crRefArr(j) = ",") or (Trim(crRefArr(j)) = "")) Then
3392
                  if j = 0 Then
3393
                     NewTextFile.Write(Trim(crRefArr(j)))
3394
                     %>
3395
                     <a href="<%=Trim(crRefArr(j))%>" class="txt_linked"><%=Trim(crRefArr(j))%></a>
3396
                     <%
3397
                  Else
3398
                     NewTextFile.Write("," & Trim(crRefArr(j)))
3399
                     %>
3400
                     <a href="<%=Trim(crRefArr(j))%>" class="txt_linked"><br><%=Trim(crRefArr(j))%></a>
3401
                     <%
3402
                  End If
3403
               End If
3404
            Next
3405
            NewTextFile.WriteLine("""")
3406
            %>
3407
            </td>
3408
            </tr>
3409
            <%
3410
 
3411
            '-------------------------------------------------------------------------------------------------------------------------------
3412
            ' Next line is the DEVI's related DB Patches
3413
            '  This is quite complicated but at the end of the day, we are aiming to convert the free form text in
3414
            '  the CLEARQUEST devi into a list of hyperlinks to the actual package versions in RM, based on the assumption
3415
            '  that the free form text contains PV_ID numbers somewhere therein.
3416
            a = dict_Iss_Id_to_RelDBPatches.Items  ' Get collection into an array
3417
            s = a(i)                               ' Get array element into a string
3418
            s = Replace(s, chr(13), "+")           ' Replace possible delimiters with a single delimiter ("+")
3419
            s = Replace(s, chr(10), "+")
3420
            s = Replace(s, " ", "+")
3421
            relDbPatchArr = Split(s,"+")           ' Split on our contrived delimiter and iterate through results
3422
 
3423
            NewTextFile.Write(",Related DB Patches,""")
3424
            %>
3425
            <tr>
3426
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3427
            <td valign="top">Related DB Patches:</td>
3428
            <td valign="top">
3429
            <%
3430
            For j = 0 To UBOUND(relDbPatchArr)
3431
               if not ((relDbPatchArr(j) = "+") or (relDbPatchArr(j) = ",") or (Trim(relDbPatchArr(j)) = "")) Then
3432
                  ' Given that the Related DB Patches is a free form text field in a CLEARQUEST DEVI,
3433
                  ' it can contain a variety of text. Normally it contains a list of PV_ID's but it
3434
                  ' can also contain the patch file names (eg. orahops.467229_patch.xml) which normally
3435
                  ' contains PV_IDs embedded within them. We have to cater for both approaches and
3436
                  ' somehow extract those PV_IDs. We have already split the string so we know we are
3437
                  ' now dealing with a single item, but sometimes users name their packages or files with
3438
                  ' numbers as well as letters. The code below looks for the longest numeric sequence
3439
                  ' and assumes that is the PV_ID
3440
                  Dim lenMax,lenThis,objMatch
3441
                  lenMax  = 0
3442
                  lenThis = 0
3443
 
3444
                  sDisplay = Trim(relDbPatchArr(j))   'default
3445
 
3446
                  ' search for numeric sequences in the string
3447
                  reObj.IgnoreCase = True
3448
                  reObj.Global = True
3449
                  reObj.Pattern = "[0-9]+"
3450
                  set reObjMatch = reObj.Execute(Trim(relDbPatchArr(j)))
3451
                  If reObjMatch.Count > 0 Then
3452
                     ' Look for the longest numeric sequence
3453
                     for each objMatch in reObjMatch
3454
                        lenThis = objMatch.Length
3455
                        If lenThis > lenMax Then
3456
                           lenMax = lenThis
3457
                           sDisplay = objMatch  'sDisplay is now a numeric sequence
3458
                        End If
3459
                     next
3460
                     if (lenMax > 0) Then
3461
                        ' Form the display string as "PV_ID (package-name package-version)"
3462
                        If GetPkgNameAndVersion(sDisplay, s) Then
3463
                           sDisplay = sDisplay & " (" & s & ")"
3464
                        Else
3465
                           ' Couldn't get the package name/version from RM so it is likely this number
3466
                           ' is not a true/real PV_ID so revert to the simpler display format we began with
3467
                           ' as a default.
3468
                           sDisplay = Trim(relDbPatchArr(j))   'reset to full string
3469
                           lenMax = 0                          'zero to force simpler display format in HTML
3470
                        End If
3471
                     End If
3472
                  End If
3473
 
3474
                  if j = 0 Then
3475
                     NewTextFile.Write(Trim(sDisplay))
3476
                     If (lenMax = 0) Then
3477
                        %><%=Trim(relDbPatchArr(j))%><%
3478
                     Else
3479
                        %><a href="dependencies.asp?pv_id=<%=Trim(relDbPatchArr(j))%>" class="txt_linked"><%=sDisplay%></a><%
3480
                     End If
3481
                  Else
3482
                     NewTextFile.Write("," & Trim(sDisplay))
3483
                     If (lenMax = 0) Then
3484
                        %><%=Trim(relDbPatchArr(j))%><%
3485
                     Else
3486
                        %><a href="dependencies.asp?pv_id=<%=Trim(relDbPatchArr(j))%>" class="txt_linked"><br><%=sDisplay%></a><%
3487
                     End If
3488
                  End If
3489
               End If
3490
            Next
3491
            NewTextFile.WriteLine("""")
3492
            %>
3493
            </td>
3494
            </tr>
3495
            <%
3496
            '-------------------------------------------------------------------------------------------------------------------------------
3497
            ' Next line is the DEVI's affected packages field
3498
            s = sdItem(dict_Iss_Id_to_Aff_Pkg,i)   ' Prepare for CSV
3499
            s = Replace(s,"""","""""")
3500
            NewTextFile.WriteLine(",Affected Packages," & DoubleQuotes(s))
3501
            s = sdItem(dict_Iss_Id_to_Aff_Pkg,i)   ' Prepare for HTML
3502
            s = NewLine_To_BR(To_HTML(s))
3503
            %>
3504
            <tr>
3505
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3506
            <td valign="top">Affected Packages:</td>
3507
            <td valign="top"><%=s %></td>
3508
            </tr>
3509
            <%
3510
            '-------------------------------------------------------------------------------------------------------------------------------
3511
            ' Next line(s) is/are the packages this DEVI is assigned to, in release manager
3512
            pkgArr = dict_Iss_Id_to_Pkg.Items
3513
            pkgCsv = pkgArr(i)
3514
            pkgArr = Split(pkgCsv, ",")
3515
 
3516
            pvIdArr = dict_Iss_Id_to_PvId.Items
3517
            pvIdCsv = pvIdArr(i)
3518
            pvIdArr = Split(pvIdCsv, ",")
3519
 
3520
            NewTextFile.Write(",RM Assigned Packages,""")
3521
            %>
3522
            <tr>
3523
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3524
            <td valign="top">RM Assigned Packages:</td>
3525
            <td valign="top">
3526
            <%
3527
            For j = 0 To UBOUND(pkgArr)
3528
               If j = 0 Then
3529
                  NewTextFile.Write(pkgArr(j))
3530
                  %><a href="fixed_issues.asp?rtag_id=<%=NNrtag_id%>&pv_id=<%=pvIdArr(j)%>" class="txt_linked"><%=pkgArr(j)%></a><%
3531
               Else
3532
                  NewTextFile.Write("," & pkgArr(j))
3533
                  %><a href="fixed_issues.asp?rtag_id=<%=NNrtag_id%>&pv_id=<%=pvIdArr(j)%>" class="txt_linked"><br><%=pkgArr(j)%></a><%
3534
               End If
3535
            Next
3536
            NewTextFile.WriteLine("""")
3537
            %>
3538
            </td>
3539
            </tr>
3540
            <%
3541
            '-------------------------------------------------------------------------------------------------------------------------------
3542
            ' Next line is the DEVI's integration notes
3543
            s = sdItem(dict_Iss_Id_to_IntNotes, i) 'Prepare for CSV
3544
            s = Replace(s,"""","""""")
3545
            NewTextFile.WriteLine(",Integration Notes," & DoubleQuotes(s))
3546
 
3547
            s = sdItem(dict_Iss_Id_to_IntNotes, i) ' Prepare for HTML
3548
            s = NewLine_To_BR(To_HTML(s))
3549
            %>
3550
            <tr>
3551
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3552
            <td valign="top">Integration Notes:</td>
3553
            <td valign="top"><%=s %>
3554
            </td>
3555
            </tr>
3556
            <%
3557
         Next
3558
         %>
3559
         <tr>
3560
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3561
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3562
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3563
         </tr>
3564
      </table>
3565
      <H5><a name="C3">Statistics</a></H5>
3566
      Report&nbsp;generated on&nbsp;<%=EuroDate(Date)%>&nbsp;at&nbsp;<%=Time%><BR>
3567
      <%=NumPkgsListed %>&nbsp;Package(s)&nbsp;Listed<BR>
3568
      <%=NumIssuesListed  %>&nbsp;Issue(s)&nbsp;Listed<BR>
3569
      <!-- PRINT, SAVE, ETC. ------------>
3570
      <%If parPrint = "" Then%>
3571
         <br>
3572
         <br>
3573
         <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>
3574
         <br>
3575
      <%End If%>
3576
      <%
3577
      ' Clean up
3578
      rsRMQry.Close
3579
      set rsRMQry = nothing
3580
      set dict_Iss_Id_to_Iss_Num      = nothing
3581
      set dict_Iss_Id_to_Iss_DB       = nothing
3582
      set dict_Iss_Id_to_Pkg          = nothing
3583
      set dict_Iss_Id_to_Risk         = nothing
3584
      set dict_Iss_Id_to_Summary      = nothing
3585
      set dict_Iss_Id_to_CodeRev      = nothing
3586
      set dict_Iss_Id_to_IntNotes     = nothing
3587
      set dict_Iss_Id_to_RelDBPatches = nothing
3588
      set dict_Iss_Id_to_PvId         = nothing
3589
      set dict_Iss_Id_to_Iss_Status   = nothing
3590
      set dict_Iss_Id_to_Iss_Type     = nothing
3591
      set dict_Iss_Id_to_Aff_Pkg      = nothing
3592
      set reObj                       = nothing
3593
 
3594
      NewTextFile.Close
3595
      Set NewTextFile=Nothing
3596
 
3597
      ' EMAIL CSV report if user has requested it
3598
      If emailReport Then
3959 dpurdie 3599
         Dim LocalPath
159 ghuddy 3600
         LocalPath = Server.MapPath("docs\ReleaseDEVIStatus_"&objAccessControl.UserName&".csv")
3959 dpurdie 3601
 
3602
         Send_Email   "Release Manager Notification",_
3603
                       adminEmail, _
3604
                       objAccessControl.UserEmail,_
3605
                       "Release DEVI Status Report (csv) from Release Manager", _
3606
                       "Your requested report...",_
3607
                       LocalPath
159 ghuddy 3608
      End If
3609
   End If
3610
End Sub
3611
%>