<%@LANGUAGE="VBSCRIPT"%> <% Option explicit Response.Expires = 0 ' always load the page, dont store %> <% '===================================================== ' Update Code Review '===================================================== %> <% ' Set rfile parameter. This is a return page after Login Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" ) '------------ ACCESS CONTROL ------------------ %> <% '------------ Variable Definition ------------- Dim parPv_id Dim rsQry Dim arrItemResults Dim arrOverallResults Dim pkgName Dim pkgVersion '------------ Constants Declaration ----------- '------------ Variable Init ------------------- parPv_id = Request("pv_id") parRtag_id = Request("rtag_id") arrItemResults = Array ( "","","", _ "Pass",enumCODE_REVIEW_PASS,"class='pass_alert'", _ "Fail",enumCODE_REVIEW_FAIL,"class='err_alert'" ) arrOverallResults = Array ( "","", _ "Accepted",enumCODE_REVIEW_ACCEPTED, _ "Minor updates required",enumCODE_REVIEW_MINOR_UPDATES, _ "Major rework required",enumCODE_REVIEW_MAJOR_REWORK ) '---------------------------------------------- %> <% '----------------------------------------------------------------------------------------------------------------------------------- Sub GetCodeReview ( nPv_id, oRS ) Dim Query_String Query_String = _ " SELECT * FROM CODE_REVIEWS WHERE pv_id = :PV_ID" Query_String = Replace( Query_String, ":PV_ID", nPv_id ) Set oRS = OraDatabase.CreateDynaset( Query_String, cint(0)) ' Make sure therer is always a record to read from If oRS.RecordCount < 1 Then oRS.Close Call InserDefaultRow ( parPv_id ) Set oRS = OraDatabase.CreateDynaset( Query_String, cint(0)) End If End Sub '----------------------------------------------------------------------------------------------------------------------------------- Function DrawItemResult ( cCheck ) Dim item, val, maxOptions, selected, tempSTR maxOptions = UBound( arrItemResults ) tempSTR = "" For val = 0 to maxOptions Step 3 selected = "" If CStr( arrItemResults(val + 1) ) = cCheck Then selected = "selected" tempSTR = tempSTR & ""& VBNewLine Next DrawItemResult = tempSTR End Function '----------------------------------------------------------------------------------------------------------------------------------- Function DrawOverallResult ( ByVal nResult ) Dim val, maxOptions, tempSTR, selected maxOptions = Ubound( arrOverallResults ) If nResult = "" OR IsNull(nResult) Then nResult = 0 tempSTR = "" For val = 0 To maxOptions Step 2 selected = "" If arrOverallResults(val + 1) = CInt( nResult ) Then selected = "selected" tempSTR = tempSTR & ""& VBNewLine Next DrawOverallResult = tempSTR End Function '----------------------------------------------------------------------------------------------------------------------------------- Sub InserDefaultRow ( nPv_id ) objEH.TryORA ( OraSession ) On Error Resume Next OraDatabase.ExecuteSQL _ " INSERT INTO CODE_REVIEWS (pv_id) VALUES("& nPv_id &")" objEH.CatchORA ( OraSession ) End Sub '----------------------------------------------------------------------------------------------------------------------------------- %> <% '------------ Action Requirements ------------------- 'Process submition If CBool(Request("action")) AND objAccessControl.UserLogedIn Then Call UpdateCodeReview ( parPv_id ) Call OpenInParentWindow ("fixed_issues.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id ) 'Call Destroy_All_Objects 'Response.Redirect ( "_wform_code_review.asp?pv_id="& parPv_id &"&rtag_id="& parRtag_id ) 'Call CloseWindow End If Call Get_Pkg_Short_Info( parPv_id, NULL, pkgName, pkgVersion, NULL, NULL, NULL ) Call GetCodeReview ( parPv_id, rsQry ) %> Release Manager
 Code Review for <%=pkgName%> <%=pkgVersion%>
 

Summary
Date of Review        Time Spent (hrs) ">
Reason for Review
Review Team Domain Expert
Language Expert
Peer Developer
Author
Files Reviewed
Review Results
Issues Raised
Comments


Functionality
Item Check Comment
Meets required functionality


Robustness
Item Check Comment
Boundary conditions handled
Class interface preconditions tested
No unititalised data
Exception handling
Resource mgt (db cxn, memory)
Transaction completeness
Threadsafety
Return values (where appropriate)
Correct err handling at Subsys bdys
SQL correct and conforming to standards


Maintainability
Item Check Comment
External references explicit (eg: pkg imports)
Class size ok
Method size ok
Appropriate commenting
Indentifiers conform to naming standards
Switch statements have defaults
No literal numeric constants except –1, 0, 1
No dead or unused code


Design Issues
Item Check Comment
Use of standard design patterns
Use of appropriate algorithms (consider performance)
Use of appropriate objects (consider bloat, object focus, encapsulation)
Appropriate user error messages
Use of standard framework components
Appropriate logging


<%rsQry.Close Set rsQry = Nothing%>