summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-13 03:41:12 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-13 03:41:12 +0200
commitd403dca90ecda9fb290dbbc9507bdda79dae7b59 (patch)
tree585056cded55ffbffa866b56f348f9b2a6438039 /Bugzilla/Bug.pm
parent33e1f44e56b7864a793738574a564675bd019270 (diff)
downloadbugzilla-d403dca90ecda9fb290dbbc9507bdda79dae7b59.tar.gz
bugzilla-d403dca90ecda9fb290dbbc9507bdda79dae7b59.tar.xz
Bug 415813: Implement Bug.update() as an API for WebServices
r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm15
1 files changed, 13 insertions, 2 deletions
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};
}