← Back to team overview

dhis2-devs team mailing list archive

[Bug 1563546] Re: [Api] Removing an optionSet from dataElement

 

Hi,

I was not able to reproduce this. I was easily able to change a data
elements legendset from one ID to another.

When it comes to clearing out, remember that default mergeMode is MERGE,
which means null values will be ignored.. you need to set
mergeMode=REPLACE if you want to clear out properties.

Could you try to PUT again, and see if you can change the legend set? if
you can

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

Title:
  [Api] Removing an optionSet from dataElement

Status in DHIS:
  Invalid

Bug description:
  Heya,

  When iI attempt to PUT back an /api/dataElement/<id>?fields=:owner
  object back to the api i can't seem to remove the optionSet value that
  is set on the dataElement.

  I have attempted both leaving the property out  of the payload all
  together and sending a `null` value. Both seem to not remove the value
  that is set and the property keeps it's old value.

  To reproduce:
  + Add an optionSet to a dataElement
  + Attempt to remove it using a PUT operation

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


References