summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/lib
diff options
context:
space:
mode:
authorSebastin Santy <sebastinssanty@gmail.com>2017-06-21 22:01:16 +0200
committerDylan William Hardison <dylan@hardison.net>2017-06-21 22:01:16 +0200
commit5cff02a403a608775b3d7d93c4d1276c4b33631e (patch)
treeb096e68f32a4868e0409a297c2df60f8357c5fd3 /extensions/BugModal/lib
parentf919fcc2d43006b4deebecbee8c572d510134620 (diff)
downloadbugzilla-5cff02a403a608775b3d7d93c4d1276c4b33631e.tar.gz
bugzilla-5cff02a403a608775b3d7d93c4d1276c4b33631e.tar.xz
Bug 1365344 - Extract the "status" and "null" modules (#101)
* Added comp_desc, ajax loading, modified rest * Make summary field long * Fixed indentations
Diffstat (limited to 'extensions/BugModal/lib')
-rw-r--r--extensions/BugModal/lib/WebService.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/extensions/BugModal/lib/WebService.pm b/extensions/BugModal/lib/WebService.pm
index a7026288c..556a2d7cc 100644
--- a/extensions/BugModal/lib/WebService.pm
+++ b/extensions/BugModal/lib/WebService.pm
@@ -96,9 +96,10 @@ sub components {
ThrowCodeError( 'params_required',
{ function => 'BugModal.components', params => ['product'] } );
}
- my $product = Bugzilla::Product->check( { name => $params->{product_name}, cache => 1 } );
- $product = Bugzilla->user->can_enter_product( $product, 1 );
- return { components => _name( $product->components ) };
+ my $product = Bugzilla::Product->check({ name => $params->{product_name}, cache => 1 });
+ $product = Bugzilla->user->can_enter_product($product, 1);
+ my @components = map { { name => $_->name, description => Bugzilla::Component->check({ product => $product, name => $_->name })->description} } @{ $product->components };
+ return { components => \@components }
}
# everything we need for edit mode in a single call, returning just the fields