akvo / akvo-flow

A data collection and monitoring tool that works anywhere.
http://akvo.org/products/akvoflow/
GNU Affero General Public License v3.0
65 stars 31 forks source link

Dashboard not rendering date correctly #875

Closed muloem closed 8 years ago

muloem commented 9 years ago

When displaying the pop-up for survey responses, the date is indicated as 1970-01-01 instead of the correct date that is present in the stored QuestionAnswerObject entity.

screen shot 2014-10-27 at 14 24 42

janagombitova commented 9 years ago

As part of unifying the dates throughout the dashboard, lets fix this issues together with how we render dates on the maps, in the data tab, with filtering on date, as well in the reports.

We need to decide how we will deal with the format, using iso standard? timezones?

Possibly related issues

  1. submission date on maps https://github.com/akvo/akvo-flow/issues/1389
  2. rendering date question type in maps https://github.com/akvo/akvo-flow/issues/571
  3. date question type in reports https://github.com/akvo/akvo-flow/issues/1139
  4. handling time zones https://github.com/akvo/akvo-flow/issues/257

@muloem Can you take a look at these issues?

muloem commented 8 years ago

@janagombitova regarding the changes connected to dates there are actually three separate issues that I can identify.

  1. the format in which to render on the dashboard. we should unify this and make it a simple one since its for the user. I would propose something like YYYY/mm/dd that is common enough on the dashboard and is what we use in the calendar selectors. (relevant for #1389 and #571 above)
  2. the format for reports that are exported to be imported into another external application. For this we could consider the ISO standard formatted reports but the main issue is that without timezone info from the devices we cannot tell which timezone the date values refer to. So this would actually need to go hand in hand with a change to include timezone information in responses on the device. (#1139 and #257)
  3. Format for dates to be imported via the data cleaning. This should also be a standard one that is simple enough for users not to make a mistake with. and probably not too different from the ones we have at the moment. Having users enter ISO standard formatted dates seems not too user-friendly.(also connected to #1139)
janagombitova commented 8 years ago

@muloem Thanks for the overview and suggestions. All sounds good. Should we address is one step at a time, or all at once?

janagombitova commented 8 years ago

Summary of the date format we currently show in the FLOW

(just to have an overview)

App In a form > 9 Mar 2016 (date question) History > Submitted/Saved/etc: 9 March 2016 12:04 Transmission History > Started/Finished: 2016-03-09 11:17:25

Dashboard Survey > Created/Modified: 09.03.2016 Inspect data tab > filter on Collected from/To: 2016/03/01 (submission info) Inspect data tab/Monitoring tab > when previewing all submissions: 2016-03-09 12:32 (submission info) Inspect data tab > viewing one submission: 2016/03/09 (date question) Devices list > Last contact in device list: 2016-03-09 12:34 Assignment list > Start date/End date: 2016/03/02 Map (current) > clicking on one point > 2016-03-09 11:36 (submission info) Map (current) > clicking on one point > 2016/03/09 (date question) Map (CartoDB) > clicking on one point > Wed, 09 Mar 2016 10:17:59 GMT (submission info) Map (CartoDB) > clicking on one point > Tue, 08 Mar 2016 (date question) Messages > Date: 2016-03-09 11:17

Raw data reports Submitted: 01-02-2016 11:30:28 UTC Date question: 08-03-2016 23:00:00 UTC

muloem commented 8 years ago

I believe all date issues are now handled by the fixes in #257 so I will close this one off.