Bug 426099

Summary: 3.3.1 update Bugzilla/RPC/Bug.pm
Product: [Community] Bugzilla Reporter: Noura El hawary <nelhawar>
Component: Bugzilla GeneralAssignee: Noura El hawary <nelhawar>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 3.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-08 00:58:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 406071, 406131, 427053    

Description Noura El hawary 2007-12-18 15:34:34 UTC
update Bugzilla/RPC/Bug.pm to be compatible with upstream WebServices/Bug.pm ,,
This will include adding new xmlrpc function from upstream get_bugs() as
currently we only have xmlrpc functions that returns one bug. also we are going
to rework Bugzilla/RPC/Bug.pm by replacing all the update/change bug functions
with single function that can update any field for us, so it would match with
what can be done in the web UI

Comment 1 Noura El hawary 2007-12-18 15:51:15 UTC
To Calculate LOC estimation to update Bugzilla/RPC/Bug.pm , The whole module
will be reworked ,, so full FP estimation apply here  :

Basically this module does "update/create/get Bug" so:

Inputs: bugs id, user details, bug fields to update = 3
Outputs: logging messages, authentication errors, input validation errors, email    
         notifications with bugs changes, bug details  = 5
Enquiries = 0
Internal Logical files = bugs table = 1
external Interface files = Log4perl module = 1
 
total count (with simple weighting factor) =  (3*3)+(5*4)+(0*3)+(1*7)+(1*5)=41

FP = 41 * (.65 + .01 * 46) = 42 FPs

LOC = 42 * 60 = 2520 LOC

Comment 2 Noura El hawary 2007-12-18 16:04:34 UTC
(In reply to comment #1)
> To Calculate LOC estimation to update Bugzilla/RPC/Bug.pm , The whole module
> will be reworked ,, so full FP estimation apply here  :
> 
> Basically this module does "update/create/get Bug" so:
> 
> Inputs: bugs id, user details, bug fields to update = 3
> Outputs: logging messages, authentication errors, input validation errors,
email    
>          notifications with bugs changes, bug details  = 5
> Enquiries = 0
> Internal Logical files = bugs table = 1
> external Interface files = Log4perl module = 1
>  
> total count (with simple weighting factor) =  (3*3)+(5*4)+(0*3)+(1*7)+(1*5)=41
> 
> FP = 41 * (.65 + .01 * 46) = 42 FPs

the above is wrong it shoulw be : 45FPs
> 
> LOC = 42 * 60 = 2520 LOC

LOC = 45 * 60 = 2700

Comment 3 Kevin Baker 2007-12-18 16:10:26 UTC
Inputs: won't this be roughly the number of sub routines that exist in Bug.pm 
already?

Enquires: you have 0, but don't these routines have to extract data from the 
database and reformat (or removed information) for the client?

Logical Internal Files: only 1? If one table is on LIF then surely there are 
more than one.

External Interface Files: Log4perl module? hmmm, I'd question that since this 
modules doesn't interact with it directly. It just calls a sub routine to do 
the logging.



And your maths is wrong. I get  

FP = 41 * (.65 + .01 * 46) = 45.51
LOC = 45.51 * 60 = 2731

Comment 4 Noura El hawary 2007-12-18 16:56:49 UTC
(In reply to comment #3)
> Inputs: won't this be roughly the number of sub routines that exist in Bug.pm 
> already?
> 

OK If we are going to use previous subroutines as inputs then I would say that
we use historical data method to calculate LOC ,, so basically we currently have
 in rh_bugzilla_2_18/Bugzilla/RPC/Bug.pm 1626 LOC 

and in the upstream WebService/Bug.pm we have 114 so, we will use combination of
codes to update Bug.pm 

so LOC = 1626 + 114 = 1740 LOC

> Enquires: you have 0, but don't these routines have to extract data from the 
> database and reformat (or removed information) for the client?
> 
> Logical Internal Files: only 1? If one table is on LIF then surely there are 
> more than one.
> 
> External Interface Files: Log4perl module? hmmm, I'd question that since this 
> modules doesn't interact with it directly. It just calls a sub routine to do 
> the logging.
> 
> 
> 
> And your maths is wrong. I get  
> 
> FP = 41 * (.65 + .01 * 46) = 45.51
> LOC = 45.51 * 60 = 2731

I think that we should approximate the FP before using it in LOC calculation so
45.51 would approximate to 46 it will still make my math wrong anyway lol.



Comment 5 Noura El hawary 2007-12-19 14:40:55 UTC
Redoing LOC estimation for Bug.pm 

Inputs: username, password, bug fields = 3
Outputs: authentication errors , input validation errors, logging messages, bug
         details, bug update notification emails = 5
Inquiries: bug data, group data, attachments data, flag data, IT data = 5
Logical files: database tables: bugs, products, components, bug_group_map,
               group_control_map, attachments, duplicates, cc, dependencies,
               profiles, fieldid, bugs_activity, bz_it_map, user_group_map,
               keywords, keyworddefs = 16
External files = Zero

FP total count(simple weighting factor)= (3*3)+(4*5)+(3*5)+(7*16)+(5*0)= 156

FP = 156 * 1.11 = 173

LOC = 173 * 60 = 10380


For Unit testing:

Currently we have for Bug.pm existing xmlrpc test cases with 1688 LOC ,, however
not all the functions have tests ,, we still need to write tests for 9 more
xmlrpc functions in Bug.pm ,, with average of 100 LOC/test case we will be
writing another 900 LOC ,, 
 
Testing LOC = 1688 + 900 = 2588


TOTAL LOC = code + testing = 10380 + 2588 = 12968

Comment 6 Noura El hawary 2008-01-08 00:58:37 UTC
This bug is high level bug, It will be replaced by bugs for each xmlrpc
function. CLosing bug

Noura