Last Comment Bug 840993 - Improved error reporting when creating the master and dependent bugs for a project review
: Improved error reporting when creating the master and dependent bugs for a pr...
Status: RESOLVED FIXED
:
Product: bugzilla.mozilla.org
Classification: Other
Component: Extensions: MozProjectReview (show other bugs)
: Production
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: David Lawrence [:dkl]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-13 07:41 PST by David Lawrence [:dkl]
Modified: 2013-02-13 12:24 PST (History)
3 users (show)
See Also:
Due Date:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch to improve error handling of dependent bug creation (v1) (15.93 KB, patch)
2013-02-13 07:45 PST, David Lawrence [:dkl]
no flags Details | Diff | Review
Patch to improve error handling of dependent bug creation (v2) (15.58 KB, patch)
2013-02-13 08:42 PST, David Lawrence [:dkl]
glob: review+
Details | Diff | Review

Description David Lawrence [:dkl] 2013-02-13 07:41:15 PST
Originally I wrote the creation of one or more of the dependent bugs under a single eval {} which caused all dependent bugs to not be created if one or more failed. I have revised the code to wrap each individual bug creation inside it's own eval {} and therefore at least the other bugs can still be created. Also I let the user know inside the accompanying comment that an error occurred and which bug was the failing bug. 

Also I am adding additional information such as parent bug id in the warn message that will be recorded by Arecibo which we can use for troubleshooting when problems occur.

dkl
Comment 1 David Lawrence [:dkl] 2013-02-13 07:45:03 PST
Created attachment 713399 [details] [diff] [review]
Patch to improve error handling of dependent bug creation (v1)
Comment 2 David Lawrence [:dkl] 2013-02-13 08:42:05 PST
Created attachment 713425 [details] [diff] [review]
Patch to improve error handling of dependent bug creation (v2)
Comment 3 Byron Jones ‹:glob› 2013-02-13 08:59:38 PST
Comment on attachment 713425 [details] [diff] [review]
Patch to improve error handling of dependent bug creation (v2)

Review of attachment 713425 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob by inspection, looks good!

there's trailing whitespace in this patch, please remove before committing.

::: extensions/MozProjectReview/Extension.pm
@@ +122,5 @@
> +        {
> +            $component = ($params->{relationship_type} eq 'Other' 
> +                          || $params->{relationship_type} eq 'Hardware Purchase')
> +                       ? 'General'
> +                       : $params->{relationship_type};

nit: the indentation of the ? and : lines is wrong.
Comment 4 David Lawrence [:dkl] 2013-02-13 12:24:55 PST
Thanks

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0             
modified extensions/MozProjectReview/Extension.pm
Committed revision 8482. 

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2             
modified extensions/MozProjectReview/Extension.pm
Committed revision 8553.

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