WebService function to update component information (Component.update)

RESOLVED DUPLICATE of bug 419568

Status

()

Bugzilla
WebService
--
enhancement
RESOLVED DUPLICATE of bug 419568
10 years ago
6 years ago

People

(Reporter: Noura Elhawary, Unassigned)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070209 Fedora/1.5.0.9-3.fc6 Firefox/1.5.0.9 pango-text
Build Identifier: 

need a WebService function to update component info, the function will be in the new module WebService/Component.pm , and it must be consistent with the other WebService::Component API functions like for example Component.get()

Reproducible: Always
(Reporter)

Comment 1

10 years ago
Created attachment 305526 [details] [diff] [review]
v1 for function Bugzilla::WebService::Component::update()

Hi, This patch for function Bugzilla::WebService::Component::update() ,, I have made it consistent with Component.get() bug #385282, also created a function called get_accessible_components() that will be shared between Component.get and Component.update to return the accessible component objects from passed ids or component/product names.

Please review and let me know what you think.
Attachment #305526 - Flags: review?(LpSolit)
(Reporter)

Updated

10 years ago
Attachment #305526 - Flags: review?(mkanat)
(Reporter)

Comment 2

10 years ago
Created attachment 305692 [details] [diff] [review]
v2 for function Bugzilla::WebService::Component::update() + POD

Hi ,, This is an updated patch for function Component.update() ,, I had to make a slight change which was: if the user tries to update the name of multiple components of the same product then throw an error. also I added POD.

Please review when you can.

Thanks,
Noura
Attachment #305526 - Attachment is obsolete: true
Attachment #305692 - Flags: review?(LpSolit)
Attachment #305526 - Flags: review?(mkanat)
Attachment #305526 - Flags: review?(LpSolit)
(Reporter)

Updated

10 years ago
Attachment #305692 - Flags: review?(mkanat)

Comment 3

10 years ago
Wow, why is Component.update so big when you know that Bugzilla::Component->update is doing all the hard work itself? I don't get it.
Assignee: webservice → nelhawar
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 4.0
Version: unspecified → 3.1.3
(Reporter)

Comment 4

10 years ago
Hey Frederic, Basically Component.update is big for 2 reasons:

1- some code to make component API consistent by mapping returned field names in the changes hash to the common field names that will be used through the API.

2- some code to convert user ids returned in the changes hash to login names to make more sense to the users.

Noura 

Comment 5

10 years ago
(In reply to comment #3)
> Wow, why is Component.update so big when you know that
> Bugzilla::Component->update is doing all the hard work itself? I don't get it.

I guess you are implying that most of this code should be moved to Bugzilla::Component->update and Bugzilla::WebService::Component becomes a lightweight wrapper?

Comment 6

10 years ago
Comment on attachment 305692 [details] [diff] [review]
v2 for function Bugzilla::WebService::Component::update() + POD

I don't think Component.update should update more than one component at once. We should let the caller loop over them. This would also avoid the use of get_accessible_components().

Now that bug 419568 has been reviewed, you should make a diff against the patch there so that we can apply it on the existing Component.pm.
Attachment #305692 - Flags: review?(LpSolit) → review-

Updated

10 years ago
Summary: WebService function to update component information → WebService function to update component information (Component.update)

Comment 7

9 years ago
Comment on attachment 305692 [details] [diff] [review]
v2 for function Bugzilla::WebService::Component::update() + POD

If you want to add get_accessible_components, that should happen in a separate bug. Also, it should be called Product.components, I think.

You don't have to keep re-using error 105--those are *bug* errors.
Attachment #305692 - Flags: review?(mkanat) → review-

Comment 8

7 years ago
I'm interesting to continue this bug.

What can I do on for you accept it ?

Updated

7 years ago
Assignee: nelhawar → webservice

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 419568

Comment 10

6 years ago
This feature is going to be implement on bug 419568.

Updated

6 years ago
Target Milestone: Bugzilla 4.4 → ---
You need to log in before you can comment on or make changes to this bug.