From e18e70eb6db4500a7afbb84b393df33a9e23b016 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 26 Sep 2013 14:59:40 -0400 Subject: Bug 921082 - Ember.create API sometimes doesn't return field values --- extensions/Ember/lib/FakeBug.pm | 3 ++- extensions/Ember/lib/WebService.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'extensions') 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); -- cgit v1.2.3-24-g4f1b