Bug 525473 - ValidateBugID function exists in some places of the branches/upstream3.4 code
Summary: ValidateBugID function exists in some places of the branches/upstream3.4 code
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.4
Hardware: All
OS: All
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: RHBZ34UpgradeTracker
TreeView+ depends on / blocked
 
Reported: 2009-09-24 14:12 UTC by Noura El hawary
Modified: 2009-09-28 18:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-28 18:33:29 UTC
Embargoed:


Attachments (Terms of Use)
Patch to remove ValidateBugID from remaining places (v1) (11.49 KB, patch)
2009-09-24 20:30 UTC, David Lawrence
nelhawar: review+
Details | Diff

Description Noura El hawary 2009-09-24 14:12:27 UTC
Upstream has replaced the function ValidateBugID in 3.4 with Bugzilla::Bug->check, our merged code in branches/upstream3.4 code still has some places where it is calling the no longer existing function ValidateBugID, this needs to be changed.

[root@localhost upstream-3.4]# grep -rl ValidateBugID .
./show_comment_activity.cgi
./extensions/issuetracker/code/webservice.pl
./extensions/compat_xmlrpc/code/webservice.pl
./Bugzilla/WebService/Bug.pm

upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=440609

Noura

Comment 1 David Lawrence 2009-09-24 20:30:15 UTC
Created attachment 362566 [details]
Patch to remove ValidateBugID from remaining places (v1)

Patch to remove remaining ValidateBugID calls and convert to Bugzilla::Bug->check().

Please review

Dave

Comment 2 Noura El hawary 2009-09-28 12:10:23 UTC
Comment on attachment 362566 [details]
Patch to remove ValidateBugID from remaining places (v1)

Hey Dave,

Patch looks good to me, and working fine just couple of little changes needed as below "removing the new word":


>Index: extensions/issuetracker/code/webservice.pl
>===================================================================
>--- extensions/issuetracker/code/webservice.pl	(revision 1511)
>+++ extensions/issuetracker/code/webservice.pl	(working copy)
>@@ -55,8 +55,7 @@
>     $it_id  || ThrowCodeError( 'param_required', { param => 'issue' } );
>     $bug_id || ThrowCodeError( 'param_required', { param => 'id' } );
> 
>-    ValidateBugID($bug_id);
>-    my $bug = new Bugzilla::Bug($bug_id);
>+    my $bug = new Bugzilla::Bug->check($bug_id);

my $bug = Bugzilla::Bug->check($bug_id);


> 
>     # we have to check if the user can edit the bug the product
>     # is currently in, before we allow them to change anything.
>@@ -104,8 +103,7 @@
>     $it_id || ThrowCodeError( 'param_required', { param => 'issue' } );
>     $bug_id || ThrowCodeError( 'param_required', { param => 'id' } );
> 
>-    ValidateBugID($bug_id);
>-    my $bug = new Bugzilla::Bug($bug_id);
>+    my $bug = new Bugzilla::Bug->check($bug_id);

my $bug = Bugzilla::Bug->check($bug_id);
> 

I am also running the webservices tests currently and will see if more errors will occur. but as far as what this bug is about no more ValidatBugID exists in the code after applying the patch.

Thanks,
Noura

Comment 3 David Lawrence 2009-09-28 18:33:29 UTC
Thanks Noura. I fixed the issues you pointed out and checked in. Let me know how the testing goes. I am closing this and we can open a new bug if the testing finds any issues.


Note You need to log in before you can comment on or make changes to this bug.