Closed Bug 488027 Opened 15 years ago Closed 15 years ago

summarize_time.cgi compares strings using numeric lt (<)

Categories

(Bugzilla :: Bugzilla-General, defect)

3.3.4
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: LpSolit, Assigned: wicked)

References

Details

(Keywords: regression)

Attachments

(1 file)

summarize_time.cgi: Argument "2008-01-28" isn't numeric in numeric lt (<) at data/template/template/en/default/bug/summarize-time.html.tmpl line 499.

The line is:

  [% IF bugs.$id.deadline && global.deadline < bugs.$id.deadline %]


This is a regression due to bug 286452. Should be fixed before 3.4rc1.
Flags: blocking3.4+
Assignee: general → wicked
Status: NEW → ASSIGNED
You should try foo.deadline.replace("-", "") < bar.deadline.replace("-", ""). This should fix your problem as Perl is supposed to convert them to integers implicitly.
It worked perfectly. Additionally this patch protects from comparing with blank global deadline field that happens before a first non-blank bug deadline field is found.
Attachment #373566 - Flags: review?(LpSolit)
Comment on attachment 373566 [details] [diff] [review]
Fix numeric compare, V1

r=LpSolit
Attachment #373566 - Flags: review?(LpSolit) → review+
Flags: approval3.4+
Flags: approval+
Tip:
Checking in template/en/default/bug/summarize-time.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/summarize-time.html.tmpl,v  <--  summarize-time.html.tmpl
new revision: 1.15; previous revision: 1.14
done

3.4 branch:
Checking in template/en/default/bug/summarize-time.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/summarize-time.html.tmpl,v  <--  summarize-time.html.tmpl
new revision: 1.14.2.1; previous revision: 1.14
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: