Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
5db53c9e
Commit
5db53c9e
authored
Dec 07, 2014
by
Simon Green
Committed by
Simon Green
Dec 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1052202 - Web Service module to update and delete components
r=dylan, a=glob
parent
9d1dc1f2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
4 deletions
+42
-4
Component.pm
Bugzilla/WebService/Component.pm
+0
-0
Constants.pm
Bugzilla/WebService/Constants.pm
+8
-3
Product.pm
Bugzilla/WebService/Product.pm
+1
-1
Component.pm
Bugzilla/WebService/Server/REST/Resources/Component.pm
+28
-0
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+5
-0
No files found.
Bugzilla/WebService/Component.pm
View file @
5db53c9e
This diff is collapsed.
Click to expand it.
Bugzilla/WebService/Constants.pm
View file @
5db53c9e
...
...
@@ -184,6 +184,7 @@ use constant WS_ERROR_CODE => {
product_must_have_description
=>
703
,
product_must_have_version
=>
704
,
product_must_define_defaultmilestone
=>
705
,
product_admin_denied
=>
706
,
# Group errors are 800-900
empty_group_name
=>
800
,
...
...
@@ -207,9 +208,13 @@ use constant WS_ERROR_CODE => {
flag_type_not_editable
=>
1105
,
# Component errors are 1200-1300
component_already_exists
=>
1200
,
component_is_last
=>
1201
,
component_has_bugs
=>
1202
,
component_already_exists
=>
1200
,
component_is_last
=>
1201
,
component_has_bugs
=>
1202
,
component_blank_name
=>
1210
,
component_blank_description
=>
1211
,
multiple_components_update_not_allowed
=>
1212
,
component_need_initialowner
=>
1213
,
# Errors thrown by the WebService itself. The ones that are negative
# conform to http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
...
...
Bugzilla/WebService/Product.pm
View file @
5db53c9e
...
...
@@ -857,7 +857,7 @@ C<array> of C<int>s. Numeric ids of the products that you wish to update.
=item C<names>
C<array> o
r
C<string>s. Names of the products that you wish to update.
C<array> o
f
C<string>s. Names of the products that you wish to update.
=back
...
...
Bugzilla/WebService/Server/REST/Resources/Component.pm
View file @
5db53c9e
...
...
@@ -28,6 +28,34 @@ sub _rest_resources {
success_code
=>
STATUS_CREATED
}
},
qr{^/component/(\d+)$}
,
{
PUT
=>
{
method
=>
'update'
,
params
=>
sub
{
return
{
ids
=>
[
$_
[
0
]
]
};
}
},
DELETE
=>
{
method
=>
'delete'
,
params
=>
sub
{
return
{
ids
=>
[
$_
[
0
]
]
};
}
},
},
qr{^/component/([^/]+)/([^/]+)$}
,
{
PUT
=>
{
method
=>
'update'
,
params
=>
sub
{
return
{
names
=>
[
{
product
=>
$_
[
0
],
component
=>
$_
[
1
]
}
]
};
}
},
DELETE
=>
{
method
=>
'delete'
,
params
=>
sub
{
return
{
names
=>
[
{
product
=>
$_
[
0
],
component
=>
$_
[
1
]
}
]
};
}
},
},
];
return
$rest_resources
;
}
...
...
template/en/default/global/user-error.html.tmpl
View file @
5db53c9e
...
...
@@ -1338,6 +1338,11 @@
You cannot set aliases when modifying multiple [% terms.bugs %]
at once.
[% ELSIF error == "multiple_components_update_not_allowed" %]
[% title = "Multiple Components Update Not allowed" %]
You can not update the name for multiple components of the
same product.
[% ELSIF error == "need_quip" %]
[% title = "Quip Required" %]
[% docslinks = {'quips.html' => 'About quips'} %]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment