← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 1563559] Re: [Api] Adding/Removing a legendSet to an existing dataElement/indicator using PUT

 

Agreed. Will adjust for it ;) Funny i haven't run into that before.

On Wed, Mar 30, 2016 at 9:32 AM, Morten Olav Hansen <
1563559@xxxxxxxxxxxxxxxxxx> wrote:

> Yeah, well the default for our entire API is mergeMode=MERGE (it has
> been since day 1), so no.. it will not just replace the object with what
> you send.. by default..
>
> You need to use mergeMode=REPLACE for that
>
> I'm sure it could be discussed if that should be the default, but I
> think a this point it would be a breaking change.. not something we
> really want
>
> ** Changed in: dhis2
>        Status: Incomplete => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1563559
>
> Title:
>   [Api] Adding/Removing a legendSet to an existing dataElement/indicator
>   using PUT
>
> Status in DHIS:
>   Invalid
>
> Bug description:
>   I'm attempting to add a legendSet to an existing dataElement. While
>   the api seems to return updated: 1 it does not actually add the
>   legendSet to the object.
>
>   Reproduce add:
>   + GET
> https://play.dhis2.org/dev/api/dataElements/FTRrcoaog83.json?fields=:owner
>   + Add part to the payload "legendSet": {"id": "Yf6UHoPkdS6"}
>   + PUT the payload back to the server
>   + The dataElement is not updated with the new LegendSet
>
>   Reproduce remove:
>   + GET
> https://play.dhis2.org/dev/api/dataElements/qrur9Dvnyt5.json?fields=:owner
>   + Remove legendSet part or set to null
>   + PUT the payload back to the server
>   + LegenSet is still available on the object
>
>   Might be related to the earlier reported
>   https://bugs.launchpad.net/dhis2/+bug/1563546
>
>   EDIT: Also seems to apply to /api/indicator
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1563559/+subscriptions
>


-- 
Regards,


Mark Polak
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org <https://www.dhis2.org/>
mark@xxxxxxxxx

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

Title:
  [Api] Adding/Removing a legendSet to an existing dataElement/indicator
  using PUT

Status in DHIS:
  Invalid

Bug description:
  I'm attempting to add a legendSet to an existing dataElement. While
  the api seems to return updated: 1 it does not actually add the
  legendSet to the object.

  Reproduce add:
  + GET https://play.dhis2.org/dev/api/dataElements/FTRrcoaog83.json?fields=:owner
  + Add part to the payload "legendSet": {"id": "Yf6UHoPkdS6"}
  + PUT the payload back to the server
  + The dataElement is not updated with the new LegendSet

  Reproduce remove:
  + GET https://play.dhis2.org/dev/api/dataElements/qrur9Dvnyt5.json?fields=:owner
  + Remove legendSet part or set to null
  + PUT the payload back to the server
  + LegenSet is still available on the object

  Might be related to the earlier reported
  https://bugs.launchpad.net/dhis2/+bug/1563546

  EDIT: Also seems to apply to /api/indicator

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


References