Remove group_name_to_id in favor of creating Group objects

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
13 years ago
12 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Rémi Zara)

Tracking

2.23
Bugzilla 3.0
Bug Flags:
approval +

Details

Attachments

(1 attachment, 1 obsolete attachment)

3.21 KB, patch
Frédéric Buclin
: review+
Details | Diff | Splinter Review
(Reporter)

Description

13 years ago
This came from a comment on bug 328435 -- we should just eliminate the group_name_to_id function and use Group objects instead.

Comment 1

13 years ago
and the sooner the better. I hate hacks.
Target Milestone: --- → Bugzilla 2.24
(Assignee)

Comment 2

13 years ago
Created attachment 213771 [details] [diff] [review]
patch v1

Remove group_name_to_id
Attachment #213771 - Flags: review?(bugreport)

Updated

13 years ago
Assignee: general → remi_zara

Comment 3

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

Comment 4

12 years ago
Created attachment 214847 [details] [diff] [review]
patch v1.1

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 5

12 years ago
Comment on attachment 214847 [details] [diff] [review]
patch v1.1

r=LpSolit
Attachment #214847 - Flags: review?(LpSolit) → review+

Updated

12 years ago
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval? → approval+

Comment 6

12 years ago
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
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.