summaryrefslogtreecommitdiffstats
path: root/extensions/Ember
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-26 20:59:40 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-26 20:59:40 +0200
commite18e70eb6db4500a7afbb84b393df33a9e23b016 (patch)
tree362350807da75dafe75e89732186801c05d3f6e6 /extensions/Ember
parent4180e54e7b2c2a147954425312bf1cd485b14d24 (diff)
downloadbugzilla-e18e70eb6db4500a7afbb84b393df33a9e23b016.tar.gz
bugzilla-e18e70eb6db4500a7afbb84b393df33a9e23b016.tar.xz
Bug 921082 - Ember.create API sometimes doesn't return field values
Diffstat (limited to 'extensions/Ember')
-rw-r--r--extensions/Ember/lib/FakeBug.pm3
-rw-r--r--extensions/Ember/lib/WebService.pm3
2 files changed, 4 insertions, 2 deletions
diff --git a/extensions/Ember/lib/FakeBug.pm b/extensions/Ember/lib/FakeBug.pm
index 0a7db4bd3..46fef4ea7 100644
--- a/extensions/Ember/lib/FakeBug.pm
+++ b/extensions/Ember/lib/FakeBug.pm
@@ -33,8 +33,9 @@ sub check_can_change_field {
return Bugzilla::Bug::check_can_change_field(@_);
}
-sub id { return undef; }
+sub id { return undef; }
sub product_obj { return $_[0]->{product_obj}; }
+sub reporter { return Bugzilla->user; }
sub choices {
my $self = shift;
diff --git a/extensions/Ember/lib/WebService.pm b/extensions/Ember/lib/WebService.pm
index e717e7579..854a94689 100644
--- a/extensions/Ember/lib/WebService.pm
+++ b/extensions/Ember/lib/WebService.pm
@@ -99,7 +99,8 @@ sub create {
my $product_obj = Bugzilla::Product->check($product);
- my $fake_bug = Bugzilla::Extension::Ember::FakeBug->new({ product_obj => $product_obj });
+ my $fake_bug = Bugzilla::Extension::Ember::FakeBug->new(
+ { product_obj => $product_obj, reporter_id => Bugzilla->user->id });
my @fields = $self->_get_fields($fake_bug);