Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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