Closed Bug 329022 Opened 18 years ago Closed 18 years ago

Remove group_name_to_id in favor of creating Group objects

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.23
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: remi_zara)

References

Details

Attachments

(1 file, 1 obsolete file)

This came from a comment on bug 328435 -- we should just eliminate the group_name_to_id function and use Group objects instead.
and the sooner the better. I hate hacks.
Target Milestone: --- → Bugzilla 2.24
Attached patch patch v1 (obsolete) — Splinter Review
Remove group_name_to_id
Attachment #213771 - Flags: review?(bugreport)
Assignee: general → remi_zara
Here is what I found about using the new Bugzilla::Foo($bar)->id() notation:

http://www.unix.org.ua/orelly/perl/advprog/ch07_02.htm

Read the last two sentences of section "7.2.5.1 Detour: The indirect notation":

While the indirect notation has the same effect as the arrow notation, it cannot be used in a chain of calls. The following is possible only with the arrow notation:

use FileHandle;
$fh = FileHandle->new("> foo.txt")->autoflush(1); # Chain of calls


So it seems that you should write Bugzilla::Foo->new($bar)->id(). Could you please update your patch using the arrow notation?
Attached patch patch v1.1Splinter Review
use "Bugzilla::Group->new({name => 'admin'})->id()" instead of "new Bugzilla::Group({name => 'admin'})->id()"
Attachment #213771 - Attachment is obsolete: true
Attachment #214847 - Flags: review?(LpSolit)
Attachment #213771 - Flags: review?(bugreport)
Comment on attachment 214847 [details] [diff] [review]
patch v1.1

r=LpSolit
Attachment #214847 - Flags: review?(LpSolit) → review+
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval? → approval+
Checking in editgroups.cgi;
/cvsroot/mozilla/webtools/bugzilla/editgroups.cgi,v  <--  editgroups.cgi
new revision: 1.68; previous revision: 1.67
done
Checking in editproducts.cgi;
/cvsroot/mozilla/webtools/bugzilla/editproducts.cgi,v  <--  editproducts.cgi
new revision: 1.116; previous revision: 1.115
done
Checking in Bugzilla/Group.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Group.pm,v  <--  Group.pm
new revision: 1.12; previous revision: 1.11
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: