set_all would be a function where you pass in a hash and it calls all the set_ functions for the object, in the right order. The "right order" should probably be considered the order of UPDATE_COLUMNS, but that's hard because the column names and the setter names are different. It might be time to just fix that and name things better in the DB.
Created attachment 343720 [details] [diff] [review] v1 Wow, this was so easy I don't know why we didn't implement it earlier. I didn't do any of the ordering stuff here. In the future, if we need the set_ functions to be called in a specific order, we can add a constant called SET_ORDER that orders just the ones that need to be in some order. (That should help us keep things straight with Bugzilla::Bug, too.)
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #343720 - Flags: review?(LpSolit)
Comment on attachment 343720 [details] [diff] [review] v1 Looks good. r=LpSolit
Attachment #343720 - Flags: review?(LpSolit) → review+
Target Milestone: Bugzilla 4.0 → Bugzilla 3.4
Thanks! :-) Checking in editkeywords.cgi; /cvsroot/mozilla/webtools/bugzilla/editkeywords.cgi,v <-- editkeywords.cgi new revision: 1.46; previous revision: 1.45 done Checking in Bugzilla/Object.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Object.pm,v <-- Object.pm new revision: 1.27; previous revision: 1.26 done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.