Fix issues with last update bubbles and timestamp comparison.

Review Request #4886 — Created Nov. 3, 2013 and submitted — Latest diff uploaded


Review Board


Fix issues with last update bubbles and timestamp comparison.

We had some issues with timestamp comparisons that we never really
noticed, due to pages reloading on updates.

First of all, the Last Activity timestamp recorded in the template
matched the timestamp in the Last Update resource, due to how we
converted those two timestamps, but neither of those matched any
timestamp fields in any other API resources. This is because we
serialized the two former timestamps ourselves using isoformat(), but
the API uses DjangoJSONEncoder, which further normalized the timestamps.

Because of this, we couldn't compare timestamps from API calls to the
last activity timestamps. Now that Djblets's json_dumps uses
DjangoJSONEncoder for timestamps, we can use that instead of calling
the 'date' filter ourselves, and get some consistency across all

Now that that's done, we can mark the review request as updated when we
publish a reply, preventing an update bubble from appearing.

Set the Check Updates timestamp to be very low, and replied to a review.
Published the reply. I didn't see an update bubble, unlike before this
change. I verified through the API calls and template that the timestamps
were what I expected.