Implement Bugzilla::Object::set_all and have editkeywords.cgi use it

RESOLVED FIXED in Bugzilla 3.4

Status

()

P1
enhancement
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

(Blocks: 1 bug)

Bugzilla 3.4
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
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.
(Assignee)

Updated

10 years ago
Blocks: 278579
Priority: -- → P1
(Assignee)

Comment 1

10 years ago
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)
(Assignee)

Updated

10 years ago
Blocks: 460580

Comment 2

10 years ago
Comment on attachment 343720 [details] [diff] [review]
v1

Looks good. r=LpSolit
Attachment #343720 - Flags: review?(LpSolit) → review+

Updated

10 years ago
Flags: approval+
Target Milestone: Bugzilla 4.0 → Bugzilla 3.4
(Assignee)

Comment 3

10 years ago
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.