Calendar Day view fails when hour is 00:xx JavaScript error: app://calendar.gaiamobile.org/js/views/current_time.js, line 115: displayHour is null

VERIFIED FIXED in 2.1 S2 (15aug)

Status

Firefox OS
Gaia::Calendar
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: zac, Assigned: millermedeiros)

Tracking

unspecified
2.1 S2 (15aug)
x86_64
Linux

Firefox Tracking Flags

(b2g-v1.4 unaffected, b2g-v2.0 unaffected, b2g-v2.1 affected)

Details

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
Created attachment 8467843 [details]
Screenshot from 2014-08-06 00:10:03.png

Using desktopb2g, the Day view fails when the system hour is 00:xx

This has been failing in automation and can be replicated manually.

STR:
1. Set system clock to 00:0x
2. Load desktopb2g
3. Open calendar app
4. Click 'Day' view

The following error message is present in the gecko.log:
JavaScript error: app://calendar.gaiamobile.org/js/views/current_time.js, line 115: displayHour is null


I used a nightly build of linux64 b2g with a locally build profile:
Build ID 20140805040204
Platform 34.0a1
Gaia commit aa37e20de9c892f1bc169b40f7c77966b317f027

Updated

3 years ago
Blocks: 966189
(Reporter)

Comment 1

3 years ago
This is also causing the class that is applied to the HTML to be incorrect when an event is created that is starting in 00:xx hour. In the following snippet, hour should be (or, used to be) hour-0.

> class="hour hour- "

STR (device and desktopb2g)
1. Load calendar app
2. Create event starting for 00:01 - 01:00
3. Inspect HTML to see the incorrect class applied.


-------------

<section class="day-events" id="event-list"><section data-hour="" class="hour hour- "><div class="hour-header"><span class="display-hour" data-date="Mon Aug 04 2014 00:00:00 GMT-0700 (PDT)" data-l10n-date-format="hour-format">12 AM</span></div><div class="events"><section data-id="local-first-4ad0aed6-1fb5-41bf-befb-27f08151b8ec-ff02e776-de35-49ce-93bd-0b1e07fce247" class="event calendar-id-local-first has-alarms" style="height: calc(100% - 0.1rem);"><div class="container calendar-id-local-first"><div class="gaia-icon icon-calendar-dot calendar-text-color"></div><div class="event-time"><div class="start-time">12:00 AM</div><div class="end-time">1:00 AM</div></div><div class="event-details"><h5>Event Title 23:39:29</h5><span class="details"><span class="location">Event Location 23:39:29</span></span></div><div class="gaia-icon icon-calendar-alarm calendar-text-color"></div></div></section></div></section></section>
(Reporter)

Comment 2

3 years ago
When you land the fix for this can you also revert this commit:
https://github.com/mozilla-b2g/gaia/commit/1cbb253e32670a61cd8b7245877a9ed762d3b715

To re-enable the test coverage that found this bug. Thanks!
(Assignee)

Updated

3 years ago
Assignee: nobody → mmedeiros
Target Milestone: --- → 2.1 S2 (15aug)
(Assignee)

Comment 3

3 years ago
it is caused by the way our templates handle falsy values (converts all falsy values into an empty string), I'm going to change the behavior to avoid this kind of mistake.
status-b2g-v1.4: --- → unaffected
status-b2g-v2.0: --- → unaffected
status-b2g-v2.1: --- → affected
(Assignee)

Comment 4

3 years ago
Created attachment 8468754 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/22595
Attachment #8468754 - Flags: review?(gaye)
https://hg.mozilla.org/mozilla-central/rev/93a60da81921
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

3 years ago
Wes, the calendar bug that introduced this regression is not fixed!! (my patch did not land yet), the test was disabled (and needs to be re-enabled after the fix lands on master).
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Reporter)

Comment 7

3 years ago
oops, I re-enabled the test thinking that this had landed!

Comment 8

3 years ago
This was caused by bug 912788 (in the tool used to close bugs) - Wes until that bug is fixed please untick the bumper bot commits when marking b2g-inbound merges :-)

Comment 9

3 years ago
Comment on attachment 8468754 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/22595

Hi Miller,

The patch looks good. We could merge it.

Currently, the `apps/calendar/test/marionette/day_view_test.js` test are failed[1] once it runs during 00:00 to 00:59.

[1] https://tbpl.mozilla.org/php/getParsedLog.php?id=45649837&tree=Gaia-Try#error3
Attachment #8468754 - Flags: review+
Merged to stop the intermittent test failures:
https://github.com/mozilla-b2g/gaia/commit/3d13ec3ec7df920fea06a99a369e930239677dd7
Status: REOPENED → RESOLVED
Last Resolved: 3 years ago3 years ago
Resolution: --- → FIXED
[Environment]
Gaia      fbb297c39aab5f17b179533d2a9a6c5166b2c197
Gecko     https://hg.mozilla.org/releases/mozilla-aurora/rev/fb5e796da813
BuildID   20140902160204
Version   34.0a2
ro.build.version.incremental=eng.cltbld.20140820.195518
ro.build.date=Wed Aug 20 19:55:28 EDT 2014


[Result]
PASS
Status: RESOLVED → VERIFIED
(Assignee)

Updated

3 years ago
Attachment #8468754 - Flags: review?(gaye)
You need to log in before you can comment on or make changes to this bug.