Subversion Repositories DevTools

Rev

Rev 159 | Rev 3900 | Go to most recent revision | Details | Compare with Previous | 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
                     <option value="<%=enumCLEARQUEST_TDSE_ID%>" <%If CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then%>selected<%End If%>>TDSE</option>
807
                  </select>
808
               </td>
809
            </tr>
810
            <tr>
811
               <td nowrap class="form_field">&nbsp;</td>
812
               <td align="right" nowrap class="form_field" valign="top">Issue Numbers</td>
813
               <td class="form_txt"><input type="text" name="FRiss_num_list" size="50" class="form_item" value="<%=SSiss_num_list%>"><br>
814
               HINTS:<br>
815
               - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br>
816
               - Use space separated issue numbers for multiple search.</td>
817
            </tr>
818
            <tr>
819
               <td nowrap class="form_field">&nbsp;</td>
820
               <td align="right" nowrap class="form_field">&nbsp;</td>
821
               <td><br>
822
                  <input type="hidden" name="group" value="<%=parGroup%>">
823
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
824
                  <input type="hidden" name="action" value="true">
825
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
826
               </td>
827
            </tr>
828
         </form>
829
      </table>
830
      <%   Exit Sub
831
   End If
832
 
833
 
834
   If SSsection = "BODY" Then
835
      If NOT CBool(Request("action")) Then Exit Sub
836
 
837
      Dim SSsql, issARR, num_item, iss_num_col, issNumDict, rsCQ, recCount, maxRecCount
838
      Set rsCQ = Server.CreateObject("ADODB.Recordset")
839
      Set issNumDict = CreateObject("Scripting.Dictionary")
840
 
841
 
842
      '---- Find Issue numbers in ClearQuest ----
843
      If CDbl(NNiss_db) = enumCLEARQUEST_MASSI_ID Then
844
         iss_num_col = "new_num"
845
         SSsql = _
846
         " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
847
         " FROM MASSI.admin.software_issue si"&_
848
         " WHERE "
849
 
850
 
851
      ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DPGIM_ID Then
852
         iss_num_col = "new_num"
853
         SSsql = _
854
         " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
855
         " FROM DPGIM.admin.software_issue si"&_
856
         " WHERE "
857
 
858
 
859
      ElseIf CDbl(NNiss_db) = enumCLEARQUEST_DEVI_ID Then
860
         iss_num_col = "new_num"
861
         SSsql = _
862
         " SELECT si.dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
159 ghuddy 863
         " FROM CQ_DEVI.admin.software_issue si"&_
129 ghuddy 864
         " WHERE "
865
 
866
 
867
      ElseIf CDbl(NNiss_db) = enumCLEARQUEST_TDSE_ID Then
868
         iss_num_col = "job_number"
869
         SSsql = _
870
         " SELECT dbid AS iss_id, si."& iss_num_col &" AS iss_num"&_
159 ghuddy 871
         " FROM CQ_TDSE.admin.request si"&_
129 ghuddy 872
         " WHERE "
873
 
874
      End If
875
 
876
 
877
      '---- Split multiple search ----
878
      SSiss_num_list = Trim(SSiss_num_list)
879
      If InStr( SSiss_num_list, " " ) > 0 Then
880
         ' space separator found
881
         issARR = Split ( SSiss_num_list, " ")
882
 
883
         For Each num_item In issARR
884
            If num_item <> "" Then
885
               SSsql = SSsql & " (si."& iss_num_col &" LIKE '%"& Replace( SQLstring(num_item), "*", "%" ) &"%') OR"
886
            End If
887
         Next
888
 
889
         SSsql = Left ( SSsql, Len(SSsql) - 2 )      ' Removes last OR
890
 
891
      Else
892
         SSsql = SSsql & " (si."& iss_num_col &" LIKE '%"& Replace( SQLstring(SSiss_num_list), "*", "%") &"%')"
893
 
894
      End If
895
 
896
      rsCQ.ActiveConnection = CQ_conn
897
      rsCQ.Source = SSsql
898
      rsCQ.CursorType = 0
899
      rsCQ.CursorLocation = 2
900
      rsCQ.LockType = 3
901
      rsCQ.Open()
902
 
903
      ' Get find results from CQ
904
      recCount = 1
905
      maxRecCount = 1000
906
      issNumDict.ADD "-1", "-1"      ' take care of no results
907
      While ((NOT rsCQ.BOF) AND (NOT rsCQ.EOF) AND (recCount < maxRecCount))
908
         issNumDict.ADD Cstr(rsCQ("iss_id")), Cstr(rsCQ("iss_num"))
909
         recCount = recCount + 1
910
         rsCQ.MoveNext
911
      WEnd
912
 
913
      rsCQ.Close
914
      Set rsCQ = nothing
915
 
916
      Query_String = ReadFile( rootPath & "queries\rep_where_are_bugs_located.sql" )
917
      Query_String = Replace ( Query_String, "/*ISS_DB*/", NNiss_db )
918
      Query_String = Replace ( Query_String, "/*ISS_ID_LIST*/", Join( issNumDict.Keys, ",") )
919
 
920
      %>
921
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
922
         <tr>
923
            <td width="1%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
924
            <td width="1%" nowrap class="body_colb">Fixed</td>
925
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
926
            <td width="1%" nowrap class="body_colb">Notes&nbsp;&nbsp;&nbsp;</td>
927
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
928
         </tr>
929
         <tr>
930
         <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
931
         </tr>
932
         <%
933
         Dim currIss_id
934
         currIss_id = -1
935
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
936
 
937
         If rsRep.RecordCount = 0 Then
938
            With Response
939
               .write "<tr>"
940
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
941
               .write "</tr>"
942
            End With
943
         End If
944
 
945
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
946
            ' -------- GROUP BY ISS_ID -----------------
947
            If Cstr(currIss_id) <> Cstr(rsRep("iss_id")) Then
948
               %>
949
               <tr>
950
                  <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
951
                  <td></td>
952
               </tr>
953
               <tr>
954
                  <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>
955
                  <td colspan='5' class="body_scol"></td>
956
               </tr>
957
               <%
958
               currIss_id = Cstr(rsRep("iss_id"))
959
            End If
960
            ' -------- END GROUP ------------------------
961
            %>
962
            <tr>
963
               <td nowrap class="body_row" valign="top"></td>
964
               <%If CDbl(rsRep("iss_state")) = enumISSUES_STATE_FIXED Then%>
965
                  <td align="left"><img src="images/i_tick.gif" width="7" height="7" hspace="6"></td>
966
               <%Else%>
967
                  <td align="left"><img src='images/spacer.gif' width='7' height='7' hspace='6'></td>
968
               <%End If%>
969
               <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>
970
               <%
971
               Set rsQry = OraDatabase.DbCreateDynaset( "select * from release_content rc, release_tags rt where rc.rtag_id = rt.rtag_id and "&_
972
                                          " pv_id ="&rsRep("pv_id"), 0 )
973
 
974
               While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
975
                  %>
976
                  <tr>
977
                     <td nowrap align="left" class="body_row" valign="top"></td>
978
                     <td nowrap align="left" class="body_row" valign="top"></td>
979
                     <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>
980
                  </tr>
981
                  <%
982
                  rsQry.MoveNext()
983
               WEnd
984
               rsQry.Close()
985
               Set rsQry = Nothing
986
               %>
987
               <td nowrap align="left" class="body_row" valign="top"><%=rsRep("notes")%></td>
988
               <td nowrap align="left" class="body_row" valign="top"></td>
989
            </tr>
990
            <%  rsRep.MoveNext
991
         WEnd
992
         %>
993
         <tr>
994
            <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
995
         </tr>
996
      </table>
997
      <!-- PRINT, SAVE, ETC. ------------>
998
      <%If parPrint = "" Then%>
999
         <br>
1000
         <br>
1001
         <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>
1002
         <br>
1003
      <%End If%>
1004
      <!-- PRINT, SAVE, ETC. END -------->
1005
      <%
1006
      rsRep.Close
1007
      Set rsRep = nothing
1008
   End If
1009
 
119 ghuddy 1010
End Sub
1011
%>
1012
<%
1013
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1014
'==================================================================================
129 ghuddy 1015
' Report Name      :    Find a Package
1016
' Description      :   Locate a package in Release Manager
1017
' Form Input      :   Package Name, version extension
119 ghuddy 1018
'==================================================================================
1019
Sub Find_Package ( SSsection, SSpkg_name, SSv_ext )
129 ghuddy 1020
   Dim Query_String, rsRep, oRegExp
1021
 
1022
 
1023
   If SSsection = "TITLE" Then
1024
      Response.write "Find a Package"
1025
      Exit Sub
1026
   End If
1027
 
1028
 
1029
   If SSsection = "FORM" Then
1030
      %>
1031
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1032
         <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
1033
            <tr>
1034
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
1035
               <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
1036
               <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
1037
               HINTS:<br>
1038
               - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
1039
            </tr>
1040
            <tr>
1041
               <td nowrap class="form_field">&nbsp;</td>
1042
               <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
1043
               <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
1044
               e.g. .mas or .lvs or .oso or blank etc.</td>
1045
            </tr>
1046
            <tr>
1047
               <td nowrap class="form_field">&nbsp;</td>
1048
               <td align="right" nowrap class="form_field">&nbsp;</td>
1049
               <td><br>
1050
                  <input type="hidden" name="group" value="<%=parGroup%>">
1051
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1052
                  <input type="hidden" name="action" value="true">
1053
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1054
               </td>
1055
            </tr>
1056
         </form>
1057
      </table>
1058
      <%   Exit Sub
1059
   End If
1060
 
1061
 
1062
   If SSsection = "BODY" Then
1063
      If NOT CBool(Request("action")) Then Exit Sub
1064
 
1065
      If SSpkg_name = "" Then SSpkg_name = "%"
1066
      If SSv_ext = "" Then SSv_ext = "%"
1067
      If Request("withwcard") <> "" Then SSpkg_name = "%"& Replace( SQLstring(SSpkg_name), "*", "") &"%"      'Place wild card automatically
1068
 
1069
 
1070
 
1071
      ' -- Check if this is PV_ID
1072
      Set oRegExp = New RegExp
1073
 
1074
      oRegExp.Global = False   'Find only first match
1075
      oRegExp.Pattern = "\D" 'Match number only
1076
 
1077
 
1078
      If NOT oRegExp.Test(Request("FRpkg_name")) Then
1079
         Query_String = ReadFile( rootPath & "queries\rep_find_package_by_pv_id.sql" )
1080
         Query_String = Replace ( Query_String, "/*PV_ID*/", SQLstring(Request("FRpkg_name") )  )
1081
 
1082
      Else
1083
         Query_String = ReadFile( rootPath & "queries\rep_find_package.sql" )
1084
         Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
1085
         Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
1086
      End If
1087
      %>
1088
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1089
         <tr>
1090
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1091
            <td width="1%" nowrap class="body_colb">Location</td>
1092
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
1093
         </tr>
1094
         <tr>
1095
            <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1096
         </tr>
1097
         <%
1098
         Dim currPv_id
1099
         currPv_id = -1
1100
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1101
 
1102
         If rsRep.RecordCount = 0 Then
1103
            With Response
1104
               .write "<tr>"
1105
               .write "<td colspan='3' class='body_row'>Found 0 records</td>"
1106
               .write "</tr>"
1107
            End With
1108
         End If
1109
 
1110
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1111
            ' -------- GROUP BY Package Version -----------------
1112
            If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
1113
               %>
1114
               <tr>
1115
                  <td colspan="2" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1116
               <td></td>
1117
               </tr>
1118
               <tr>
1119
                  <%If Request("withwcard") <> "" Then%>
1120
                     <%' Highlight results for package search from index page%>
1121
                     <td nowrap class="body_scol"><%=Highlight_Substring ( rsRep("pkg_name"), Replace( SQLstring(SSpkg_name), "%", "") )  &" "& rsRep("pkg_version")%></td>
1122
                  <%Else%>
1123
                     <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
1124
                  <%End If%>
1125
                  <td colspan='2' class="body_scol"></td>
1126
               </tr>
1127
               <%
1128
               currPv_id = Cstr(rsRep("pv_id"))
1129
            End If
1130
            ' -------- END GROUP ------------------------
1131
            %>
1132
            <%If NOT IsNull(rsRep("proj_name")) Then%>
1133
               <tr>
1134
                  <td class="body_row"></td>
1135
                  <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>
1136
                  <td class="body_row"></td>
1137
               </tr>
1138
            <%Else%>
1139
               <tr>
1140
                  <td class="body_row"></td>
1141
                  <td class="body_row"></td>
1142
                  <td class="body_row"></td>
1143
               </tr>
1144
            <%End If%>
1145
            <%  rsRep.MoveNext
1146
         WEnd
1147
         %>
1148
         <tr>
1149
            <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1150
         </tr>
1151
      </table>
1152
      <!-- PRINT, SAVE, ETC. ------------>
1153
      <%If parPrint = "" Then%>
1154
         <br>
1155
         <br>
1156
         <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>
1157
         <br>
1158
      <%End If%>
1159
      <!-- PRINT, SAVE, ETC. END -------->
1160
      <%
1161
      rsRep.Close
1162
      Set rsRep = nothing
1163
   End If
1164
 
119 ghuddy 1165
End Sub
1166
%>
1167
<%
1168
'==================================================================================
129 ghuddy 1169
' Report Name      :    Find Package Version History
1170
' Description      :   Locate all package versions and their current location
1171
' Form Input      :   Package Name, version extension
119 ghuddy 1172
'==================================================================================
1173
Sub Find_Package_Version_History ( SSsection, SSpkg_name, SSv_ext )
129 ghuddy 1174
   Dim Query_String, rsRep
1175
 
1176
 
1177
   If SSsection = "TITLE" Then
1178
      Response.write "Find Package Version History"
1179
      Exit Sub
1180
   End If
1181
 
1182
 
1183
   If SSsection = "FORM" Then
1184
      %>
1185
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1186
         <form action="<%=scriptName%>" method="post" name="repform" onSubmit="MM_validateForm('FRpkg_name','Package Name','R');return document.MM_returnValue">
1187
            <tr>
1188
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="1" height="8"></td>
1189
               <td width="1%" align="right" nowrap class="form_field" valign="top">Package Name</td>
1190
               <td class="form_txt"><input type="text" name="FRpkg_name" size="30" class="form_item" value="<%=SSpkg_name%>"><br>
1191
               HINTS:<br>
1192
               - You can use * wildcard. e.g. *0123 or 0123* or *0123*<br><br></td>
1193
            </tr>
1194
            <tr>
1195
               <td nowrap class="form_field">&nbsp;</td>
1196
               <td align="right" nowrap class="form_field" valign="top">Version Extension (optional)</td>
1197
               <td class="form_txt"><input type="text" name="FRv_ext" size="10" class="form_item" value="<%=SSv_ext%>"><br>
1198
               e.g. .mas or .lvs or .oso or blank etc.</td>
1199
            </tr>
1200
            <tr>
1201
               <td nowrap class="form_field">&nbsp;</td>
1202
               <td align="right" nowrap class="form_field">&nbsp;</td>
1203
               <td><br>
1204
                  <input type="hidden" name="group" value="<%=parGroup%>">
1205
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1206
                  <input type="hidden" name="action" value="true">
1207
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1208
               </td>
1209
            </tr>
1210
         </form>
1211
      </table>
1212
      <%   Exit Sub
1213
   End If
1214
 
1215
 
1216
   If SSsection = "BODY" Then
1217
      Const img_Official = "<img src='images/i_locked.gif' width='7' height='10' hspace='3' align='absmiddle'>"
1218
      If NOT CBool(Request("action")) Then Exit Sub
1219
 
1220
      If SSpkg_name = "" Then SSpkg_name = "%"
1221
      If SSv_ext = "" Then SSv_ext = "%"
1222
 
1223
      Query_String = ReadFile( rootPath & "queries\rep_package_version_history.sql" )
1224
      Query_String = Replace ( Query_String, "/*PKG_NAME*/", Replace( SQLstring(SSpkg_name), "*", "%") )
1225
      Query_String = Replace ( Query_String, "/*V_EXT*/", Replace( SQLstring(SSv_ext), "*", "%") )
1226
      %>
1227
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1228
         <tr>
1229
            <td width="1%" nowrap class="body_colb" align="right">Official<%=img_Official%></td>
1230
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1231
            <td width="1%" nowrap class="body_colb">Location</td>
1232
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
1233
         </tr>
1234
         <tr>
1235
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1236
         </tr>
1237
         <%
1238
         Dim currPv_id
1239
         currPv_id = -1
1240
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1241
 
1242
         If rsRep.RecordCount = 0 Then
1243
            With Response
1244
               .write "<tr>"
1245
               .write "<td colspan='4' class='body_row'>Found 0 records</td>"
1246
               .write "</tr>"
1247
            End With
1248
         End If
1249
 
1250
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1251
            ' -------- GROUP BY Package Version -----------------
1252
            If Cstr(currPv_id) <> Cstr(rsRep("pv_id")) Then
1253
            %>
1254
               <tr>
1255
               <td colspan="3" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1256
               <td></td>
1257
               </tr>
1258
            <tr>
1259
               <td align="right"><%If rsRep("dlocked") = "Y" Then%><%=img_Official%><%End If%></td>
1260
               <td nowrap class="body_scol"><%=rsRep("pkg_name") &" "& rsRep("pkg_version")%></td>
1261
               <td colspan='2' class="body_scol"></td>
1262
               </tr>
1263
            <%
1264
               currPv_id = Cstr(rsRep("pv_id"))
1265
            End If
1266
            ' -------- END GROUP ------------------------
1267
            %>
1268
               <tr>
1269
               <td class="body_row"></td>
1270
               <td class="body_row"></td>
1271
               <%If IsNull(rsRep("rtag_id")) Then%>
1272
                  <td nowrap class="body_txt_gray" valign="top">Not Used!</td>
1273
               <%Else%>
1274
                  <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>
1275
               <%End If%>
1276
               <td class="body_row"></td>
1277
               </tr>
1278
         <%  rsRep.MoveNext
1279
         WEnd
1280
         %>
1281
         <tr>
1282
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1283
         </tr>
1284
      </table>
1285
      <!-- PRINT, SAVE, ETC. ------------>
1286
      <%If parPrint = "" Then%>
1287
         <br>
1288
         <br>
1289
         <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>
1290
         <br>
1291
      <%End If%>
1292
      <!-- PRINT, SAVE, ETC. END -------->
1293
      <%
1294
      rsRep.Close
1295
      Set rsRep = nothing
1296
   End If
1297
 
119 ghuddy 1298
End Sub
1299
%>
1300
<%
1301
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1302
'==================================================================================
129 ghuddy 1303
' Report Name      :    Obsolete Packages
1304
' Description      :   List packages that are not used (exclude products)
1305
' INPUT            :   Project, Vesion Tree, Release Label
119 ghuddy 1306
'==================================================================================
1307
Sub Obsolete_Packages ( SSsection, NNproj_id, NNrtag_id )
129 ghuddy 1308
   Dim Query_String, rsRep
1309
   Const Allow_All = TRUE
1310
   Const Disallow_All = FALSE
1311
 
1312
   If NNproj_id = "" Then NNproj_id = -1
1313
   If NNrtag_id = "" Then NNrtag_id = -1
1314
 
1315
   If SSsection = "TITLE" Then
1316
      Response.write "Unused Packages"
1317
      Exit Sub
1318
   End If
1319
 
1320
 
1321
   If SSsection = "FORM" Then
1322
      %>
1323
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1324
         <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">
1325
            <tr>
1326
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1327
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1328
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1329
            </tr>
1330
            <tr>
1331
               <td nowrap class="form_field">&nbsp;</td>
1332
               <td align="right" nowrap class="form_field">Release</td>
1333
               <td><%Call Get_Release_Labels ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1334
            </tr>
1335
            <tr>
1336
               <td nowrap class="form_field">&nbsp;</td>
1337
               <td align="right" nowrap class="form_field">&nbsp;</td>
1338
               <td><br>
1339
                  <input type="hidden" name="group" value="<%=parGroup%>">
1340
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1341
                  <input type="hidden" name="action" value="true">
1342
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1343
               </td>
1344
            </tr>
1345
         </form>
1346
      </table>
1347
      <%   Exit Sub
1348
   End If
1349
 
1350
 
1351
   If SSsection = "BODY" Then
1352
      If NOT CBool(Request("action")) Then Exit Sub
1353
 
1354
      Query_String = ReadFile( rootPath & "queries\rep_obsolete_packages.sql" )
1355
 
1356
      OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1357
      %>
1358
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1359
         <tr>
1360
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
1361
            <td width="1%" nowrap class="body_colb">Package Name and Version&nbsp;&nbsp;&nbsp;</td>
1362
            <td width="1%" nowrap class="body_colb">Released&nbsp;&nbsp;&nbsp;</td>
1363
            <td width="1%" nowrap class="body_colb">Added to Release&nbsp;&nbsp;&nbsp;</td>
1364
            <td width="100%" nowrap class="body_colb">&nbsp;</td>
1365
         </tr>
1366
         <tr>
1367
            <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1368
         </tr>
1369
         <%
1370
         Dim currView_id
1371
         currView_id = -1
1372
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1373
 
1374
         If rsRep.RecordCount = 0 Then
1375
            With Response
1376
               .write "<tr>"
1377
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
1378
               .write "</tr>"
1379
            End With
1380
         End If
1381
 
1382
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1383
            ' -------- GROUP BY BASE VIEW  -----------------
1384
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1385
               %>
1386
               <tr>
1387
                  <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1388
                  <td></td>
1389
               </tr>
1390
               <tr>
1391
                  <td nowrap class="body_scol"><%=rsRep("view_name")%></td>
1392
                  <td class="body_scol"></td>
1393
                  <td class="body_scol"></td>
1394
                  <td class="body_scol"></td>
1395
                  <td class="body_scol"></td>
1396
               </tr>
1397
               <%
1398
               currView_id = CDbl(rsRep("view_id"))
1399
            End If
1400
            ' -------- END GROUP ------------------------
1401
            %>
1402
            <tr>
1403
               <td class="body_row"></td>
1404
               <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>
1405
               <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>
1406
               <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>
1407
               <td class="body_row"></td>
1408
            </tr>
1409
            <%  rsRep.MoveNext
1410
         WEnd
1411
         %>
1412
         <tr>
1413
            <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1414
         </tr>
1415
      </table>
1416
      <!-- PRINT, SAVE, ETC. ------------>
1417
      <%If parPrint = "" Then%>
1418
         <br>
1419
         <br>
1420
         <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>
1421
         <br>
1422
      <%End If%>
1423
      <!-- PRINT, SAVE, ETC. END -------->
1424
      <%
1425
      rsRep.Close
1426
      Set rsRep = nothing
1427
   End If
1428
 
119 ghuddy 1429
End Sub
1430
%>
1431
<%
1432
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1433
'==================================================================================
129 ghuddy 1434
' Report Name      :    Deployable Software Modules
1435
' Description      :   Shows packages that are deployed to the customers and shows new packages marked as deployable.
1436
' INPUT            :   Project, Vesion Tree, Release Label, Base View (hard-coded to PRODUCTS)
119 ghuddy 1437
'==================================================================================
1438
Sub Deployable_Software_Modules ( sSection, nProj_id,  nRtag_id, nBase_view_id )
129 ghuddy 1439
   Dim Query_String, rsRep
1440
   Const Allow_All = TRUE
1441
   Const Disallow_All = FALSE
1442
 
1443
   If nProj_id = "" Then nProj_id = -1
1444
   If nRtag_id = "" Then nRtag_id = -1
1445
 
1446
   If sSection = "TITLE" Then
1447
      Response.write "Deployable Software Modules"
1448
      Exit Sub
1449
   End If
1450
 
1451
 
1452
   If sSection = "FORM" Then
1453
      %>
1454
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1455
         <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">
1456
            <tr>
1457
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1458
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1459
               <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
1460
            </tr>
1461
            <tr>
1462
               <td nowrap class="form_field">&nbsp;</td>
1463
               <td align="right" nowrap class="form_field">Release</td>
1464
               <td><%Call Get_Release_Labels ( nProj_id, nRtag_id, Disallow_All )%></td>
1465
            </tr>
1466
         <tr>
1467
            <td nowrap class="form_field">&nbsp;</td>
1468
            <td align="right" nowrap class="form_field">Base View</td>
1469
            <td><select name="noname" class='form_item' disabled>
1470
                  <option>PRODUCTS</option>
1471
               </select></td>
1472
            </tr>
1473
            <tr>
1474
               <td nowrap class="form_field">&nbsp;</td>
1475
               <td align="right" nowrap class="form_field">&nbsp;</td>
1476
               <td><br>
1477
                  <input type="hidden" name="group" value="<%=parGroup%>">
1478
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1479
                  <input type="hidden" name="FRbase_view_id" value="<%=enumBASE_VIEW_PRODUCTS%>">
1480
                  <input type="hidden" name="action" value="true">
1481
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1482
               </td>
1483
            </tr>
1484
         </form>
1485
      </table>
1486
      <%   Exit Sub
1487
   End If
1488
 
1489
 
1490
   If sSection = "BODY" Then
1491
      If NOT CBool(Request("action")) Then Exit Sub
1492
      '--- New Deployable Modules ---
1493
      Query_String = ReadFile( rootPath & "queries\rep_new_deployable_packages.sql" )
1494
 
1495
      OraDatabase.Parameters.Add "RTAG_ID",       nRtag_id,       ORAPARM_INPUT, ORATYPE_NUMBER
1496
      OraDatabase.Parameters.Add "BASE_VIEW_ID",    nBase_view_id,    ORAPARM_INPUT, ORATYPE_NUMBER
1497
      %>
1498
      <table width="100%"  border="0" cellspacing="0" cellpadding="2">
1499
         <tr>
1500
            <td nowrap class="body_colb" colspan="3" background="images/bg_bage.gif">&nbsp;New Deployable Package</td>
1501
         </tr>
1502
         <tr>
1503
            <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1504
         </tr>
1505
         <tr>
1506
            <td width="1%" class="body_txt">Package Name</td>
1507
            <td width="1%" class="body_txt">Version</td>
1508
            <td width="100%" class="body_txt">Last Modifier</td>
1509
         </tr>
1510
         <tr>
1511
            <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1512
         </tr>
1513
         <%
1514
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1515
         %>
1516
         <%If rsRep.RecordCount = 0 Then%>
1517
            <tr>
1518
               <td nowrap class="body_row" colspan="3">Found 0 records! </td>
1519
            </tr>
1520
         <%End If%>
1521
         <%While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))%>
1522
            <tr>
1523
               <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>
1524
               <td nowrap class="body_row"><%=rsRep("pkg_version")%></td>
1525
               <td nowrap class="body_row"><%=rsRep("full_name")%></td>
1526
            </tr>
1527
            <%rsRep.MoveNext
1528
         WEnd
1529
         rsRep.Close
1530
         Set rsRep = Nothing%>
1531
         <tr>
1532
            <td background="images/bg_rep_line.gif" colspan="3"><img src="images/spacer.gif" width="1" height="1"></td>
1533
         </tr>
1534
         <%
1535
         ' Go To Release link...
1536
         Query_String = _
1537
         " SELECT proj.PROJ_NAME, rt.RTAG_NAME"&_
1538
         "   FROM PROJECTS proj,"&_
1539
         "         RELEASE_TAGS rt"&_
1540
         "    WHERE rt.PROJ_ID = proj.proj_id"&_
1541
         "      AND rt.rtag_id = :RTAG_ID"
1542
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1543
         %>
1544
         <tr>
1545
            <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>
1546
         </tr>
1547
         <%
1548
         rsRep.Close
1549
         Set rsRep = Nothing%>
1550
      </table>
1551
      <br><br>
1552
      <%
1553
      '--- Current Deployable Modules ---
1554
      Query_String = ReadFile( rootPath & "queries\rep_current_deployable_packages.sql" )
1555
      %>
1556
      <table width="100%"  border="0" cellspacing="0" cellpadding="2">
1557
         <tr>
1558
            <td colspan="4" nowrap class="body_colb" background="images/bg_bage.gif">&nbsp;Current Deployable Packages </td>
1559
         </tr>
1560
         <tr>
1561
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1562
         </tr>
1563
         <%
1564
         Dim currPv_id
1565
         currPv_id = -1
1566
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1567
 
1568
         If rsRep.RecordCount = 0 Then
1569
            With Response
1570
               .write "<tr>"
1571
               .write "<td colspan='4' class='body_row'>Found 0 records</td>"
1572
               .write "</tr>"
1573
            End With
1574
         End If
1575
 
1576
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1577
            ' -------- GROUP BY PRODUCT NAME  -----------------
1578
            If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
1579
               %>
1580
               <tr>
1581
                  <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1582
                  <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1583
                  <td width="1%" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1584
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
1585
               </tr>
1586
               <tr>
1587
                  <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>
1588
                  <td>&nbsp;</td>
1589
                  <td>&nbsp;</td>
1590
                  <td>&nbsp;</td>
1591
               </tr>
1592
               <%
1593
               currPv_id = CDbl(rsRep("pv_id"))
1594
            End If
1595
            ' -------- END GROUP ------------------------
1596
            %>
1597
            <tr>
1598
               <td>&nbsp;</td>
1599
               <td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("dpv_id")%>&rtag_id=<%=nRtag_id%>" class="txt_linked"><%=rsRep("dpkg_name")%></a></td>
1600
               <td nowrap class="body_row"><%=rsRep("dpkg_version")%></td>
1601
               <td nowrap class="err_alert"><%=rsRep("is_dep_deployable")%></td>
1602
            </tr>
1603
            <%  rsRep.MoveNext
1604
         WEnd
1605
         %>
1606
         <tr>
1607
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1608
         </tr>
1609
      </table>
1610
      <!-- PRINT, SAVE, ETC. ------------>
1611
      <%If parPrint = "" Then%>
1612
         <br>
1613
         <br>
1614
         <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>
1615
         <br>
1616
      <%End If%>
1617
      <!-- PRINT, SAVE, ETC. END -------->
1618
      <%
1619
      rsRep.Close
1620
      Set rsRep = nothing
1621
   End If
1622
 
119 ghuddy 1623
End Sub
1624
%>
1625
 
1626
<%
1627
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1628
'==================================================================================
129 ghuddy 1629
' Report Name      :    Bill Of Materials
1630
' Description      :   List products for a BOM
1631
' INPUT            :
119 ghuddy 1632
'==================================================================================
1633
Sub Bill_of_Materials ( SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion )
129 ghuddy 1634
   Dim Query_String, rsRep, rsQry
1635
   Const Allow_All = TRUE
1636
   Const Disallow_All = FALSE
119 ghuddy 1637
 
129 ghuddy 1638
   If NNproj_id = "" Then NNproj_id = -1
1639
   If NNrtag_id = "" Then NNrtag_id = -1
1640
   If NNversion = "" Then NNversion = -1
1641
 
1642
   If SSsection = "TITLE" Then
1643
      Response.write "Software Bill Of Materials (SBOM) products"
1644
      Exit Sub
1645
   End If
1646
 
1647
 
1648
   If SSsection = "FORM" Then
1649
      %>
1650
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1651
         <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">
1652
            <tr>
1653
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1654
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1655
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1656
            </tr>
1657
            <tr>
1658
               <td nowrap class="form_field">&nbsp;</td>
1659
               <td align="right" nowrap class="form_field">Release</td>
1660
               <td><%Call Get_Branches ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1661
            </tr>
1662
            <tr>
1663
               <td nowrap class="form_field">&nbsp;</td>
1664
               <td align="right" nowrap class="form_field">SBOM Version</td>
1665
               <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
1666
            </tr>
1667
            <tr>
1668
               <td nowrap class="form_field">&nbsp;</td>
1669
               <td align="right" nowrap class="form_field">&nbsp;</td>
1670
               <td><br>
1671
                  <input type="hidden" name="group" value="<%=parGroup%>">
1672
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1673
                  <input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
1674
                  <input type="hidden" name="action" value="true">
1675
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1676
               </td>
1677
            </tr>
1678
         </form>
1679
      </table>
1680
      <p>
1681
      <%   Exit Sub
1682
   End If
1683
 
1684
 
1685
 
1686
   OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1687
   OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
1688
   Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
1689
   Dim bomId
1690
   bomId = rsQry("bom_id")
1691
   rsQry.close
1692
   Set rsQry = nothing
1693
 
1694
 
1695
   If SSsection = "BODY" Then
1696
      If NOT CBool(Request("action")) Then Exit Sub
1697
 
1698
      Query_String = ReadFile( rootPath & "queries\AllProducts.sql" )
1699
 
1700
      OraDatabase.Parameters.Add "BOM_ID", bomId, ORAPARM_INPUT, ORATYPE_NUMBER
1701
      %>
1702
      </p>
1703
      <table width="100%" border="0" cellspacing="0" cellpadding="2">
1704
         <tr>
1705
            <td nowrap class="body_colb">Node Name</td>
1706
            <td nowrap class="body_colb">Operating System</td>
1707
            <td nowrap class="body_colb">Product</td>
1708
            <td nowrap class="body_colb">Version</td>
1709
         </tr>
1710
         <tr>
1711
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1712
         </tr>
1713
         <%
1714
         Dim currNode_id, currOs_id
1715
         currNode_id = -1
1716
         currOs_id = -1
1717
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
1718
 
1719
         If rsRep.RecordCount = 0 Then
1720
            With Response
1721
               .write "<tr>"
1722
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
1723
               .write "</tr>"
1724
            End With
1725
         End If
1726
 
1727
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1728
            ' -------- GROUP BY BASE VIEW  -----------------
1729
            If CDbl(currNode_id) <> CDbl(rsRep("node_id")) Then
1730
               %>
1731
               <tr>
1732
                  <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1733
               </tr>
1734
               <tr>
1735
                  <td nowrap class="body_scol"><%=rsRep("node_name")%></td>
1736
                  <td nowrap class="body_scol"></td>
1737
                  <td nowrap class="body_scol"></td>
1738
                  <td nowrap class="body_scol"></td>
1739
               </tr>
1740
               <%
1741
               currNode_id = CDbl(rsRep("node_id"))
1742
            End If
1743
            ' -------- END GROUP ------------------------
1744
            If CDbl(currOs_id) <> CDbl(rsRep("os_id")) Then
1745
               %>
1746
               <tr>
1747
                  <td nowrap class="body_row"></td>
1748
                  <td nowrap class="body_scol"><%=rsRep("os_name")%></td>
1749
                  <td nowrap class="body_scol"></td>
1750
                  <td nowrap class="body_scol"></td>
1751
               </tr>
1752
               <%
1753
               currOs_id = CDbl(rsRep("Os_id"))
1754
            End If
1755
            %>
1756
            <tr>
1757
               <td nowrap class="body_row"></td>
1758
               <td nowrap class="body_row"></td>
1759
               <td nowrap class="body_row"><%=PatchIcon ( rsRep("is_patch"), rsRep("is_obsolete") )%><%=rsRep("pkg_name")%></td>
1760
               <td nowrap class="body_row"><%=rsRep("pkg_version")%></td>
1761
            </tr>
1762
            <%  rsRep.MoveNext
1763
         WEnd
1764
         %>
1765
         <tr>
1766
            <td colspan="4" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1767
         </tr>
1768
      </table>
1769
      <p>&nbsp;     </p>
1770
      <p>        <!-- PRINT, SAVE, ETC. ------------>
119 ghuddy 1771
      <%If parPrint = "" Then%>
129 ghuddy 1772
         <br>
1773
         <br>
1774
         <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>
1775
         <br>
119 ghuddy 1776
      <%End If%>
1777
      <!-- PRINT, SAVE, ETC. END -------->
1778
      <%
129 ghuddy 1779
      rsRep.Close
1780
      Set rsRep = nothing
1781
   End If
1782
 
119 ghuddy 1783
End Sub
1784
%>
1785
 
1786
<%
1787
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1788
'==================================================================================
129 ghuddy 1789
' Report Name      :    Build History
1790
' Description      :   List packages which were build between certain dates.
1791
' INPUT            :
119 ghuddy 1792
'==================================================================================
1793
Sub Build_History ( SSsection, NNproj_id, NNrtag_id)
129 ghuddy 1794
   Dim Query_String, rsRep, rsQry
1795
   Const Allow_All = TRUE
1796
   Const Disallow_All = FALSE
119 ghuddy 1797
 
129 ghuddy 1798
   If NNproj_id = "" Then NNproj_id = -1
1799
   If NNrtag_id = "" Then NNrtag_id = -1
119 ghuddy 1800
 
129 ghuddy 1801
   If SSsection = "TITLE" Then
1802
      Response.write "Build History"
1803
      Exit Sub
1804
   End If
119 ghuddy 1805
 
129 ghuddy 1806
 
1807
   If SSsection = "FORM" Then
1808
      %>
1809
      <script language="JavaScript" src="images/calendar.js"></script>
1810
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1811
         <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">
1812
            <tr>
1813
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1814
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1815
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1816
            </tr>
1817
            <tr>
1818
               <td nowrap class="form_field">&nbsp;</td>
1819
               <td align="right" nowrap class="form_field">Release</td>
1820
               <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
1821
            </tr>
1822
            <tr>
1823
               <td colspan="3" nowrap class="form_field">Between
1824
               <input type="text" name="FRinitdate" maxlength="10" size="12" value="<%=Request.Form("FRinitdate")%>">
1825
               <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>
1826
               And
1827
               <input type="text" name="FRduedate" maxlength="10" size="12" value="<%=Request.Form("FRduedate")%>">
1828
               <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>
1829
            </tr>
1830
            <tr>
1831
               <td nowrap class="form_field">&nbsp;</td>
1832
               <td align="right" nowrap class="form_field">&nbsp;</td>
1833
               <td><br>
1834
                  <input type="hidden" name="group" value="<%=parGroup%>">
1835
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1836
                  <input type="hidden" name="action" value="true">
1837
                  <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">
1838
               </td>
1839
            </tr>
1840
         </form>
1841
      </table>
1842
      <p>
1843
      <%   Exit Sub
1844
   End If
1845
 
1846
 
1847
   If SSsection = "BODY" Then
1848
      If NOT CBool(Request("action")) Then Exit Sub
1849
      %>
1850
      </p>
1851
      <table width="20%" border="0" cellspacing="0" cellpadding="2">
1852
         <tr>
1853
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
1854
            <td width="5%" nowrap class="body_colb">Package</td>
1855
            <td width="95%" nowrap class="body_colb">Version</td>
1856
         </tr>
1857
         <tr>
1858
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
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
         </tr>
1862
         <%
1863
         Dim currView_id
1864
         currView_id = -1
1865
 
1866
         OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1867
         OraDatabase.Parameters.Add "INITDATE", Request.Form("FRinitdate"), ORAPARM_INPUT, ORATYPE_STRING
1868
         OraDatabase.Parameters.Add "DUEDATE", Request.Form("FRduedate"), ORAPARM_INPUT, ORATYPE_STRING
1869
 
1870
         Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("rep_build_history.sql"), cint(0) )
1871
 
1872
         If rsRep.RecordCount = 0 Then
1873
            With Response
1874
               .write "<tr>"
1875
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
1876
               .write "</tr>"
1877
            End With
1878
         End If
1879
 
1880
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
1881
            ' -------- GROUP BY BASE VIEW  -----------------
1882
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
1883
               %>
1884
               <tr>
1885
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1886
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1887
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1888
               </tr>
1889
 
1890
               <tr>
1891
                  <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
1892
                  <td>&nbsp;</td>
1893
                  <td>&nbsp;</td>
1894
               </tr>
1895
 
1896
               <%
1897
               currView_id = CDbl(rsRep("view_id"))
1898
            End If
1899
            ' -------- END GROUP ------------------------
1900
            %>
1901
            <tr>
1902
               <td width="1%" nowrap class="body_colb">&nbsp;</td>
1903
               <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>
1904
               <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>
1905
            </tr>
1906
            <%  rsRep.MoveNext
1907
         WEnd
1908
         %>
1909
         <tr>
1910
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1911
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1912
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
1913
         </tr>
1914
      </table>
1915
      <p>&nbsp;     </p>
1916
      <p>        <!-- PRINT, SAVE, ETC. ------------>
119 ghuddy 1917
      <%If parPrint = "" Then%>
129 ghuddy 1918
         <br>
1919
         <br>
1920
         <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>
1921
         <br>
119 ghuddy 1922
      <%End If%>
1923
      <!-- PRINT, SAVE, ETC. END -------->
1924
      <%
129 ghuddy 1925
      rsRep.Close
1926
      Set rsRep = nothing
1927
   End If
1928
 
119 ghuddy 1929
End Sub
1930
%>
1931
<%
1932
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
1933
'==================================================================================
129 ghuddy 1934
' Report Name      :    Escrow Report
1935
' Description      :   Report to extract Products/Patches for Building A RoadMap
1936
' INPUT            :
119 ghuddy 1937
'==================================================================================
1938
Sub Escrow_Report (SSsection, NNproj_id, NNrtag_id, NNbom_id, NNversion)
129 ghuddy 1939
   Dim Query_String, rsRep, rsQry
1940
   Const Allow_All = TRUE
1941
   Const Disallow_All = FALSE
119 ghuddy 1942
 
129 ghuddy 1943
   If NNproj_id = "" Then NNproj_id = -1
1944
   If NNrtag_id = "" Then NNrtag_id = -1
1945
   If NNversion = "" Then NNversion = -1
119 ghuddy 1946
 
129 ghuddy 1947
   If SSsection = "TITLE" Then
1948
      Response.write "Generation of ESCROW REPORT"
1949
      Exit Sub
1950
   End If
119 ghuddy 1951
 
1952
 
129 ghuddy 1953
   If SSsection = "FORM" Then
1954
      %>
1955
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
1956
         <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">
1957
            <tr>
1958
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
1959
               <td width="1%" align="right" nowrap class="form_field">Project</td>
1960
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
1961
            </tr>
1962
            <tr>
1963
               <td nowrap class="form_field">&nbsp;</td>
1964
               <td align="right" nowrap class="form_field">Release</td>
1965
               <td><%Call Get_Branches ( NNproj_id, NNrtag_id, Disallow_All )%></td>
1966
            </tr>
1967
            <tr>
1968
               <td nowrap class="form_field">&nbsp;</td>
1969
               <td align="right" nowrap class="form_field">SBOM Version</td>
1970
               <td><%Call Get_SBOM_Version ( NNproj_id, NNrtag_id, Disallow_All, NNversion )%></td>
1971
            </tr>
1972
            <tr>
1973
               <td nowrap class="form_field">&nbsp;</td>
1974
               <td align="right" nowrap class="form_field">&nbsp;</td>
1975
               <td><br>
1976
                  <input type="hidden" name="group" value="<%=parGroup%>">
1977
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
1978
                  <input type="hidden" name="FRrtag_id" value="<%=NNrtag_id%>">
1979
                  <input type="hidden" name="action" value="true">
1980
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
1981
               </td>
1982
            </tr>
1983
         </form>
1984
      </table>
1985
      <p>
1986
      <%   Exit Sub
1987
   End If
119 ghuddy 1988
 
129 ghuddy 1989
   OraDatabase.Parameters.Add "BRANCH_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1990
   OraDatabase.Parameters.Add "BOM_VERSION", Request("FRVersion"), ORAPARM_INPUT, ORATYPE_STRING
1991
   Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("rep_SBOM.sql"), cint(0))
1992
   Dim bomId, ext
1993
   bomId = rsQry("bom_id")
1994
   Set rsQry = OraDatabase.DbCreateDynaset( "select * from release_manager.project_extentions where proj_id="&NNproj_id, cint(0))
1995
   ext = rsQry("ext_name")
1996
   rsQry.close
1997
   Set rsQry = nothing
119 ghuddy 1998
 
129 ghuddy 1999
   If SSsection = "BODY" Then
2000
      If NOT CBool(Request("action")) Then Exit Sub
119 ghuddy 2001
 
129 ghuddy 2002
      '---------------------- Run Before Page ---------------------------
2003
      Call GetReleaseContent ( bomId, objReleaseContent )
119 ghuddy 2004
 
129 ghuddy 2005
      'Call   GetBomDetails   (bomId, outobjDetails)
2006
      'outobjDetails.Item("bom_full_version") = outobjDetails.Item("bom_name")&"   "&   outobjDetails.Item("bom_version") &"."& outobjDetails.Item("bom_lifecycle")
119 ghuddy 2007
 
129 ghuddy 2008
 
2009
      '------------------------------------------------------------------
2010
      %>
2011
      <html>
2012
      <head>
2013
      <title>Release Manager - Escrow Report</title>
2014
      <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
2015
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
2016
      </head>
2017
      <body>
2018
      <div align="center"><b><font col color="#FF0000" size="+3"><%=outobjDetails.Item("bom_full_version")%></font></b></div>
2019
      <div align="center"><b><font col color="#FF0000" size="+3">Products</font></b></div>
2020
      <%
2021
      Set outobjDetails = Nothing
2022
 
2023
      aReleaseContent = objReleaseContent.Keys
2024
      For Each parPv_id In aReleaseContent
2025
         pvIdList = pvIdList +   parPv_id   +   ","
2026
         Call GetPackageInformation ( parPv_id, objPackageDetails )
2027
         Response.Flush
2028
         %>
2029
         <a name="<%=objPackageDetails.Item("pkg_name")%>"></a>
2030
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2031
            <tr>
2032
               <td class="body_colb"><h3><%=objPackageDetails.Item("pkg_name")%></h3></td>
2033
            </tr>
2034
         </table>
2035
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2036
            <tr>
2037
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Version:</strong></td>
2038
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_version")%></td>
2039
            </tr>
2040
            <tr>
2041
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Path:</strong> </td>
2042
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("src_path")%></td>
2043
            </tr>
2044
            <tr>
2045
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Label:</strong></td>
2046
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_label")%></td>
2047
            </tr>
2048
            <tr>
2049
               <td width="1%" nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Short Description:</strong></td>
2050
               <td witdh="100%" bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_description") ) )%></td>
2051
            </tr>
2052
            <tr>
2053
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Package Overview:</strong> </td>
2054
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_overview") ) )%></td>
2055
            </tr>
2056
            <tr>
2057
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>General Sublicense Material:</strong> </td>
2058
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("v_ext") = ext Then%>Yes<%Else%>No<%End If%></td>
2059
            </tr>
2060
            <tr>
2061
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Environment:</strong> </td>
2062
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("is_build_env_required") = enumDB_NO Then%>Not Required.<%End If%>
2063
                  <%
2064
                  '--- Get Build Env Details
2065
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Std ( parPv_id ), cint(0))
2066
                  If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
2067
                     BldStd = rsQry("bs_name")
2068
                     rsQry.Close
2069
 
2070
                     Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Env ( parPv_id ), cint(0))
2071
                     %>
2072
                     <ul>
2073
                     <%
2074
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2075
                     %>
2076
                        <li><%=BldStd%>, <%=rsQry("bm_name")%></li>
2077
                        <%rsQry.MoveNext
2078
                     WEnd
2079
                     %>
2080
                     </ul>
2081
                  <%End If%>
2082
               </td>
2083
            </tr>
2084
            <tr>
2085
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Dependencies:</strong> </td>
2086
               <td bgcolor="#FFFFFF" class="sublbox_txt">
2087
                  <%
2088
                  '--- Get Build Dependencies Details
2089
 
2090
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Dependencies ( parPv_id ), cint(0))
2091
                  %>
2092
                  <table width="100%"  cellspacing="0" cellpadding="2" border="1">
2093
                     <tr>
2094
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="1%"><strong>Software Component</strong></td>
2095
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="100%"><strong>Version</strong></td>
2096
                     </tr>
2097
                     <%If rsQry.RecordCount < 1 Then%>
2098
                        <tr>
2099
                           <td nowrap class="sublbox_txt">No Dependencies</td>
2100
                           <td nowrap class="sublbox_txt"></td>
2101
                        </tr>
2102
                     <%End If%>
2103
                     <%
2104
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2105
                        %>
2106
                        <tr>
2107
                           <td nowrap class="sublbox_txt"><a href="#<%=rsQry("pkg_name")%>"><%=rsQry("pkg_name")%></a></td>
2108
                           <td nowrap class="sublbox_txt"><%=rsQry("pkg_version")%></td>
2109
                        </tr>
2110
                        <%rsQry.MoveNext
2111
                     WEnd
2112
                     %>
2113
                  </table>
2114
               </td>
2115
            </tr>
2116
         </table>
2117
         <br><br>
2118
         <%
2119
      'Exit For
2120
      Next
2121
 
2122
      pvIdList = Mid(pvIdList, 1, Len(pvIdList) - 1)
2123
      Set   rsTemp   =   OraDatabase.DbCreateDynaset( SQL_Modules ( pvIdList ), cint(0))
2124
 
2125
      %>
2126
      <div align="center"><b><font col color="#FF0000" size="+3">Modules</font></b></div>
2127
      <%
2128
      While (NOT rsTemp.BOF) AND (NOT rsTemp.EOF)
2129
         Response.Flush
2130
 
2131
         dpv_id = rsTemp("dpv_id")
2132
         Call GetPackageInformation ( dpv_id, objPackageDetails )
2133
         %>
2134
         <a name="<%=objPackageDetails.Item("pkg_name")%>"></a>
2135
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2136
            <tr>
2137
               <td class="body_colb"><h3><%=objPackageDetails.Item("pkg_name")%></h3></td>
2138
            </tr>
2139
         </table>
2140
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
2141
            <tr>
2142
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Version:</strong></td>
2143
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_version")%></td>
2144
            </tr>
2145
            <tr>
2146
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Path:</strong> </td>
2147
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("src_path")%></td>
2148
            </tr>
2149
            <tr>
2150
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Source Label:</strong></td>
2151
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=objPackageDetails.Item("pkg_label")%></td>
2152
            </tr>
2153
            <tr>
2154
               <td width="1%" nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Short Description:</strong></td>
2155
               <td witdh="100%" bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_description") ) )%></td>
2156
            </tr>
2157
            <tr>
2158
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Package Overview:</strong> </td>
2159
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%=NewLine_To_BR ( To_HTML( objPackageDetails.Item("pv_overview") ) )%></td>
2160
            </tr>
2161
            <tr>
2162
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>General Sublicense Material:</strong> </td>
2163
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("v_ext") = parExt Then%>Yes<%Else%>No<%End If%></td>
2164
            </tr>
2165
            <tr>
2166
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Environment:</strong> </td>
2167
               <td bgcolor="#FFFFFF" class="sublbox_txt"><%If objPackageDetails.Item("is_build_env_required") = enumDB_NO Then%>Not Required.<%End If%>
2168
                  <%
2169
                  '--- Get Build Env Details
2170
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Std ( dpv_id ), cint(0))
2171
                  If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
2172
                     BldStd = rsQry("bs_name")
2173
                     rsQry.Close
2174
 
2175
                     Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Env ( dpv_id ), cint(0))
2176
                     %>
2177
                     <ul>
2178
                        <%
2179
                        While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2180
                           %>
2181
                           <li><%=BldStd%>, <%=rsQry("bm_name")%></li>
2182
                           <%rsQry.MoveNext
2183
                        WEnd
2184
                        %>
2185
                     </ul>
2186
                  <%End If%>
2187
               </td>
2188
            </tr>
2189
            <tr>
2190
               <td nowrap bgcolor="#FFFFFF" class="sublbox_txt" valign="top"><strong>Build Dependencies:</strong> </td>
2191
               <td bgcolor="#FFFFFF" class="sublbox_txt">
2192
                  <%
2193
                  '--- Get Build Dependencies Details
2194
 
2195
                  Set rsQry = OraDatabase.DbCreateDynaset( SQL_Build_Dependencies ( dpv_id ), cint(0))
2196
                  %>
2197
                  <table width="100%"  cellspacing="0" cellpadding="2" border="1">
2198
                     <tr>
2199
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="1%"><strong>Software Component</strong></td>
2200
                        <td nowrap class="sublbox_txt" bgcolor="#FFFFFF" width="100%"><strong>Version</strong></td>
2201
                     </tr>
2202
                     <%If rsQry.RecordCount < 1 Then%>
2203
                        <tr>
2204
                           <td nowrap class="sublbox_txt">No Dependencies</td>
2205
                           <td nowrap class="sublbox_txt"></td>
2206
                        </tr>
2207
                     <%End If%>
2208
                     <%
2209
                     While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
2210
                        %>
2211
                        <tr>
2212
                           <td nowrap class="sublbox_txt"><a href="#<%=rsQry("pkg_name")%>"><%=rsQry("pkg_name")%></a></td>
2213
                           <td nowrap class="sublbox_txt"><%=rsQry("pkg_version")%></td>
2214
                        </tr>
2215
                        <%rsQry.MoveNext
2216
                     WEnd
2217
                     %>
2218
                  </table>
2219
               </td>
2220
            </tr>
2221
         </table>
2222
         <br><br>
2223
 
2224
         <%
2225
         rsTemp.MoveNext
2226
      WEnd
2227
 
2228
      rsTemp.Close()
2229
      Set rsTemp = Nothing
2230
   End If
119 ghuddy 2231
End Sub
2232
%>
2233
 
2234
<%
2235
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2236
'==================================================================================
129 ghuddy 2237
' Report Name      :    AutoBuildable_Report
2238
' Description      :   List packages which were build between certain dates.
2239
' INPUT            :
119 ghuddy 2240
'==================================================================================
2241
Sub AutoBuildable_Report ( SSsection, NNproj_id, NNrtag_id)
129 ghuddy 2242
   Dim Query_String, rsRep, rsQry
2243
   Const Allow_All = TRUE
2244
   Const Disallow_All = FALSE
119 ghuddy 2245
 
129 ghuddy 2246
   If NNproj_id = "" Then NNproj_id = -1
2247
   If NNrtag_id = "" Then NNrtag_id = -1
119 ghuddy 2248
 
129 ghuddy 2249
   If SSsection = "TITLE" Then
2250
      Response.write "Release AutoBuildable Status"
2251
      Exit Sub
2252
   End If
119 ghuddy 2253
 
2254
 
129 ghuddy 2255
   If SSsection = "FORM" Then
2256
      %>
2257
      <script language="JavaScript" src="images/calendar.js"></script>
2258
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
2259
         <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">
2260
            <tr>
2261
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
2262
               <td width="1%" align="right" nowrap class="form_field">Project</td>
2263
               <td width="100%"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
2264
            </tr>
2265
            <tr>
2266
               <td nowrap class="form_field">&nbsp;</td>
2267
               <td align="right" nowrap class="form_field">Release</td>
2268
               <td><%Call Get_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
2269
            </tr>
2270
            <tr>
2271
               <td nowrap class="form_field">&nbsp;</td>
2272
               <td align="right" nowrap class="form_field">&nbsp;</td>
2273
               <td><br>
2274
                  <input type="hidden" name="group" value="<%=parGroup%>">
2275
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
2276
                  <input type="hidden" name="action" value="true">
2277
                  <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">
2278
               </td>
2279
            </tr>
2280
      </table>
2281
      <p>
2282
      <%   Exit Sub
2283
   End If
119 ghuddy 2284
 
2285
 
129 ghuddy 2286
   If SSsection = "BODY" Then
2287
      If NOT CBool(Request("action")) Then Exit Sub
2288
      If Request("btn") = "Assign" Then
2289
         OraDatabase.Parameters.Add "RTAG_ID",       NNrtag_id,   ORAPARM_INPUT, ORATYPE_NUMBER
2290
         OraDatabase.Parameters.Add "PV_ID_LIST",   Request("prod_id_list"),   ORAPARM_INPUT, ORATYPE_VARCHAR2
119 ghuddy 2291
 
129 ghuddy 2292
         objEH.TryORA ( OraSession )
2293
         On Error Resume Next
2294
 
2295
         OraDatabase.ExecuteSQL _
2296
         "BEGIN  SET_TO_AUTOBUILDABLE( :RTAG_ID, :PV_ID_LIST );  END;"
2297
 
2298
         objEH.CatchORA ( OraSession )
2299
 
2300
         OraDatabase.Parameters.Remove "PV_ID_LIST"
2301
         OraDatabase.Parameters.Remove "RTAG_ID"
2302
 
2303
      End   If
2304
      %>
2305
      </p>
2306
      <table width="20%" border="0" cellspacing="0" cellpadding="2">
2307
         <tr>
2308
            <td width="1%" nowrap class="body_colb">Base View</td>
2309
            <td width="5%" nowrap class="body_colb">Package</td>
2310
            <td width="95%" nowrap class="body_colb">Version</td>
2311
            <td width="95%" nowrap class="body_colb">Autobuildable</td>
2312
         </tr>
2313
         <tr>
2314
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
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
         </tr>
2319
         <%
2320
         Dim currView_id
2321
         currView_id = -1
2322
 
2323
         OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
2324
 
2325
         Set rsRep = OraDatabase.DbCreateDynaset( "SELECT * FROM RELEASE_CONTENT rc, VIEWS vw, PACKAGES pkg, PACKAGE_VERSIONS pv "&_
2326
            " WHERE pv.pv_id = rc.pv_id and rc.base_view_id   "&_
2327
            " = 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) )
2328
         If rsRep.RecordCount = 0 Then
2329
            With Response
2330
               .write "<tr>"
2331
               .write "<td colspan='5' class='body_row'>Found 0 records</td>"
2332
               .write "</tr>"
2333
            End With
2334
         End If
2335
 
2336
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
2337
            ' -------- GROUP BY BASE VIEW  -----------------
2338
            If CDbl(currView_id) <> CDbl(rsRep("view_id")) Then
2339
               %>
2340
               <tr>
2341
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2342
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2343
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2344
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2345
               </tr>
2346
 
2347
               <tr>
2348
                  <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
2349
                  <td>&nbsp;</td>
2350
                  <td>&nbsp;</td>
2351
               </tr>
2352
 
2353
               <%
2354
               currView_id = CDbl(rsRep("view_id"))
2355
            End If
2356
            ' -------- END GROUP ------------------------
2357
            %>
2358
            <%If rsRep("is_autobuildable") = "Y" Then%>
2359
               <tr>
2360
                  <td width="1%" nowrap class="body_colb">&nbsp;</td>
2361
                  <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>
2362
                  <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>
2363
                  <%If objAccessControl.IsVisible( "SetToReproducible" ) Then%>
2364
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>" checked></td>
2365
                  <%Else%>
2366
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>" checked disabled></td>
2367
                  <%End If%>
2368
               </tr>
2369
            <%Else%>
2370
               <tr>
2371
                  <td width="1%" nowrap class="body_colb">&nbsp;</td>
2372
                  <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>
2373
                  <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>
2374
                  <%If objAccessControl.IsVisible( "SetToReproducible" ) Then%>
2375
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>"></td>
2376
                  <%Else%>
2377
                     <td><input type="checkbox" name="prod_id_list" value="<%=rsRep("pv_id")%>" disabled></td>
2378
                  <%End If%>
2379
               </tr>
2380
            <%End If%>
2381
 
2382
 
2383
            <%  rsRep.MoveNext
2384
         WEnd
2385
         %>
2386
 
2387
         <tr>
2388
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2389
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2390
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2391
            <%If objAccessControl.IsVisible( "SetToReproducible" ) Then%>
2392
               <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>
2393
            <%End If%>
2394
         </tr>
2395
      </table>
2396
      </form>
2397
      <p>&nbsp;     </p>
2398
      <p>        <!-- PRINT, SAVE, ETC. ------------>
119 ghuddy 2399
      <%If parPrint = "" Then%>
129 ghuddy 2400
         <br>
2401
         <br>
2402
         <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>
2403
         <br>
2404
 
119 ghuddy 2405
      <%End If%>
2406
      <!-- PRINT, SAVE, ETC. END -------->
2407
      <%
129 ghuddy 2408
      OraDatabase.Parameters.Remove "RTAG_ID"
2409
      rsRep.Close()
2410
      Set rsRep = nothing
2411
   End If
2412
 
119 ghuddy 2413
End Sub
129 ghuddy 2414
%>
119 ghuddy 2415
 
2416
<%
2417
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2418
'==================================================================================
129 ghuddy 2419
' Report Name      :    Unit Tests per Package
2420
' Description      :   List unit tests per package showing the unit test completeness
2421
' INPUT            :   Project, Vesion Tree, Release Label, Base View, Level of Completeness, Show/Hide Dependencies, PV_ID
119 ghuddy 2422
'==================================================================================
2423
Sub Unit_Tests_Per_Package ( sSection, nProj_id,  nRtag_id, nBase_view_id, nLevel_of_complete, nShow_dependencies, nPv_id )
129 ghuddy 2424
   Dim Query_String, rsRep
2425
   Const Allow_All = TRUE
2426
   Const Disallow_All = FALSE
119 ghuddy 2427
 
129 ghuddy 2428
   If nProj_id = "" Then nProj_id = -1
2429
   If nRtag_id = "" Then nRtag_id = -1
2430
   If nShow_dependencies = "" Then nShow_dependencies = 0
2431
   If nPv_id = "" Then nPv_id = -1
119 ghuddy 2432
 
129 ghuddy 2433
   If sSection = "TITLE" Then
2434
      Response.write "Unit Tests per Package"
2435
      Exit Sub
2436
   End If
2437
 
2438
 
2439
   If sSection = "FORM" Then
2440
      %>
2441
 
2442
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
2443
         <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">
2444
            <tr>
2445
               <td width="1%" nowrap class="form_field"><img src="images/spacer.gif" width="30" height="8"></td>
2446
               <td width="1%" align="right" nowrap class="form_field">Project</td>
2447
               <td width="100%"><%Call Get_Projects( nProj_id, Disallow_All )%></td>
2448
            </tr>
2449
            <tr>
2450
               <td nowrap class="form_field">&nbsp;</td>
2451
               <td align="right" nowrap class="form_field">Release</td>
2452
               <td><%Call Get_Release_Labels ( nProj_id,  nRtag_id, Disallow_All )%></td>
2453
            </tr>
2454
            <tr>
2455
               <td nowrap class="form_field">&nbsp;</td>
2456
               <td align="right" nowrap class="form_field">Base View</td>
2457
               <td><%Call Get_Base_Views ( nRtag_id, nBase_view_id, Allow_All )%></td>
2458
            </tr>
2459
            <tr>
2460
               <td nowrap class="form_field">&nbsp;</td>
2461
               <td align="right" nowrap class="form_field">Show Dependencie's Unit Tests</td>
2462
               <td><input type="checkbox" name="FRshow_deps" value="1" <%If nShow_dependencies <> 0 Then%>checked<%End If%>></td>
2463
            </tr>
2464
            <tr>
2465
               <td nowrap class="form_field">&nbsp;</td>
2466
               <td align="right" nowrap class="form_field">&nbsp;</td>
2467
               <td><br>
2468
                  <input type="hidden" name="group" value="<%=parGroup%>">
2469
                  <input type="hidden" name="repnum" value="<%=parRepNum%>">
2470
                  <input type="hidden" name="FRtest_complete" value="0">
2471
                  <input type="hidden" name="action" value="true">
2472
                  <input name="Submit" type="submit" class="form_btn" value="Submit">
2473
               </td>
2474
            </tr>
2475
         </form>
2476
      </table>
2477
      <%   Exit Sub
2478
   End If
2479
 
2480
 
2481
   If sSection = "BODY" Then
2482
      If NOT CBool(Request("action")) Then Exit Sub
2483
 
2484
      Query_String = ReadFile( rootPath & "queries\rep_unit_tests_per_package.sql" )
2485
 
2486
      OraDatabase.Parameters.Add "RTAG_ID",       nRtag_id,       ORAPARM_INPUT, ORATYPE_NUMBER
2487
      OraDatabase.Parameters.Add "BASE_VIEW",    nBase_view_id,    ORAPARM_INPUT, ORATYPE_NUMBER
2488
      OraDatabase.Parameters.Add "COMPLETENESS",    nLevel_of_complete, ORAPARM_INPUT, ORATYPE_NUMBER
2489
      OraDatabase.Parameters.Add "SHOW_DEPS",    nShow_dependencies, ORAPARM_INPUT, ORATYPE_NUMBER
2490
      OraDatabase.Parameters.Add "PV_ID",       nPv_id,       ORAPARM_INPUT, ORATYPE_NUMBER
2491
      %>
2492
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
2493
         <tr>
2494
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
2495
            <td width="1%" nowrap class="body_colb">&nbsp;</td>
2496
            <td width="1%" nowrap class="body_colb">Package Name&nbsp;&nbsp;&nbsp;</td>
2497
            <td width="1%" nowrap class="body_colb">Version&nbsp;&nbsp;&nbsp;</td>
2498
            <td width="1%" nowrap class="body_colb">Test Name&nbsp;&nbsp;&nbsp;</td>
2499
            <td width="100%" nowrap class="body_colb">Test Summary&nbsp; </td>
2500
            <td width="1%" nowrap class="body_colb"></td>
2501
            <td width="1%" nowrap class="body_colb">Stamp</td>
2502
            <td width="1%" nowrap class="body_colb">Test Completed &nbsp;&nbsp;&nbsp;</td>
2503
         </tr>
2504
         <tr>
2505
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2506
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2507
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2508
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2509
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2510
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2511
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2512
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2513
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2514
         </tr>
2515
         <%
2516
         Dim currBase_view_id, currPv_id, currDpv_id, showTests
2517
         currBase_view_id = -1
2518
         currPv_id = -1
2519
         currDpv_id = -1
2520
 
2521
         Set rsRep = OraDatabase.DbCreateDynaset( Query_String, 0 )
2522
 
2523
         If rsRep.RecordCount = 0 Then
2524
            With Response
2525
               .write "<tr>"
2526
               .write "<td colspan='9' class='body_row'>Found 0 records</td>"
2527
               .write "</tr>"
2528
            End With
2529
         End If
2530
 
2531
         While ((NOT rsRep.BOF) AND (NOT rsRep.EOF))
2532
            If nShow_dependencies <> 0 Then
2533
               ' show dependency is ON
2534
               If rsRep("dpkg_name") = "------" Then
2535
                  showTests = FALSE
2536
               Else
2537
                  showTests = TRUE
2538
               End If
2539
            Else
2540
               showTests = TRUE
2541
            End If
2542
 
2543
            ' -------- GROUP BY BASE VIEW  -----------------
2544
            If CDbl(currBase_view_id) <> CDbl(rsRep("base_view_id")) Then
2545
               %>
2546
               <tr>
2547
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2548
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2549
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2550
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2551
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2552
                  <td background="images/bg_rep_line.gif"><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
               </tr>
2557
               <tr>
2558
                  <td valign="top" nowrap class="body_scol"><%=rsRep("view_name")%></td>
2559
                  <td>&nbsp;</td>
2560
                  <td>&nbsp;</td>
2561
                  <td>&nbsp;</td>
2562
                  <td>&nbsp;</td>
2563
                  <td>&nbsp;</td>
2564
                  <td>&nbsp;</td>
2565
                  <td>&nbsp;</td>
2566
                  <td>&nbsp;</td>
2567
               </tr>
2568
               <%
2569
               currBase_view_id = CDbl(rsRep("base_view_id"))
2570
            End If
2571
            ' -------- END GROUP BASE VIEW ------------------------
2572
            %>
2573
            <%
2574
            ' -------- GROUP BY PACKAGE  -----------------
2575
            If CDbl(currPv_id) <> CDbl(rsRep("pv_id")) Then
2576
               %>
2577
               <tr>
2578
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2579
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2580
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2581
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2582
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2583
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2584
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2585
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2586
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2587
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2588
               </tr>
2589
               <tr>
2590
                  <td>&nbsp;</td>
2591
                  <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>
2592
                  <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>
2593
                  <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>
2594
                  <td>&nbsp;</td>
2595
                  <td>&nbsp;</td>
2596
                  <td>&nbsp;</td>
2597
                  <td>&nbsp;</td>
2598
                  <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>
2599
               </tr>
2600
               <%
2601
               currPv_id = CDbl(rsRep("pv_id"))
2602
            End If
2603
            ' -------- END GROUP PACKAGE ------------------------
2604
            %>
2605
            <%
2606
            ' -------- GROUP BY DEPENDENCY  -----------------
2607
            If Not IsNull(rsRep("dpv_id")) Then
2608
               If CDbl(currDpv_id) <> CDbl(rsRep("dpv_id")) Then
2609
                  %>
2610
                  <tr>
2611
                     <td>&nbsp;</td>
2612
                     <td>&nbsp;</td>
2613
                     <td>&nbsp;</td>
2614
                     <td>&nbsp;</td>
2615
                     <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>
2616
                     <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>
2617
                     <td>&nbsp;</td>
2618
                     <td>&nbsp;</td>
2619
                     <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>
2620
                  </tr>
2621
                  <%
2622
                  currDpv_id = CDbl(rsRep("dpv_id"))
2623
               End If
2624
            End If
2625
            ' -------- END GROUP DEPENDENCY ------------------------
2626
            %>
2627
            <%If Not IsNull( rsRep("completed_by") ) AND showTests Then%>
2628
               <tr>
2629
                  <td>&nbsp;</td>
2630
                  <td>&nbsp;</td>
2631
                  <td>&nbsp;</td>
2632
                  <td>&nbsp;</td>
2633
                  <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>
2634
                  <td bgcolor="#F5F5F5" valign="top" class="body_row"><%=NewLine_To_BR ( To_HTML ( rsRep("test_summary") ) )%></td>
2635
                  <td bgcolor="#F5F5F5" align="center" valign="top">   </td>
2636
                  <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>
2637
                  <td>&nbsp;</td>
2638
               </tr>
2639
               <tr>
2640
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2641
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2642
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2643
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2644
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2645
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2646
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2647
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2648
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
2649
               </tr>
2650
            <%End If%>
2651
            <%  rsRep.MoveNext
2652
         WEnd
2653
         %>
2654
         <tr>
2655
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2656
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2657
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2658
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2659
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2660
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2661
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2662
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2663
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
2664
         </tr>
2665
      </table>
2666
 
2667
      <!-- PRINT, SAVE, ETC. ------------>
2668
      <%If parPrint = "" Then%>
2669
         <br>
2670
         <br>
2671
         <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>
2672
         <br>
2673
      <%End If%>
2674
      <!-- PRINT, SAVE, ETC. END -------->
2675
      <%
2676
      rsRep.Close
2677
      Set rsRep = nothing
2678
   End If
2679
 
119 ghuddy 2680
End Sub
129 ghuddy 2681
%>
159 ghuddy 2682
 
2683
 
2684
<%
2685
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2686
Function  Get_CQ_Issues ( SSsql, OOrsCQ )
2687
   If OOrsCQ.State = 1 Then
2688
      OOrsCQ.Close()
2689
   End If
2690
 
2691
   On Error Resume Next
2692
   OOrsCQ.ActiveConnection = CQ_conn
2693
   OOrsCQ.Source = SSsql
2694
   OOrsCQ.CursorType = 0
2695
   OOrsCQ.CursorLocation = 2
2696
   OOrsCQ.LockType = 3
2697
   OOrsCQ.Open()
2698
 
2699
   Get_CQ_Issues = Err.Number
2700
 
2701
End Function
2702
'----------------------------------------------------------------------------------------------------------------------------------------
2703
Function GetRMIssueState (NNpv_id, NNissId)
2704
   Dim rsTemp, Query_String
2705
   Dim s
2706
   Query_String = _
2707
   " SELECT (CASE WHEN iss_state = 0 THEN ' (O)' ELSE ' (F)' END) AS issState "&_
2708
   "   FROM cq_issues cq "&_
2709
   "  WHERE cq.pv_id = "& NNpv_id &_
2710
   "    AND cq.iss_id = "& NNissId
2711
 
2712
   Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
2713
 
2714
   s = ""
2715
   If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
2716
      s = (rsTemp.Fields("issState"))
2717
   End If
2718
 
2719
   rsTemp.Close
2720
   Set rsTemp = nothing
2721
 
2722
   GetRMIssueState = s
2723
End Function
2724
'----------------------------------------------------------------------------------------------------------------------------------------
2725
' Function returns the number of imported clearquest issues
2726
' and builds a string suitable for querying the clearquest issues database
2727
Function Get_Package_Issues ( NNpv_id, SSsql, DDfixedIss, DDnotesIssDict, nIssState )
2728
   Dim rsTemp, sqlstr, DEVIiss, TDSEiss, VT5DMiss, VTSUPiss, retVal
2729
 
2730
   sqlstr = "SELECT iss_db, iss_id, iss_state, notes FROM CQ_ISSUES WHERE pv_id="& NNpv_id &"  AND iss_state IN (" & nIssState & ")"
2731
 
2732
   Set rsTemp = OraDatabase.DbCreateDynaset( sqlstr, cint(0))
2733
   retVal = rsTemp.RecordCount
2734
 
2735
   DEVIiss  = "-1"
2736
   TDSEiss  = "-1"
2737
   VT5DMiss = "-1"
2738
   VTSUPiss = "-1"
2739
 
2740
   While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
2741
      If CInt(rsTemp("iss_db")) = CInt(enumCLEARQUEST_DEVI_ID) Then
2742
         DEVIiss = DEVIiss &","& rsTemp("iss_id")
2743
      ElseIf CInt(rsTemp("iss_db")) = CInt(enumCLEARQUEST_TDSE_ID) Then
2744
         TDSEiss = TDSEiss &","& rsTemp("iss_id")
2745
      ElseIf CInt(rsTemp("iss_db")) = CInt(enumCLEARQUEST_VT5DM_ID) Then
2746
         VT5DMiss = VT5DMiss &","& rsTemp("iss_id")
2747
      ElseIf CInt(rsTemp("iss_db")) = CInt(enumCLEARQUEST_VTSUP_ID) Then
2748
         VTSUPiss = VTSUPiss &","& rsTemp("iss_id")
2749
      End If
2750
 
2751
      rsTemp.MoveNext
2752
   WEnd
2753
 
2754
   ' Construct SQL statement for CQ database
2755
   SSsql = ReadFile( rootPath & "queries\cq_issues_rep1.sql" )
2756
   SSsql = Replace( SSsql, "/*enumCLEARQUEST_DEVI_ID*/", enumCLEARQUEST_DEVI_ID)
2757
   SSsql = Replace( SSsql, "/*enumCLEARQUEST_TDSE_ID*/", enumCLEARQUEST_TDSE_ID)
2758
   SSsql = Replace( SSsql, "/*enumCLEARQUEST_VT5DM_ID*/", enumCLEARQUEST_VT5DM_ID)
2759
   SSsql = Replace( SSsql, "/*enumCLEARQUEST_VTSUP_ID*/", enumCLEARQUEST_VTSUP_ID)
2760
   SSsql = Replace( SSsql, "/*DEVIiss*/", DEVIiss)
2761
   SSsql = Replace( SSsql, "/*TDSEiss*/", TDSEiss)
2762
   SSsql = Replace( SSsql, "/*VT5DMiss*/", VT5DMiss)
2763
   SSsql = Replace( SSsql, "/*VTSUPiss*/", VTSUPiss)
2764
 
2765
   rsTemp.Close()
2766
   Set rsTemp = nothing
2767
 
2768
   Get_Package_Issues = retVal
2769
 
2770
End Function
2771
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2772
Sub sdAdd( dict, key, value )
2773
   if IsNull(value) Then
2774
      dict.Add CStr(key),""
2775
   else
2776
      dict.Add CStr(key),CStr(value)
2777
   End If
2778
End Sub
2779
 
2780
Function sdItem( dict, i )
2781
   Dim a
2782
   Dim s
2783
   a = dict.Items
2784
   s = a(i)
2785
   sdItem=s
2786
End Function
2787
 
2788
Function sdKey( dict, i )
2789
   Dim a
2790
   a = dict.Keys
2791
   sdKey = a(i)
2792
End Function
2793
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2794
Function ReleaseDeviStatus_ReportCheckbox( width, NameAndValue, Label, bCheck )
2795
   Dim s
2796
   If (IsNull(Request(NameAndValue)) OR (Request(NameAndValue) = "")) AND (not bCheck) Then
2797
      s = "<td width=""" & width & """><INPUT Type=Checkbox  name=""" & NameAndValue & """ value=""" & NameAndValue & """>" & Label & "</td>"
2798
   Else
2799
      s = "<td width=""" & width & """><INPUT Type=Checkbox  CHECKED name=""" & NameAndValue & """ value=""" & NameAndValue & """>" & Label & "</td>"
2800
   End If
2801
   ReleaseDeviStatus_ReportCheckbox = s
2802
End Function
2803
 
2804
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2805
Function GetCQIssuesListFilter
2806
   Dim s
2807
   s = ""
2808
   If not (IsNull(Request("CB_FILTER_FIXED")) OR (Request("CB_FILTER_FIXED") = "")) Then
2809
      s = CStr(enumISSUES_STATE_FIXED)
2810
      If not (IsNull(Request("CB_FILTER_OUTSTANDING")) OR (Request("CB_FILTER_OUTSTANDING") = "")) Then
2811
         s = s & "," & CStr(enumISSUES_STATE_IMPORTED)
2812
      End If
2813
   Else
2814
      If not (IsNull(Request("CB_FILTER_OUTSTANDING")) OR (Request("CB_FILTER_OUTSTANDING") = "")) Then
2815
         s = CStr(enumISSUES_STATE_IMPORTED)
2816
      End If
2817
   End If
2818
   GetCQIssuesListFilter = s
2819
End Function
2820
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2821
Function GetPkgNameAndVersion(SSPvId, SSPkgNameAndVer)
2822
   Dim SSpkgID, SSpkgName, SSpkgVersion, SSsrc_path, SSpkgDesc, BBdlocked
2823
   SSpkgID      = ""
2824
   SSpkgName    = ""
2825
   SSpkgVersion = ""
2826
   SSsrc_path   = ""
2827
   SSpkgDesc    = ""
2828
   BBdlocked    = 0
2829
   Call Get_Pkg_Short_Info( SSPvId, SSpkgID, SSpkgName, SSpkgVersion, SSsrc_path, SSpkgDesc, BBdlocked )
2830
   If not ((SSpkgName = "") and (SSpkgVersion = "")) Then
2831
      SSPkgNameAndVer = SSpkgName & " " & SSpkgVersion
2832
      GetPkgNameAndVersion = True
2833
   Else
2834
      SSPkgNameAndVer = ""
2835
      GetPkgNameAndVersion = False
2836
   End If
2837
End Function
2838
'-------------------------------------------------------------------------------------------------------------------------------------------------------------------
2839
'==================================================================================
2840
' Report Name      :   ReleaseDeviStatus_Report
2841
' Description      :   List DEVIs for all Package Versions in a Release
2842
' INPUT            :
2843
'==================================================================================
2844
Sub ReleaseDeviStatus_Report ( SSsection, NNproj_id, NNrtag_id)
2845
   Dim rsCQQry                   ' Query for the CLEARQUEST database
2846
   Dim rsRMQry                   ' Query for the RELEASE MANAGER database
2847
   Dim SQLstr                    ' String to contain a query
2848
   Dim issueCnt                  ' Records how many CQ issues were found for a given RM package version
2849
   Dim retVal                    ' General return value
2850
   Dim isFirstDeviRow            ' HTML rendering helper
2851
   Dim isRowOpen                 ' HTML rendering helper
2852
   Dim dict_Iss_Id_to_Iss_Num    ' Dictionaries populated during the formation of the package DEVI list
2853
   Dim dict_Iss_Id_to_Iss_DB     '   creation, supporting the generation of the DEVI details list.
2854
   Dim dict_Iss_Id_to_Risk
2855
   Dim dict_Iss_Id_to_Summary
2856
   Dim dict_Iss_Id_to_CodeRev
2857
   Dim dict_Iss_Id_to_IntNotes
2858
   Dim dict_Iss_Id_to_RelDBPatches
2859
   Dim dict_Iss_Id_to_Pkg
2860
   Dim dict_Iss_Id_to_PvId
2861
   Dim dict_Iss_Id_to_Iss_Status
2862
   Dim dict_Iss_Id_to_Iss_Type
2863
   Dim dict_Iss_Id_to_Aff_Pkg
2864
   Dim i,j,k                     ' General loop vars
2865
   Dim s,strIn,strOut,sDisplay   ' General string vars
2866
   Dim a                         ' General array var
2867
   Dim pkgArr                    ' Holds an array of CSV strings listing RM package names, 1 array element per unique CQ issue found
2868
   Dim pkgCsv                    ' Holds a single CSV string listing RM package names, related to a single unique CQ issue
2869
   Dim pvIdArr                   ' Holds an array of CSV strings listing RM package PV IDs, 1 array element per unique CQ issue found
2870
   Dim pvIdCsv                   ' Holds a single CSV string listing RM package PV IDs, related to a single unique CQ issue
2871
   Dim crRefArr                  ' Holds an array of code review reference strings
2872
   Dim relDbPatchArr             ' Holds an array of related DB patch strings
2873
   Dim sqlTblCnt                 ' Counts the number of tables in the RM query string
2874
   Dim FSO                       ' File System Object
2875
   Dim NewTextFile               ' File Object
2876
   Dim emailReport               ' Boolean flag signalling email generation
2877
   Dim cqFilterStr               ' Fixed and/or Outstanding Issues Filter for RM Query
2878
   Dim cbWIPChecked              ' Default checkbox states
2879
   Dim cbPendingChecked
2880
   Dim cbReleasedChecked
2881
   Dim cbFixed
2882
   Dim cbOutstanding
2883
   Dim cbWithoutIssues
2884
   Dim cbTraverseRipples
2885
   Dim reObj                     ' regular expression object
2886
   Dim reObjMatch
2887
   Dim NumPkgsListed             ' Stats collection vars
2888
   Dim NumIssuesListed
2889
   Dim parRipDate                ' traverse ripple limit date
2890
   Dim lastNonRipplePvId         ' pv_id after ripple version traversal
2891
   Dim cqIssId                   ' clearquest database ID for a given issue (not a human readable number)
2892
 
2893
   Const Allow_All = TRUE
2894
   Const Disallow_All = FALSE
2895
 
2896
   NumPkgsListed = 0
2897
   NumIssuesListed = 0
2898
 
2899
   If NNproj_id = "" Then NNproj_id = -1
2900
   If NNrtag_id = "" Then NNrtag_id = -1
2901
 
2902
   If SSsection = "TITLE" Then
2903
      Response.write "Release DEVI Status"
2904
      Exit Sub
2905
   End If
2906
 
2907
   ' Determine if we have to assert default check status on one of the checkboxes
2908
   cbWIPChecked      = False
2909
   cbPendingChecked  = False
2910
   cbReleasedChecked = False
2911
   cbFixed           = False
2912
   cbOutstanding     = False
2913
   cbWithoutIssues   = False
2914
   cbTraverseRipples = False
2915
   If  (IsNull(Request("CB_FILTER_WIP")) OR (Request("CB_FILTER_WIP") = "")) _
2916
   and (IsNull(Request("CB_FILTER_PENDING")) OR (Request("CB_FILTER_PENDING") = "")) _
2917
   and (IsNull(Request("CB_FILTER_RELEASED")) OR (Request("CB_FILTER_RELEASED") = "")) Then
2918
      cbWIPChecked = True
2919
   End If
2920
   If  (IsNull(Request("CB_FILTER_FIXED")) OR (Request("CB_FILTER_FIXED") = "")) _
2921
   and (IsNull(Request("CB_FILTER_OUTSTANDING")) OR (Request("CB_FILTER_OUTSTANDING") = "")) Then
2922
      cbFixed = True
2923
   End If
2924
 
2925
   If (IsNull(Request("FRripdate")) OR (Request("FRripdate") = "")) Then
2926
      parRipDate = EuroDate(DateAdd("d",-31,Date))
2927
   Else
2928
      parRipDate = Request("FRripdate")
2929
   End If
2930
 
2931
   If SSsection = "FORM" Then
2932
      %>
2933
      <script language="JavaScript" src="images/calendar.js"></script>
2934
      <table width="100%" border="0" cellpadding="2" cellspacing="1">
2935
         <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">
2936
            <table width="100%" border="0" cellpadding="2" cellspacing="1">
2937
               <tr>
2938
                  <td width="50%">
2939
                     <table width="100%" border="0" cellpadding="2" cellspacing="1">
2940
                        <tr>
2941
                           <td width="10%" align="left" valign="top" nowrap class="form_field">Project</td>
2942
                           <td width="90%" valign="top"><%Call Get_Projects( NNproj_id, Disallow_All )%></td>
2943
                        </tr>
2944
                        <tr>
2945
                           <td align="left" nowrap class="form_field">Release</td>
2946
                           <td><%Call Get_Open_Release_Labels ( NNproj_id,  NNrtag_id, Disallow_All )%></td>
2947
                        </tr>
2948
                        <tr><td colspan="2" height="130px"><img src="images/spacer.gif" width="1" height="1"></td></tr>
2949
                        <tr>
2950
                           <td>
2951
                              <input name="btn" type="submit" class="form_btn" value="Submit"            >
2952
                           </td>
2953
                           <td>
2954
                              <input name="btn" type="submit" class="form_btn" value="Mail Me CSV Report">
2955
                              <input type="hidden" name="group" value="<%=parGroup%>">
2956
                              <input type="hidden" name="repnum" value="<%=parRepNum%>">
2957
                              <input type="hidden" name="action" value="true">
2958
                           </td>
2959
                        </tr>
2960
                     </table>
2961
                  </td>
2962
                  <td width="50%">
2963
                     <table width="100%" border="0" cellpadding="2" cellspacing="1">
2964
                        <tr>
2965
                           <td width="60%" valign="top">
2966
                              <fieldset>
2967
                                 <legend><a href="javascript:;" class="body_scol" >Include&nbsp;Package&nbsp;Versions<%=Quick_Help("RepRDS_pv")%>&nbsp;</a></legend>
2968
                                 <table width="100%" border="0" cellpadding="2" cellspacing="1">
2969
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("25%", "CB_FILTER_WIP", "From Work-in-progress", cbWIPChecked)%></tr>
2970
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("17%", "CB_FILTER_PENDING", "From Pending", cbPendingChecked)%></tr>
2971
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("20%", "CB_FILTER_RELEASED", "From Released", cbReleasedChecked)%></tr>
2972
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("100%", "CB_FILTER_WITHOUT_ISSUES", "Without Issues", cbWithoutIssues)%></tr>
2973
                                 </table>
2974
                              </fieldset>
2975
                           </td>
2976
                           <td width="40%" valign="top">
2977
                              <fieldset>
2978
                                 <legend><a href="javascript:;" class="body_scol" >&nbsp;Include&nbsp;Issues<%=Quick_Help("RepRDS_iss")%>&nbsp;</a></legend>
2979
                                 <table width="100%" border="0" cellpadding="2" cellspacing="1">
2980
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("100%", "CB_FILTER_FIXED",       "Fixed", cbFixed)%></tr>
2981
                                    <tr><%=ReleaseDeviStatus_ReportCheckbox("100%", "CB_FILTER_OUTSTANDING", "Outstanding", cbOutstanding)%></tr>
2982
                                 </table>
2983
                              </fieldset>
2984
                           </td>
2985
                        </tr>
2986
                        <tr>
2987
                           <td width="60%" valign="top" colspan="2">
2988
                              <fieldset>
2989
                                 <legend><a href="javascript:;" class="body_scol" >&nbsp;From&nbsp;Released<%=Quick_Help("RepRDS_trav")%>&nbsp;</a></legend>
2990
                                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
2991
                                    <tr>
2992
                                       <%=ReleaseDeviStatus_ReportCheckbox("60%", "CB_FILTER_TRAVERSE_RIPPLES", "Traverse Ripples as far back as", cbTraverseRipples)%>
2993
                                       <td>
2994
                                          <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>
2995
                                       </td>
2996
                                    </tr>
2997
                                 </table>
2998
                              </fieldset>
2999
                           </td>
3000
                        </tr>
3001
                     </table>
3002
                  </td>
3003
               </tr>
3004
            </table>
3005
         </form>
3006
      </table>
3007
      <%
3008
      Exit Sub
3009
   End If
3010
 
3011
   If SSsection = "BODY" Then
3012
      emailReport = false
3013
      If Request("btn") = "Mail Me CSV Report" Then
3014
         emailReport = true
3015
      End If
3016
 
3017
      If NOT CBool(Request("action")) Then Exit Sub
3018
      If NNrtag_id = -1 then Exit Sub
3019
 
3020
      ' Construct Release Manager Query based upon form settings (rtag and checkbox states)
3021
      sqlTblCnt = 0
3022
      SQLstr = "SELECT * FROM ( "
3023
      If not (IsNull(Request("CB_FILTER_WIP")) OR (Request("CB_FILTER_WIP") = "")) Then
3024
         sqlTblCnt = sqlTblCnt + 1
3025
         SQLstr = SQLstr & " SELECT p.PROJ_ID,   rt.RTAG_ID,   v.VIEW_ID,   pk.PKG_ID,   pv.PV_ID,"&_
3026
                           "        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"&_
3027
                           "   FROM PACKAGE_VERSIONS pv,"&_
3028
                           "        PACKAGES pk,"&_
3029
                           "        RELEASE_TAGS rt,"&_
3030
                           "        PROJECTS p,"&_
3031
                           "        VIEWS v," &_
3032
                           "        WORK_IN_PROGRESS wip"&_
3033
                           "  WHERE wip.RTAG_ID =   :RTAG_ID"&_
3034
                           "    AND wip.RTAG_ID = rt.RTAG_ID"&_
3035
                           "    AND wip.PV_ID   = pv.PV_ID"&_
3036
                           "    AND wip.VIEW_ID = v.VIEW_ID"&_
3037
                           "    AND pv.PKG_ID   = pk.PKG_ID"&_
3038
                           "    AND rt.PROJ_ID  = p.PROJ_ID"
3039
      End If
3040
 
3041
      If not (IsNull(Request("CB_FILTER_PENDING")) OR (Request("CB_FILTER_PENDING") = "")) Then
3042
         If sqlTblCnt > 0 Then
3043
            SQLstr = SQLstr & " UNION ALL "
3044
         End If
3045
         sqlTblCnt = sqlTblCnt + 1
3046
         SQLstr = SQLstr & " SELECT p.PROJ_ID,   rt.RTAG_ID,   v.VIEW_ID,   pk.PKG_ID,   pv.PV_ID,"&_
3047
                           "        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"&_
3048
                           "   FROM PACKAGE_VERSIONS pv,"&_
3049
                           "        PACKAGES pk,"&_
3050
                           "        RELEASE_TAGS rt,"&_
3051
                           "        PROJECTS p,"&_
3052
                           "        VIEWS v," &_
3053
                           "        PLANNED pl"&_
3054
                           "  WHERE pl.RTAG_ID  =   :RTAG_ID"&_
3055
                           "    AND pl.RTAG_ID  = rt.RTAG_ID"&_
3056
                           "    AND pl.PV_ID    = pv.PV_ID"&_
3057
                           "    AND pl.VIEW_ID  = v.VIEW_ID"&_
3058
                           "    AND pv.PKG_ID   = pk.PKG_ID"&_
3059
                           "    AND rt.PROJ_ID  = p.PROJ_ID"
3060
      End If
3061
 
3062
      If not (IsNull(Request("CB_FILTER_RELEASED")) OR (Request("CB_FILTER_RELEASED") = "")) Then
3063
         If sqlTblCnt > 0 Then
3064
            SQLstr = SQLstr & " UNION ALL "
3065
         End If
3066
         sqlTblCnt = sqlTblCnt + 1
3067
         SQLstr = SQLstr & " SELECT p.PROJ_ID,   rt.RTAG_ID,   v.VIEW_ID,   pk.PKG_ID,   pv.PV_ID,"&_
3068
                           "        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"&_
3069
                           "   FROM PACKAGE_VERSIONS pv,"&_
3070
                           "        PACKAGES pk,"&_
3071
                           "        RELEASE_TAGS rt,"&_
3072
                           "        PROJECTS p,"&_
3073
                           "        VIEWS v," &_
3074
                           "        RELEASE_CONTENT rc"&_
3075
                           "  WHERE rc.RTAG_ID      =   :RTAG_ID"&_
3076
                           "    AND rc.RTAG_ID      = rt.RTAG_ID"&_
3077
                           "    AND rc.PV_ID        = pv.PV_ID"&_
3078
                           "    AND rc.BASE_VIEW_ID = v.VIEW_ID"&_
3079
                           "    AND pv.PKG_ID       = pk.PKG_ID"&_
3080
                           "    AND rt.PROJ_ID      = p.PROJ_ID"
3081
      End If
3082
 
3083
      SQLstr = SQLstr & " )"
3084
      SQLstr = SQLstr & " ORDER BY UPPER(PKG_NAME), PKG_VERSION"
3085
 
3086
      ' Exit if nothing to do
3087
      If sqlTblCnt = 0 Then
3088
         Response.Write "Select one or more of Work-in-progress/Pending/Released package version states to be considered"
3089
         Exit Sub
3090
      End If
3091
 
3092
      ' Get SQL string for querying the CLEARQUEST database for this package version's fixed issues  enumISSUES_STATE_IMPORTED or enumISSUES_STATE_FIXED
3093
      cqFilterStr = GetCQIssuesListFilter()
3094
      If cqFilterStr = "" Then
3095
         Response.Write "Select one or both of Fixed/Outstanding issues lists to be considered"
3096
         Exit Sub
3097
      End If
3098
 
3099
      ' Create ADODB recordset for CLEARQUEST query
3100
      Set rsCQQry = Server.CreateObject("ADODB.Recordset")
3101
 
3102
      ' Query RELEASE MANAGER for Package versions
3103
      OraDatabase.Parameters.Add "RTAG_ID", NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
3104
      Set rsRMQry = OraDatabase.DbCreateDynaset( SQLstr, cint(0))
3105
      OraDatabase.Parameters.Remove "RTAG_ID"
3106
 
3107
      ' If no records returned issue a message to user and exit
3108
      If rsRMQry.RecordCount = 0 Then
3109
         Response.Write "No records returned - try including additional package version states"
3110
         Exit Sub
3111
      End If
3112
 
3113
      ' Create a downloadable file
3114
      Set FSO = Server.CreateObject("Scripting.FileSystemObject")
3115
      Set NewTextFile = FSO.CreateTextFile(Server.MapPath("docs\ReleaseDEVIStatus_"&objAccessControl.UserName&".csv"), true)
3116
 
3117
      ' Create some dictionaries
3118
      set dict_Iss_Id_to_Iss_Num      = CreateObject("Scripting.Dictionary")
3119
      set dict_Iss_Id_to_Iss_DB       = CreateObject("Scripting.Dictionary")
3120
      set dict_Iss_Id_to_Pkg          = CreateObject("Scripting.Dictionary")
3121
      set dict_Iss_Id_to_Risk         = CreateObject("Scripting.Dictionary")
3122
      set dict_Iss_Id_to_Summary      = CreateObject("Scripting.Dictionary")
3123
      set dict_Iss_Id_to_CodeRev      = CreateObject("Scripting.Dictionary")
3124
      set dict_Iss_Id_to_IntNotes     = CreateObject("Scripting.Dictionary")
3125
      set dict_Iss_Id_to_RelDBPatches = CreateObject("Scripting.Dictionary")
3126
      set dict_Iss_Id_to_PvId         = CreateObject("Scripting.Dictionary")
3127
      set dict_Iss_Id_to_Iss_Status   = CreateObject("Scripting.Dictionary")
3128
      set dict_Iss_Id_to_Iss_Type     = CreateObject("Scripting.Dictionary")
3129
      set dict_Iss_Id_to_Aff_Pkg      = CreateObject("Scripting.Dictionary")
3130
 
3131
      set reObj  = new RegExp
3132
 
3133
      NewTextFile.WriteLine(DoubleQuotes("Release DEVI Status Report for " & Get_Proj_Name(Request("FRproj_id")) & ", release " & Get_Release_Name(Request("FRrtag_id"))))
3134
      NewTextFile.WriteLine("")
3135
      NewTextFile.WriteLine("Package DEVI List")
3136
      NewTextFile.WriteLine("")
3137
      NewTextFile.WriteLine("""Package"",""Label"",""State"",""Issue Number"",""Issue Summary""")
3138
      %>
3139
      <H3>Release DEVI Status Report for
3140
      &nbsp;project&nbsp;<a href="rtree.asp?proj_id=<%=NNproj_id%>" class="txt_linked"><%=Get_Proj_Name(Request("FRproj_id"))%></a>,
3141
      &nbsp;release&nbsp;<a href="dependencies.asp?rtag_id=<%=NNrtag_id%>" class="txt_linked"><%=Get_Release_Name(Request("FRrtag_id"))%></a>
3142
      </H3>
3143
      <H4>Contents</H4>
3144
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
3145
         <tr>
3146
            <td valign="top" nowrap width="15%"><a href="#C1">Package DEVI List</a></td>
3147
            <td valign="top" width="85%">This contains the list of package versions in the release, along with the CLEARQUEST issues assigned to them.</td>
3148
         </tr>
3149
         <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
3150
         <tr>
3151
            <td valign="top"><a href="#C2">DEVI Details List</a></td>
3152
            <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>
3153
         </tr>
3154
         <tr>
3155
            <td valign="top"><a href="#C3">Statistics</a></td>
3156
            <td valign="top">This contains some statistics collected during the report generation.</td>
3157
         </tr>
3158
         <tr>
3159
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3160
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3161
         </tr>
3162
      </table>
3163
 
3164
      <H5><a name="C1">Package DEVI List</a></H5>
3165
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
3166
         <tr>
3167
            <td width="10%" nowrap class="body_colb">Package&nbsp;&nbsp;&nbsp;</td>
3168
            <td width="10%" nowrap class="body_colb">Label&nbsp;&nbsp;&nbsp;</td>
3169
            <td width="10%" nowrap class="body_colb">State&nbsp;&nbsp;&nbsp;</td>
3170
            <td width="10%" class="body_colb">Issue Number<br>(F)=Fixed<br>(O)=Outstanding</td>
3171
            <td width="60%" nowrap class="body_colb">Issue Summary&nbsp;&nbsp;&nbsp;</td>
3172
         </tr>
3173
         <tr>
3174
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3175
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3176
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3177
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3178
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3179
         </tr>
3180
         <%
3181
         while ((NOT rsRMQry.BOF) AND (NOT rsRMQry.EOF))
3182
            isFirstDeviRow = 1
3183
            isRowOpen = 1
3184
 
3185
            ' If this package version is a ripple, try and find its non-ripple predecessor in order to get at the
3186
            ' issues that were addressed
3187
            lastNonRipplePvId = rsRMQry("PV_ID")
3188
            If not (IsNull(Request("CB_FILTER_TRAVERSE_RIPPLES")) OR (Request("CB_FILTER_TRAVERSE_RIPPLES") = "")) Then
3189
               if ((rsRMQry("BUILD_TYPE") = "Y") and (rsRMQry("DLOCKED") = "Y")) Then
3190
                  If (IsNull(Request("FRripdate")) OR (Request("FRripdate") = "")) Then
3191
                     lastNonRipplePvId = getLastNonRippleVersionPVID(rsRMQry("PV_ID"))
3192
                  Else
3193
                     lastNonRipplePvId = getLastNonRippleVersionPVIDLimitedByDate(rsRMQry("PV_ID"), Request("FRripdate"))
3194
                  End If
3195
                  If IsNull(lastNonRipplePvId) or (lastNonRipplePvId = "") Then
3196
                     lastNonRipplePvId = rsRMQry("PV_ID")
3197
                  End If
3198
               End If
3199
            End If
3200
 
3201
            issueCnt = Get_Package_Issues (lastNonRipplePvId, SQLstr, NULL, NULL, cqFilterStr )
3202
            if (issueCnt > 0) _
3203
            or not(IsNull(Request("CB_FILTER_WITHOUT_ISSUES")) OR (Request("CB_FILTER_WITHOUT_ISSUES") = "")) Then
3204
 
3205
               NumPkgsListed = NumPkgsListed + 1
3206
 
3207
               %>
3208
               <tr>
3209
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3210
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3211
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3212
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3213
                  <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3214
               </tr>
3215
               <%
3216
 
3217
               NewTextFile.Write(DoubleQuotes(rsRMQry("PKG_NAME")) & ",")
3218
               NewTextFile.Write(DoubleQuotes(rsRMQry("PKG_LABEL")) & ",")
3219
               NewTextFile.Write(DoubleQuotes(rsRMQry("STATE")) & ",")
3220
               %>
3221
               <tr>
3222
               <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>
3223
               <td valign="top"><%=rsRMQry("PKG_LABEL")%></td>
3224
               <td valign="top"><%=rsRMQry("STATE")%></td>
3225
               <%
3226
 
3227
               ' Complete the row immediately if this package version has no issues, else process the issues.
3228
               if issueCnt = 0 Then
3229
                  NewTextFile.WriteLine(",")
3230
                  %>
3231
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
3232
                  <td><img src="images/spacer.gif" width="1" height="1"></td>
3233
                  </tr>
3234
                  <%
3235
                  isRowOpen = 0
3236
               Else
3237
                  ' Query the CLEARQUEST database
3238
                  retVal = Get_CQ_Issues ( SQLstr, rsCQQry )
3239
                  If retVal = 0 Then
3240
                     While ((NOT rsCQQry.BOF) AND (NOT rsCQQry.EOF))
3241
                        Dim issueNumber
3242
                        issueNumber = rsCQQry("ISS_NUM") & GetRMIssueState (lastNonRipplePvId, rsCQQry("ISS_ID"))
3243
 
3244
                        ' Keep dictionary of issue IDs to human readable issue numbers, plus other info we will need later on for the report
3245
                        If not dict_Iss_Id_to_Iss_Num.Exists(CStr(rsCQQry("ISS_ID"))) Then
3246
                           sdAdd dict_Iss_Id_to_Iss_Num,      rsCQQry("ISS_ID"), issueNumber
3247
                           sdAdd dict_Iss_Id_to_Iss_DB,       rsCQQry("ISS_ID"), rsCQQry("ISS_DB")
3248
                           sdAdd dict_Iss_Id_to_Risk,         rsCQQry("ISS_ID"), rsCQQry("RISK")
3249
                           sdAdd dict_Iss_Id_to_Summary,      rsCQQry("ISS_ID"), rsCQQry("SUMMARY")
3250
                           sdAdd dict_Iss_Id_to_CodeRev,      rsCQQry("ISS_ID"), rsCQQry("CR_REF")
3251
                           sdAdd dict_Iss_Id_to_IntNotes,     rsCQQry("ISS_ID"), rsCQQry("INT_NOTES")
3252
                           sdAdd dict_Iss_Id_to_RelDBPatches, rsCQQry("ISS_ID"), rsCQQry("DB_PATCHES")
3253
                           sdAdd dict_Iss_Id_to_Iss_Type,     rsCQQry("ISS_ID"), rsCQQry("ISSUE_TYPE")
3254
                           sdAdd dict_Iss_Id_to_Iss_Status,   rsCQQry("ISS_ID"), rsCQQry("STATUS")
3255
                           sdAdd dict_Iss_Id_to_Aff_Pkg,      rsCQQry("ISS_ID"), rsCQQry("AFFECTED_PACKAGES")
3256
                        End If
3257
 
3258
                        ' Keep dictionary of issue IDs to release manager package names (latter is a comma separated list)
3259
                        If dict_Iss_Id_to_Pkg.Exists(CStr(rsCQQry("ISS_ID"))) Then
3260
                           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"))
3261
                        Else
3262
                           sdAdd dict_Iss_Id_to_Pkg, rsCQQry("ISS_ID"), rsRMQry("PKG_NAME") & " " & CStr(rsRMQry("PKG_VERSION"))
3263
                        End If
3264
 
3265
                        ' Keep dictionary of issue IDs to release manager package version IDs (latter is a comma separated list)
3266
                        If dict_Iss_Id_to_PvId.Exists(CStr(rsCQQry("ISS_ID"))) Then
3267
                           dict_Iss_Id_to_PvId.Item(CStr(rsCQQry("ISS_ID"))) = dict_Iss_Id_to_PvId.Item(CStr(rsCQQry("ISS_ID"))) & "," & CStr(rsRMQry("PV_ID"))
3268
                        Else
3269
                           sdAdd dict_Iss_Id_to_PvId, rsCQQry("ISS_ID"), rsRMQry("PV_ID")
3270
                        End If
3271
 
3272
                        ' Begin new row if needed
3273
                        if isRowOpen = 0 Then
3274
                           isRowOpen = 1
3275
                           %><tr><%
3276
                        End If
3277
 
3278
                        ' If first row, no need to pad since those columns have already been filled in outer loop
3279
                        If isFirstDeviRow = 1 Then
3280
                           isFirstDeviRow = 0
3281
                           NewTextFile.Write(DoubleQuotes(issueNumber) & ",")
3282
                           NewTextFile.WriteLine(DoubleQuotes(rsCQQry("SUMMARY")))
3283
                           %>
3284
                           <td valign="top"><a class="txt_linked"  href="#<%=rsCQQry("ISS_ID")%>"><%=issueNumber%></a></td>
3285
                           <td valign="top"><%=rsCQQry("SUMMARY")%></td>
3286
                           <%
3287
                        Else
3288
                           NewTextFile.Write(",,," & DoubleQuotes(issueNumber) & ",")
3289
                           NewTextFile.WriteLine(DoubleQuotes(rsCQQry("SUMMARY")))
3290
                           %>
3291
                           <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3292
                           <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3293
                           <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3294
                           <td valign="top"><a class="txt_linked" href="#<%=rsCQQry("ISS_ID")%>"><%=issueNumber%></a></td>
3295
                           <td valign="top"><%=rsCQQry("SUMMARY")%></td>
3296
                           <%
3297
                        End If
3298
 
3299
                        ' End this row
3300
                        isRowOpen = 0
3301
                        %></tr><%
3302
                        rsCQQry.MoveNext
3303
                     Wend  ' end of loop processing each issue
3304
                     rsCQQry.Close
3305
                  Else
3306
                     NewTextFile.WriteLine("," & DoubleQuotes("ERROR - could not get issue details from CLEARQUEST"))
3307
                     %>
3308
                     <td><img src="images/spacer.gif" width="1" height="1"></td>
3309
                     <td>ERROR - could not get issue details from CLEARQUEST</td>
3310
                     <%
3311
                  End If
3312
 
3313
                  ' Complete the row if needed
3314
                  if isRowOpen = 1 Then
3315
                     if (isFirstDeviRow = 1) Then
3316
                        NewTextFile.WriteLine(",")
3317
                        %>
3318
                        <td><img src="images/spacer.gif" width="1" height="1"></td>
3319
                        <td><img src="images/spacer.gif" width="1" height="1"></td>
3320
                        <%
3321
                     End If
3322
                     isRowOpen = 0
3323
                     %></tr><%
3324
                  End If
3325
               End If
3326
            End If
3327
            rsRMQry.MoveNext
3328
         Wend  ' End of loop processing each package version
3329
         set rsCQQry = nothing
3330
         %>
3331
         <tr>
3332
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3333
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3334
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3335
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3336
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3337
         </tr>
3338
      </table>
3339
 
3340
      <%
3341
      NewTextFile.WriteLine("")
3342
      NewTextFile.WriteLine("DEVI Details List")
3343
      NewTextFile.WriteLine("")
3344
      NewTextFile.WriteLine("""Issue Number"",""Property"",""Details""")
3345
      %>
3346
 
3347
      <H5><a name="C2">DEVI Details List</a></H5>
3348
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
3349
         <tr>
3350
            <td width="10%" nowrap class="body_colb">Issue Number&nbsp;&nbsp;&nbsp;</td>
3351
            <td width="20%" nowrap class="body_colb">Property&nbsp;&nbsp;&nbsp;</td>
3352
            <td width="70%" nowrap class="body_colb">Details&nbsp;&nbsp;&nbsp;</td>
3353
         </tr>
3354
         <tr>
3355
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3356
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3357
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3358
         </tr>
3359
         <%
3360
         For i = 0 To (dict_Iss_Id_to_Iss_Num.Count - 1)
3361
 
3362
            cqIssId = sdKey(dict_Iss_Id_to_Iss_Num, i)
3363
 
3364
            NumIssuesListed = NumIssuesListed + 1
3365
            %>
3366
            <tr>
3367
               <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3368
               <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3369
               <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3370
            </tr>
3371
            <%
3372
            '-------------------------------------------------------------------------------------------------------------------------------
3373
            ' First line is the DEVI Number, and its summary info
3374
            s = sdItem(dict_Iss_Id_to_Summary,i)   ' Prepare for CSV
3375
            s = Replace(s,"""","""""")
3376
            NewTextFile.WriteLine(DoubleQuotes(sdItem(dict_Iss_Id_to_Iss_Num,i)) & ",Issue Summary," & DoubleQuotes(s))
3377
            s = sdItem(dict_Iss_Id_to_Summary,i)   ' Prepare for HTML
3378
            s = NewLine_To_BR(To_HTML(s))
3379
            %>
3380
            <tr>
3381
            <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>
3382
            <td valign="top">Issue Summary:</td>
3383
            <td valign="top"><%=s%></td>
3384
            </tr><%
3385
            '-------------------------------------------------------------------------------------------------------------------------------
3386
            ' Next line is the DEVI Type Value (ie Defect, Future Enhancement, etc)
3387
            NewTextFile.WriteLine(",Type," & DoubleQuotes(sdItem(dict_Iss_Id_to_Iss_Type,i)))
3388
            %>
3389
            <tr>
3390
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3391
            <td valign="top">Type:</td>
3392
            <td valign="top"><%=sdItem(dict_Iss_Id_to_Iss_Type, i)%></td>
3393
            </tr>
3394
            <%
3395
            '-------------------------------------------------------------------------------------------------------------------------------
3396
            ' Next line is the DEVI Status Value
3397
            NewTextFile.WriteLine(",Status," & DoubleQuotes(sdItem(dict_Iss_Id_to_Iss_Status,i)))
3398
            %>
3399
            <tr>
3400
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3401
            <td valign="top">Status:</td>
3402
            <td valign="top"><%=sdItem(dict_Iss_Id_to_Iss_Status, i)%></td>
3403
            </tr>
3404
            <%
3405
            '-------------------------------------------------------------------------------------------------------------------------------
3406
            ' Next line is the DEVI Risk Value
3407
            NewTextFile.WriteLine(",Risk," & DoubleQuotes(sdItem(dict_Iss_Id_to_Risk,i)))
3408
            %>
3409
            <tr>
3410
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3411
            <td valign="top">Risk:</td>
3412
            <td valign="top"><%=sdItem(dict_Iss_Id_to_Risk, i)%></td>
3413
            </tr>
3414
            <%
3415
            '-------------------------------------------------------------------------------------------------------------------------------
3416
            ' Next line is the DEVI's code review reference
3417
            a = dict_Iss_Id_to_CodeRev.Items  ' Get collection into an array
3418
            s = a(i)                          ' Get array element into a string
3419
            s = Replace(s, chr(13), "+")      ' Replace possible delimiters with a single delimiter ("+")
3420
            s = Replace(s, chr(10), "+")
3421
            s = Replace(s, " ", "+")
3422
            crRefArr = Split(s,"+")           ' Split on our contrived delimiter and iterate through results
3423
 
3424
            NewTextFile.Write(",Code Review Ref,""")
3425
            %>
3426
            <tr>
3427
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3428
            <td valign="top">Code Review Ref:</td>
3429
            <td valign="top">
3430
            <%
3431
            For j = 0 To UBOUND(crRefArr)
3432
               if not ((crRefArr(j) = "+") or (crRefArr(j) = ",") or (Trim(crRefArr(j)) = "")) Then
3433
                  if j = 0 Then
3434
                     NewTextFile.Write(Trim(crRefArr(j)))
3435
                     %>
3436
                     <a href="<%=Trim(crRefArr(j))%>" class="txt_linked"><%=Trim(crRefArr(j))%></a>
3437
                     <%
3438
                  Else
3439
                     NewTextFile.Write("," & Trim(crRefArr(j)))
3440
                     %>
3441
                     <a href="<%=Trim(crRefArr(j))%>" class="txt_linked"><br><%=Trim(crRefArr(j))%></a>
3442
                     <%
3443
                  End If
3444
               End If
3445
            Next
3446
            NewTextFile.WriteLine("""")
3447
            %>
3448
            </td>
3449
            </tr>
3450
            <%
3451
 
3452
            '-------------------------------------------------------------------------------------------------------------------------------
3453
            ' Next line is the DEVI's related DB Patches
3454
            '  This is quite complicated but at the end of the day, we are aiming to convert the free form text in
3455
            '  the CLEARQUEST devi into a list of hyperlinks to the actual package versions in RM, based on the assumption
3456
            '  that the free form text contains PV_ID numbers somewhere therein.
3457
            a = dict_Iss_Id_to_RelDBPatches.Items  ' Get collection into an array
3458
            s = a(i)                               ' Get array element into a string
3459
            s = Replace(s, chr(13), "+")           ' Replace possible delimiters with a single delimiter ("+")
3460
            s = Replace(s, chr(10), "+")
3461
            s = Replace(s, " ", "+")
3462
            relDbPatchArr = Split(s,"+")           ' Split on our contrived delimiter and iterate through results
3463
 
3464
            NewTextFile.Write(",Related DB Patches,""")
3465
            %>
3466
            <tr>
3467
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3468
            <td valign="top">Related DB Patches:</td>
3469
            <td valign="top">
3470
            <%
3471
            For j = 0 To UBOUND(relDbPatchArr)
3472
               if not ((relDbPatchArr(j) = "+") or (relDbPatchArr(j) = ",") or (Trim(relDbPatchArr(j)) = "")) Then
3473
                  ' Given that the Related DB Patches is a free form text field in a CLEARQUEST DEVI,
3474
                  ' it can contain a variety of text. Normally it contains a list of PV_ID's but it
3475
                  ' can also contain the patch file names (eg. orahops.467229_patch.xml) which normally
3476
                  ' contains PV_IDs embedded within them. We have to cater for both approaches and
3477
                  ' somehow extract those PV_IDs. We have already split the string so we know we are
3478
                  ' now dealing with a single item, but sometimes users name their packages or files with
3479
                  ' numbers as well as letters. The code below looks for the longest numeric sequence
3480
                  ' and assumes that is the PV_ID
3481
                  Dim lenMax,lenThis,objMatch
3482
                  lenMax  = 0
3483
                  lenThis = 0
3484
 
3485
                  sDisplay = Trim(relDbPatchArr(j))   'default
3486
 
3487
                  ' search for numeric sequences in the string
3488
                  reObj.IgnoreCase = True
3489
                  reObj.Global = True
3490
                  reObj.Pattern = "[0-9]+"
3491
                  set reObjMatch = reObj.Execute(Trim(relDbPatchArr(j)))
3492
                  If reObjMatch.Count > 0 Then
3493
                     ' Look for the longest numeric sequence
3494
                     for each objMatch in reObjMatch
3495
                        lenThis = objMatch.Length
3496
                        If lenThis > lenMax Then
3497
                           lenMax = lenThis
3498
                           sDisplay = objMatch  'sDisplay is now a numeric sequence
3499
                        End If
3500
                     next
3501
                     if (lenMax > 0) Then
3502
                        ' Form the display string as "PV_ID (package-name package-version)"
3503
                        If GetPkgNameAndVersion(sDisplay, s) Then
3504
                           sDisplay = sDisplay & " (" & s & ")"
3505
                        Else
3506
                           ' Couldn't get the package name/version from RM so it is likely this number
3507
                           ' is not a true/real PV_ID so revert to the simpler display format we began with
3508
                           ' as a default.
3509
                           sDisplay = Trim(relDbPatchArr(j))   'reset to full string
3510
                           lenMax = 0                          'zero to force simpler display format in HTML
3511
                        End If
3512
                     End If
3513
                  End If
3514
 
3515
                  if j = 0 Then
3516
                     NewTextFile.Write(Trim(sDisplay))
3517
                     If (lenMax = 0) Then
3518
                        %><%=Trim(relDbPatchArr(j))%><%
3519
                     Else
3520
                        %><a href="dependencies.asp?pv_id=<%=Trim(relDbPatchArr(j))%>" class="txt_linked"><%=sDisplay%></a><%
3521
                     End If
3522
                  Else
3523
                     NewTextFile.Write("," & Trim(sDisplay))
3524
                     If (lenMax = 0) Then
3525
                        %><%=Trim(relDbPatchArr(j))%><%
3526
                     Else
3527
                        %><a href="dependencies.asp?pv_id=<%=Trim(relDbPatchArr(j))%>" class="txt_linked"><br><%=sDisplay%></a><%
3528
                     End If
3529
                  End If
3530
               End If
3531
            Next
3532
            NewTextFile.WriteLine("""")
3533
            %>
3534
            </td>
3535
            </tr>
3536
            <%
3537
            '-------------------------------------------------------------------------------------------------------------------------------
3538
            ' Next line is the DEVI's affected packages field
3539
            s = sdItem(dict_Iss_Id_to_Aff_Pkg,i)   ' Prepare for CSV
3540
            s = Replace(s,"""","""""")
3541
            NewTextFile.WriteLine(",Affected Packages," & DoubleQuotes(s))
3542
            s = sdItem(dict_Iss_Id_to_Aff_Pkg,i)   ' Prepare for HTML
3543
            s = NewLine_To_BR(To_HTML(s))
3544
            %>
3545
            <tr>
3546
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3547
            <td valign="top">Affected Packages:</td>
3548
            <td valign="top"><%=s %></td>
3549
            </tr>
3550
            <%
3551
            '-------------------------------------------------------------------------------------------------------------------------------
3552
            ' Next line(s) is/are the packages this DEVI is assigned to, in release manager
3553
            pkgArr = dict_Iss_Id_to_Pkg.Items
3554
            pkgCsv = pkgArr(i)
3555
            pkgArr = Split(pkgCsv, ",")
3556
 
3557
            pvIdArr = dict_Iss_Id_to_PvId.Items
3558
            pvIdCsv = pvIdArr(i)
3559
            pvIdArr = Split(pvIdCsv, ",")
3560
 
3561
            NewTextFile.Write(",RM Assigned Packages,""")
3562
            %>
3563
            <tr>
3564
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3565
            <td valign="top">RM Assigned Packages:</td>
3566
            <td valign="top">
3567
            <%
3568
            For j = 0 To UBOUND(pkgArr)
3569
               If j = 0 Then
3570
                  NewTextFile.Write(pkgArr(j))
3571
                  %><a href="fixed_issues.asp?rtag_id=<%=NNrtag_id%>&pv_id=<%=pvIdArr(j)%>" class="txt_linked"><%=pkgArr(j)%></a><%
3572
               Else
3573
                  NewTextFile.Write("," & pkgArr(j))
3574
                  %><a href="fixed_issues.asp?rtag_id=<%=NNrtag_id%>&pv_id=<%=pvIdArr(j)%>" class="txt_linked"><br><%=pkgArr(j)%></a><%
3575
               End If
3576
            Next
3577
            NewTextFile.WriteLine("""")
3578
            %>
3579
            </td>
3580
            </tr>
3581
            <%
3582
            '-------------------------------------------------------------------------------------------------------------------------------
3583
            ' Next line is the DEVI's integration notes
3584
            s = sdItem(dict_Iss_Id_to_IntNotes, i) 'Prepare for CSV
3585
            s = Replace(s,"""","""""")
3586
            NewTextFile.WriteLine(",Integration Notes," & DoubleQuotes(s))
3587
 
3588
            s = sdItem(dict_Iss_Id_to_IntNotes, i) ' Prepare for HTML
3589
            s = NewLine_To_BR(To_HTML(s))
3590
            %>
3591
            <tr>
3592
            <td valign="top"><img src="images/spacer.gif" width="1" height="1"></td>
3593
            <td valign="top">Integration Notes:</td>
3594
            <td valign="top"><%=s %>
3595
            </td>
3596
            </tr>
3597
            <%
3598
         Next
3599
         %>
3600
         <tr>
3601
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3602
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3603
            <td background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
3604
         </tr>
3605
      </table>
3606
      <H5><a name="C3">Statistics</a></H5>
3607
      Report&nbsp;generated on&nbsp;<%=EuroDate(Date)%>&nbsp;at&nbsp;<%=Time%><BR>
3608
      <%=NumPkgsListed %>&nbsp;Package(s)&nbsp;Listed<BR>
3609
      <%=NumIssuesListed  %>&nbsp;Issue(s)&nbsp;Listed<BR>
3610
      <!-- PRINT, SAVE, ETC. ------------>
3611
      <%If parPrint = "" Then%>
3612
         <br>
3613
         <br>
3614
         <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>
3615
         <br>
3616
      <%End If%>
3617
      <%
3618
      ' Clean up
3619
      rsRMQry.Close
3620
      set rsRMQry = nothing
3621
      set dict_Iss_Id_to_Iss_Num      = nothing
3622
      set dict_Iss_Id_to_Iss_DB       = nothing
3623
      set dict_Iss_Id_to_Pkg          = nothing
3624
      set dict_Iss_Id_to_Risk         = nothing
3625
      set dict_Iss_Id_to_Summary      = nothing
3626
      set dict_Iss_Id_to_CodeRev      = nothing
3627
      set dict_Iss_Id_to_IntNotes     = nothing
3628
      set dict_Iss_Id_to_RelDBPatches = nothing
3629
      set dict_Iss_Id_to_PvId         = nothing
3630
      set dict_Iss_Id_to_Iss_Status   = nothing
3631
      set dict_Iss_Id_to_Iss_Type     = nothing
3632
      set dict_Iss_Id_to_Aff_Pkg      = nothing
3633
      set reObj                       = nothing
3634
 
3635
      NewTextFile.Close
3636
      Set NewTextFile=Nothing
3637
 
3638
      ' EMAIL CSV report if user has requested it
3639
      If emailReport Then
3640
         Dim myMail, LocalPath
3641
         Set myMail=Server.CreateObject("Persits.MailSender")
3642
         LocalPath = Server.MapPath("docs\ReleaseDEVIStatus_"&objAccessControl.UserName&".csv")
3643
         myMail.Host = SMTP_HOST
3644
         myMail.Subject="Release DEVI Status Report (csv) from Release Manager"
3645
         myMail.From=ADMIN_EMAIL
3646
         myMail.AddAddress objAccessControl.UserEmail
3647
         ' Attach the file
3648
         myMail.AddAttachment LocalPath
3649
         myMail.Body = "Your requested report..."
3650
         myMail.Send
3651
         set myMail=nothing
3652
      End If
3653
   End If
3654
End Sub
3655
%>