Bugzilla::Product::check_product() should be Bugzilla::Product->check()

RESOLVED FIXED in Bugzilla 4.0

Status

()

Bugzilla
Bugzilla-General
--
enhancement
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

Bugzilla 4.0
Bug Flags:
approval +

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

8 years ago
check_product() in Product.pm existed before Object.pm. We should now replace it by Object->check().
(Assignee)

Updated

8 years ago
Assignee: general → LpSolit
Target Milestone: --- → Bugzilla 3.8
(Assignee)

Updated

7 years ago
Target Milestone: Bugzilla 4.0 → Bugzilla 4.2
(Assignee)

Comment 1

7 years ago
Created attachment 456180 [details] [diff] [review]
patch, v1
Attachment #456180 - Flags: review?(mkanat)
(Assignee)

Comment 2

7 years ago
Created attachment 456181 [details] [diff] [review]
patch, v1.1

now with new({name => ...})
Attachment #456180 - Attachment is obsolete: true
Attachment #456181 - Flags: review?(mkanat)
Attachment #456180 - Flags: review?(mkanat)

Comment 3

7 years ago
Comment on attachment 456181 [details] [diff] [review]
patch, v1.1

Hmm. For the cases like editflagtypes.cgi, I'd rather have an argument to check() that bypasses the Product->check() and goes straight to Object->check.

So, perhaps something like Bugzilla::Product->check({ name => $name, allow_inaccessible => 1 });
Attachment #456181 - Flags: review?(mkanat) → review-
(Assignee)

Comment 4

7 years ago
Created attachment 456185 [details] [diff] [review]
patch, v2
Attachment #456181 - Attachment is obsolete: true
Attachment #456185 - Flags: review?(mkanat)

Comment 5

7 years ago
Comment on attachment 456185 [details] [diff] [review]
patch, v2

This is fine, except that in the allow_inaccessible case, you don't want to throw the product_access_denied error, so you probably should "if" or "unless" that.
Attachment #456185 - Flags: review?(mkanat) → review+

Updated

7 years ago
Flags: approval?
(Assignee)

Comment 6

7 years ago
Created attachment 456189 [details] [diff] [review]
patch, v3

Yeah, good idea. Carrying forward r+.
Attachment #456185 - Attachment is obsolete: true
Attachment #456189 - Flags: review+
(Assignee)

Updated

7 years ago
Status: NEW → ASSIGNED
Flags: approval? → approval+
Target Milestone: Bugzilla 4.2 → Bugzilla 4.0
(Assignee)

Comment 7

7 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified collectstats.pl
modified config.cgi
modified editflagtypes.cgi
modified enter_bug.cgi
modified request.cgi
modified Bugzilla/Bug.pm
modified Bugzilla/Product.pm
modified Bugzilla/User.pm
modified template/en/default/global/user-error.html.tmpl
Committed revision 7287.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED

Updated

7 years ago
Keywords: relnote

Updated

7 years ago
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.