Closed Bug 1109887 Opened 10 years ago Closed 10 years ago

Showing duration on event edit shouldn't show anything if duration is not known

Categories

(Webtools Graveyard :: Air Mozilla, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Unassigned)

Details

(Whiteboard: [good first bug])

Attachments

(1 file)

See attached screenshot. The template is event_edit.html
Whiteboard: [good first bug]
Strange! Thing is, I managed to take that screenshot but the code was never without the `if event.duration`. It's always been there (see https://github.com/mozilla/airmozilla/commit/9976d7ca866a3bdc7660df3529d77051c0cb1910#diff-7) Now I'm wondering if there's a particular value for `event.duration` that might make `show_duration()` function (https://github.com/mozilla/airmozilla/blob/master/airmozilla/base/helpers.py#L34) possibly return an empty string.
I think this could happen when the duration is < 60 seconds and include_seconds=False, maybe the way to go is to add a new case and print something like 'less than a minute'.
(In reply to Leonard Camacho [:lcamacho] from comment #3) > I think this could happen when the duration is < 60 seconds and > include_seconds=False, maybe the way to go is to add a new case and print > something like 'less than a minute'. I would actually like to see "32 seconds" for example, if it's less than 1 minute. So, do we just need to pass `include_seconds=True` there in the event_edit.html template? Do you want to write a PR that does this? One with a test that renders the event_edit.html view and looks for it there.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: