summaryrefslogtreecommitdiffstats
path: root/extensions/Ember/lib
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-17 23:49:49 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-17 23:49:49 +0200
commitbe947b49f2746fb3c7b8aaf802aa6a198f820815 (patch)
tree4cf6020f0bff44988c23c3d5212c938950fcc0b1 /extensions/Ember/lib
parent74da19f64409e49fa013a64476305c5d8decd59d (diff)
downloadbugzilla-be947b49f2746fb3c7b8aaf802aa6a198f820815.tar.gz
bugzilla-be947b49f2746fb3c7b8aaf802aa6a198f820815.tar.xz
Bug 915856 - Comment field's `name` should be `comment` in Ember.show response
Diffstat (limited to 'extensions/Ember/lib')
-rw-r--r--extensions/Ember/lib/WebService.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/extensions/Ember/lib/WebService.pm b/extensions/Ember/lib/WebService.pm
index 4f7a0c713..423c8de34 100644
--- a/extensions/Ember/lib/WebService.pm
+++ b/extensions/Ember/lib/WebService.pm
@@ -323,10 +323,12 @@ sub _field_to_hash {
# Use the API name if one is present instead of the internal field name
my $field_name = $field->name;
+ $field_name = API_NAMES->{$field_name} || $field_name;
+
if ($field_name eq 'longdesc') {
$field_name = $bug->id ? 'comment' : 'description';
}
- $field_name = API_NAMES->{$field_name} || $field_name;
+
$data->{name} = $self->type('string', $field_name);
# Set can_edit true or false if we are editing a current bug