Closed Bug 661350 Opened 14 years ago Closed 14 years ago

"ghetto_time_ago_in_words" returns empty string for times under 3 minutes

Categories

(Socorro :: General, task)

x86_64
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rhelmer, Assigned: brandon)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

We should inspect all uses of this function and rename or replace it with something that has more reasonable behavior. I assume that somewhere in the codebase returning an empty string is desired, I think that should be local or at least configurable behavior, not the default for a general-purpose time formatting function. See bug 661153 for a concrete example of the bug here.
Target Milestone: 2.0 → 2.1
Assignee: nobody → laura
I opted not to rewrite this function. It may not represent the best PHP but it could be fixed within the scope of the bug and without a rewrite. The function now returns the number of seconds if less than 1 minute, and figures out the time after that. This patch also improves the way the front end handles the returned data to be more consistent.
Assignee: laura → bsavage
Status: NEW → ASSIGNED
Attachment #547107 - Flags: review?(laura)
The previous test had a bug, this fixes that bug.
Attachment #547107 - Attachment is obsolete: true
Attachment #547107 - Flags: review?(laura)
Attachment #547112 - Flags: review?(laura)
Comment on attachment 547112 [details] [diff] [review] Making sure tests will pass Please change "Givens" to "Gives" as it makes my head hurt :) This is better, and will do for now.
Attachment #547112 - Flags: review?(laura) → review+
This issue was fixed prior to branching 2.1.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Is this QA-testable? If not, can we add [qa-], since it also has a unit test? Thanks!
Whiteboard: [qa-]
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: