dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34423
Re: Date not getting updated via /api/events
Hi
I'm not sure if this is a regression or not, when was the last time this
was working? I see from the code that it is validating against yyyy-MM-dd,
which means only that pattern is supported, the value itself is just saved
as a string in the database, so it must be the validation that is blocking.
Are you not getting any import summary back?
We could probably be a bit more lenient here, and try with
DateUtils.SUPPORT_DATE_FORMATS (and then fallback to regex).
--
Morten
On Mon, Dec 8, 2014 at 6:03 PM, Mahendra Kariya <
mahendra.kariya@xxxxxxxxxxxxxxxx> wrote:
> Hi,
>
> When we POST the following payload to /api/events, data values of type
> Date are not getting updated on DHIS. Is this is a bug or something is
> wrong with the payload?
>
> {
> "events": [
> {
> "event": "a41f6a7588c",
> "program": "a625b2495e7",
> "programStage": "ab17f8e7729",
> "orgUnit": "ad6c0962e85",
> "eventDate": "2014-12-08",
> "dataValues": [
> {
> "dataElement": "a4e69b09a1a",
> "value": "2014-11-30T18:30:00.000Z"
> },
> {
> "dataElement": "a77963446a8",
> "value": "a64365ac185"
> },
> {
> "dataElement": "a7553cdaae8",
> "value": "a65ad0e22c5"
> },
> {
> "dataElement": "a1cdb7aadac",
> "value": "Case123"
> },
> {
> "dataElement": "a69359d5e25",
> "value": "P123"
> },
> {
> "dataElement": "a675c686c59",
> "value": "2014-12-30T18:30:00.000Z"
> },
> {
> "dataElement": "a1172eb93b0",
> "value": 34
> },
> {
> "dataElement": "a643ad95b6f",
> "value": "aa0fba11d29"
> },
> {
> "dataElement": "af42f25a82b",
> "value": "a6855a511fe"
> },
> {
> "dataElement": "a3f0a11a265",
> "value": "a10a1d53cff"
> },
> {
> "dataElement": "a3c9bac136b",
> "value": "a593e3e8d62"
> },
> {
> "dataElement": "a7ecd7e906c",
> "value": "a2e8ebc9c10"
> },
> {
> "dataElement": "a2065e605cb",
> "value": "a80dec2a6fd"
> },
> {
> "dataElement": "a7f4da5e70b",
> "value": "a1ee90caece"
> },
> {
> "dataElement": "a719e533d10",
> "value": "a431a48c6d0"
> },
> {
> "dataElement": "a6c00b468ab",
> "value": "2014-11-30T18:30:00.000Z"
> }
> ]
> }
> ]
> }
>