Closed Bug 556123 Opened 15 years ago Closed 15 years ago

Move the setting of comments and work_time into Bugzilla::Bug::set_all

Categories

(Bugzilla :: Creating/Changing Bugs, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

This is the second step for set_all. I've moved basic field setting to using set_all, now it's time to actually have a Bugzilla::Bug::set_all that does some custom stuff.
In the interest of simplicity, I'm going to limit this to just comments, since this is the first actual set_all implementation in Bugzilla::Bug.
Summary: Move the setting of see_also, comments, work_time, and custom fields into Bugzilla::Bug::set_all → Move the setting of comments and work_time into Bugzilla::Bug::set_all
Attached patch v1Splinter Review
Here we go. Relatively simple patch. I made "comment" get passed as a hash so that there's no confusion about whether we're setting something about existing comments or about the current comment, and to make things easier for eventual WebServices implementations using set_all. Instead of specifically listing every single field that can be set using normal set_ functions in Bugzilla::Bug, I made set_all in Bugzilla::Bug check can() to determine which of the input parameters are valid set_* functions. This should, to some degree, allow for easy extension of Bugzilla::Bug::set_all, also.
Assignee: create-and-change → mkanat
Status: NEW → ASSIGNED
Attachment #436076 - Flags: review?(dkl)
Blocks: 556154
Attachment #436076 - Flags: review+
Comment on attachment 436076 [details] [diff] [review] v1 Code looks fine to me. Also tested it in several different scenarios and worked as expected. r=dkl
Attachment #436076 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval? → approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified process_bug.cgi modified Bugzilla/Bug.pm Committed revision 7158.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: