From d403dca90ecda9fb290dbbc9507bdda79dae7b59 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 12 Jul 2010 18:41:12 -0700 Subject: Bug 415813: Implement Bug.update() as an API for WebServices r=dkl, a=mkanat --- Bugzilla/Bug.pm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Bug.pm') diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index efee14826..e28c752df 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -265,9 +265,14 @@ use constant MAX_LINE_LENGTH => 254; # of Bugzilla. (These are the field names that the WebService and email_in.pl # use.) use constant FIELD_MAP => { + blocks => 'blocked', + is_confirmed => 'everconfirmed', + cc_accessible => 'cclist_accessible', creation_time => 'creation_ts', creator => 'reporter', description => 'comment', + depends_on => 'dependson', + dupe_of => 'dup_id', id => 'bug_id', last_change_time => 'delta_ts', platform => 'rep_platform', @@ -3706,11 +3711,17 @@ sub LogActivityEntry { # Convert WebService API and email_in.pl field names to internal DB field # names. sub map_fields { - my ($params) = @_; + my ($params, $except) = @_; my %field_values; foreach my $field (keys %$params) { - my $field_name = FIELD_MAP->{$field} || $field; + my $field_name; + if ($except->{$field}) { + $field_name = $field; + } + else { + $field_name = FIELD_MAP->{$field} || $field; + } $field_values{$field_name} = $params->{$field}; } -- cgit v1.2.3-24-g4f1b