Closed Bug 298190 Opened 20 years ago Closed 20 years ago

The "200 bugs" limit in buglist.cgi should be a constant, not a magic number.

Categories

(Bugzilla :: Query/Bug List, enhancement)

2.19.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: timello)

Details

Attachments

(1 file, 4 obsolete files)

Apparently, right now the limit of 200 bugs for a query in buglist.cgi is
actually hard-coded as the number "200."

It should instead be a constant.
Attachment #186797 - Flags: review?(mkanat)
Status: NEW → ASSIGNED
Comment on attachment 186797 [details] [diff] [review]
v1: using a constant instead of hard code value.

This constant is also used in the template and in the error message. I am not
quite sure how to communicate constants to templates -- is Bugzilla::Constants
available there?
Attachment #186797 - Flags: review?(mkanat) → review-
Attachment #186797 - Attachment is obsolete: true
Attachment #186807 - Flags: review?(kiko)
Comment on attachment 186807 [details] [diff] [review]
v2: move the bug list limit constant to Constant.pm

There is code in the template (landed by LpSolit yesterday) that also needs to
be changed (I said "template /and/ error message"). 

Note also that it's not BUG_LIST_LIMIT but FULLTEXT_BUGLIST_LIMIT.
Attachment #186807 - Flags: review?(kiko) → review-
Attachment #186807 - Attachment is obsolete: true
Attachment #186853 - Flags: review?(kiko)
Comment on attachment 186853 [details] [diff] [review]
v3: changes after checkin of the bug 244533.

Tiago, you need to document constants added. r=kiko with that.
Attachment #186853 - Flags: review?(kiko) → review-
the number 200 happens to be wrong since 200 items containing 6 character bugs
and commas blows cookie limits for browsers.
Well, timeless, what's a number that might work? 100? 50? At any rate, I don't
think this is reason to hold this patch up -- it's currently broken in that
respect anyway. Timello, move ahead.
Attached patch v4: comment for the constant. (obsolete) — Splinter Review
Moving ahead...
Keeping 200, we can decide what we should do with that number in other bug,
though.
Attachment #186853 - Attachment is obsolete: true
Attachment #186915 - Flags: review?(kiko)
Comment on attachment 186915 [details] [diff] [review]
v4: comment for the constant.

I was thinking more of POD documentation, but this is okay for now.
Attachment #186915 - Flags: review?(kiko) → review+
Flags: approval?
Comment on attachment 186915 [details] [diff] [review]
v4: comment for the constant.

>Index: buglist.cgi
>@@ -662,7 +662,7 @@ if (!$order || $order =~ /^reuse/i) {
>        
>         # Cookies from early versions of Specific Search included this text,
>         # which is now invalid.
>-        $order =~ s/ LIMIT 200//;
>+        $order =~ s/ LIMIT \d+//;

It isn't necessary to change this.  See the comment immediately above it. :)
Attachment #186915 - Flags: review-
Attachment #187245 - Flags: review?(justdave)
Attachment #186915 - Attachment is obsolete: true
Attachment #187245 - Flags: review?(justdave) → review+
Flags: approval? → approval+
Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.297; previous revision: 1.296
done
Checking in Bugzilla/Constants.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Constants.pm,v  <--  Constants.pm
new revision: 1.24; previous revision: 1.23
done
Checking in template/en/default/global/messages.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/messages.html.tmpl,v
 <--  messages.html.tmpl
new revision: 1.29; previous revision: 1.28
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.20
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: