Closed Bug 419456 Opened 16 years ago Closed 12 years ago

WebService function to update component information (Component.update)

Categories

(Bugzilla :: WebService, enhancement)

3.1.3
enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 419568

People

(Reporter: nelhawar, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

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
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)
Attachment #305526 - Flags: review?(mkanat)
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)
Attachment #305692 - Flags: review?(mkanat)
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
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 
(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 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-
Summary: WebService function to update component information → WebService function to update component information (Component.update)
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-
I'm interesting to continue this bug.

What can I do on for you accept it ?
Assignee: nelhawar → webservice
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
This feature is going to be implement on bug 419568.
Target Milestone: Bugzilla 4.4 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: