Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 307006 Details for
Bug 447765
Sanitize email addresses from bug reports, attachments, activity for non-logged-in users
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to fix bugzilla.getBug and bugzilla.getProdCompDetails
webservice_patch (text/plain), 6.33 KB, created by
Noura El hawary
on 2008-05-29 02:24:49 UTC
(
hide
)
Description:
patch to fix bugzilla.getBug and bugzilla.getProdCompDetails
Filename:
MIME Type:
Creator:
Noura El hawary
Created:
2008-05-29 02:24:49 UTC
Size:
6.33 KB
patch
obsolete
>Index: extensions/compat_xmlrpc/code/webservice.pl >=================================================================== >RCS file: /cvs/qa/rh_bugzilla_3/extensions/compat_xmlrpc/code/webservice.pl,v >retrieving revision 1.36 >diff -p -u -r1.36 webservice.pl >--- extensions/compat_xmlrpc/code/webservice.pl 28 May 2008 16:53:32 -0000 1.36 >+++ extensions/compat_xmlrpc/code/webservice.pl 29 May 2008 02:19:27 -0000 >@@ -18,6 +18,7 @@ > # > # Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org> > # Dave Lawrence <dkl@redhat.com> >+# Noura Elhawary <nelhawar@redhat.com> > > use strict; > use warnings; >@@ -217,15 +218,17 @@ sub getBug { > ValidateBugID($id); > my $bug = new Bugzilla::Bug($id); > ThrowCodeError("bug_error", { bug => $bug }) if $bug->error; >- >+ >+ my %item; >+ > if ($bug->resolution eq 'DUPLICATE') { >- $bug->{'dup_id'} = $bug->dup_id; >+ $item{'dup_id'} = $bug->dup_id; > } > >- unless (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) { >- delete $bug->{'estimated_time'}; >- delete $bug->{'remaining_time'}; >- delete $bug->{'deadline'}; >+ if (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) { >+ $item{estimated_time} = $bug->{'estimated_time'}; >+ $item{remaining_time} = $bug->{'remaining_time'}; >+ $item{deadline} = $bug->{'deadline'}; > } > > # This is done in this fashion in order to produce a stable API. >@@ -233,44 +236,43 @@ sub getBug { > # return them directly. > my $creation_ts = $self->datetime_format($bug->creation_ts); > my $delta_ts = $self->datetime_format($bug->delta_ts); >- my %item; >- $bug->{'creation_time'} = type('dateTime')->value($creation_ts); >- $bug->{'last_change_time'} = type('dateTime')->value($delta_ts); >- $bug->{'id'} = type('int')->value($bug->bug_id); >- $bug->{'summary'} = type('string')->value($bug->short_desc); >- >- $bug->{cc} = $bug->cc; >- $bug->{dependson} = $bug->dependson; >- $bug->{blocked} = $bug->blocked; >- $bug->{longdescs} = $bug->longdescs; >- $bug->{keywords} = $bug->keywords; >- $bug->{groups} = $bug->groups; >- $bug->{attachments} = $bug->attachments; >- $bug->{flag_types} = $bug->flag_types; >- $bug->{dupe_id} = $bug->dup_id; >- $bug->{actual_time} = $bug->actual_time; >- $bug->{milestone_url} = $bug->milestoneurl; >+ $item{'creation_time'} = type('dateTime')->value($creation_ts); >+ $item{'last_change_time'} = type('dateTime')->value($delta_ts); >+ $item{'id'} = type('int')->value($bug->bug_id); >+ $item{'summary'} = type('string')->value($bug->short_desc); >+ >+ $item{cc} = $bug->cc; >+ $item{dependson} = $bug->dependson; >+ $item{blocked} = $bug->blocked; >+ $item{longdescs} = $bug->longdescs; >+ $item{keywords} = $bug->keywords; >+ $item{groups} = $bug->groups; >+ $item{attachments} = $bug->attachments; >+ $item{flag_types} = $bug->flag_types; >+ $item{dupe_id} = $bug->dup_id; >+ $item{actual_time} = $bug->actual_time; >+ $item{milestone_url} = $bug->milestoneurl; > > if (Bugzilla->user->id) { >- $bug->{reporter} = type('string')->value($bug->reporter->email) >+ $item{reporter} = type('string')->value($bug->reporter->email) > if $bug->reporter; >- $bug->{assigned_to} = type('string')->value($bug->assigned_to->email) >+ $item{assigned_to} = type('string')->value($bug->assigned_to->email) > if $bug->assigned_to; >- $bug->{qa_contact} = type('string')->value($bug->qa_contact->email) >+ $item{qa_contact} = type('string')->value($bug->qa_contact->email) > if $bug->qa_contact; > } > else { >- $bug->{reporter} = type('string')->value($bug->reporter->name) >+ $item{reporter} = type('string')->value($bug->reporter->name) > if $bug->reporter; >- $bug->{assigned_to} = type('string')->value($bug->assigned_to->name) >+ $item{assigned_to} = type('string')->value($bug->assigned_to->name) > if $bug->assigned_to; >- $bug->{qa_contact} = type('string')->value($bug->qa_contact->name) >+ $item{qa_contact} = type('string')->value($bug->qa_contact->name) > if $bug->qa_contact; > } > >- $bug->{product} = type('string')->value($bug->product) >+ $item{product} = type('string')->value($bug->product) > if $bug->product_id; >- $bug->{component} = type('string')->value($bug->component) >+ $item{component} = type('string')->value($bug->component) > if $bug->component_id; > > if (Bugzilla->params->{'usebugaliases'}) { >@@ -281,11 +283,15 @@ sub getBug { > # don't want it to have a value if aliases are turned off. > $item{'alias'} = undef; > } >- >+ > # HACK: remove 'when' key from comments since > # XMLRPC treats it as an INTEGER and its too big >- foreach my $ref (@{$bug->longdescs}) { >+ foreach my $ref (@{$item{longdescs}}) { > delete $ref->{'when'}; >+ >+ if (!Bugzilla->user->id){ >+ delete $ref->{author}{login_name}; >+ } > } > > # Remap custom field names to normal names >@@ -296,15 +302,16 @@ sub getBug { > 'qa_whiteboard' => 'cf_qa_whiteboard', > 'internal_whiteboard' => 'cf_internal_whiteboard', > 'issuetracker' => 'cf_issuetracker', >+ 'release_notes' => 'cf_release_notes', > ); > > foreach my $key ( keys %custom_field_return_map ) { > my $field = $custom_field_return_map{$key}; >- $bug->{$key} = $bug->{$field} if defined $bug->{$field}; >+ $item{$key} = $bug->{$field} if defined $bug->{$field}; > delete $bug->{$field}; > } > >- return $bug; >+ return \%item; > } > > =item C<getBugCVS($id, $username, $password)> >@@ -3002,9 +3009,9 @@ sub getProdCompDetails { > } > else { > $component_hash{initialowner} >- = type('string')->value( $component_obj->default_assignee->{name} ); >+ = type('string')->value( $component_obj->default_assignee->{realname} ); > $component_hash{initialqacontact} >- = type('string')->value( $component_obj->default_qa_contact->{name} ); >+ = type('string')->value( $component_obj->default_qa_contact->{realname} ); > } > > push @comps, \%component_hash;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dkl
: review+
Actions:
View
|
Diff
Attachments on
bug 447765
:
306312
|
306553
| 307006