Support for event time in addition to event date

Registered by Øystein Gammersvik on 2016-02-16

Currently the clients (web and Android TC and EC), only set the event date and not the time. The event time is needed for at least two things:
1. For a program rule to access a data value from the newest/previous/preceding etc event if there are several events in one day.
2. For a new aggregation operator to give the data value from the last event (https://blueprints.launchpad.net/dhis2/+spec/last-value-aggregation-operator)

The events API endpoint already supports sending the event-time as part of the eventDate. This makes it possible for the clients to add the event time.

Since not every project will need the event time, and the users in these cases should not be bothered with supplying the time, a configuration option should be added to the program stage configuration (backend and API):

Use event time:
- No
- User supplied
- Client system generated

The third option is to use a system generated time for projects always registering events as they happen in real-time (not allowing back entry). For offline-support this needs to be generated on the clients.

For old clients to be compatible with the added configuration, the default should be to not store any event time, like it is today.
New clients should consider this configuration option, asking the user for the event time if configured or picking a system time if configured.

Blueprint information

Status:
Not started
Approver:
Markus Bekken
Priority:
Undefined
Drafter:
Øystein Gammersvik
Direction:
Needs approval
Assignee:
None
Definition:
Pending Approval
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.