[Bug 1485973] [NEW] Inconsistent behavior between dataValues and dataValueSets endpoints in regards to data set period expiry

Public bug reported:

When data is imported through the API through the dataValues end point,
it appears that if a data set which the data elements which are being
reported has an period which is locked (or expired) it is not possible
to import the data. You get a message like

{"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
set is locked"}

When you import the same data through the dataValueSets endpoint, it
works.

In this case, you get

{"responseType":"ImportSummary","status":"SUCCESS","description":"Import
process completed
successfully","importCount":{"imported":21,"updated":0,"ignored":0,"deleted":0},"dataSetComplete":"false"}

as an example.

This does not seem to be entirely consistent behavior.

Both end points should respect the period, approval and any other
"locks" like available orgunits and category option combos.

** Affects: dhis2
     Importance: Undecided
     Assignee: Morten Olav Hansen (mortenoh)
         Status: New

** Changed in: dhis2
     Assignee: (unassigned) => Morten Olav Hansen (mortenoh)

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1485973

Title:
  Inconsistent behavior between dataValues and dataValueSets endpoints
  in regards to data set period expiry

Status in DHIS:
  New

Bug description:
  When data is imported through the API through the dataValues end
  point, it appears that if a data set which the data elements which are
  being reported has an period which is locked (or expired) it is not
  possible to import the data. You get a message like

  {"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"Data
  set is locked"}

  When you import the same data through the dataValueSets endpoint, it
  works.

  In this case, you get

  {"responseType":"ImportSummary","status":"SUCCESS","description":"Import
  process completed
  successfully","importCount":{"imported":21,"updated":0,"ignored":0,"deleted":0},"dataSetComplete":"false"}

  as an example.

  This does not seem to be entirely consistent behavior.

  Both end points should respect the period, approval and any other
  "locks" like available orgunits and category option combos.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1485973/+subscriptions