[API Tests] Data Administration - Option Set

Hi devs,

should it be possible to update existent Option Set type from ‘INTEGER’ to ‘TEXT’?

Test Case: https://github.com/dhis2/api-tests/blob/master/modules/data-admin/optionSet.js#L77

Failing Job: https://travis-ci.org/dhis2/api-tests/jobs/166211140

BR,

Paulo Grácio

Hi Paulo,

I would expect that this operation should be disallowed by the server. The reason for this is that once you have established that a given option set has a type “INTEGER” , you should not be able to change this afterwards to a different type. It seems the test is correct to me, but from the results of the test, it seems it is possible to update.

Maybe the developers can comment more?

Regards,

Jason

···

On Sun, Oct 9, 2016 at 5:58 PM, Paulo Grácio paulogracio@gmail.com wrote:

Hi devs,

should it be possible to update existent Option Set type from ‘INTEGER’ to ‘TEXT’?

Test Case: https://github.com/dhis2/api-tests/blob/master/modules/data-admin/optionSet.js#L77

Failing Job: https://travis-ci.org/dhis2/api-tests/jobs/166211140

BR,

Paulo Grácio


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hey Paolo,

We have made this action unavailable in the UI, as like Jason says, this is generally not something you would want.

I would say the test case is indeed correct. We should enforce the same logic on the server.

···

On Mon, Oct 10, 2016 at 6:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Paulo,

I would expect that this operation should be disallowed by the server. The reason for this is that once you have established that a given option set has a type “INTEGER” , you should not be able to change this afterwards to a different type. It seems the test is correct to me, but from the results of the test, it seems it is possible to update.

Maybe the developers can comment more?

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Sun, Oct 9, 2016 at 5:58 PM, Paulo Grácio paulogracio@gmail.com wrote:

Hi devs,

should it be possible to update existent Option Set type from ‘INTEGER’ to ‘TEXT’?

Test Case: https://github.com/dhis2/api-tests/blob/master/modules/data-admin/optionSet.js#L77

Failing Job: https://travis-ci.org/dhis2/api-tests/jobs/166211140

BR,

Paulo Grácio


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Regards,

Mark Polak

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

mark@dhis2.org

Hi Mark,

Ok. I’ll keep the test disabled for now and we can enable it again once the fix is released on the API side.

Thanks,

Paulo

···

On Mon, Oct 10, 2016 at 6:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Paulo,

I would expect that this operation should be disallowed by the server. The reason for this is that once you have established that a given option set has a type “INTEGER” , you should not be able to change this afterwards to a different type. It seems the test is correct to me, but from the results of the test, it seems it is possible to update.

Maybe the developers can comment more?

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Sun, Oct 9, 2016 at 5:58 PM, Paulo Grácio paulogracio@gmail.com wrote:

Hi devs,

should it be possible to update existent Option Set type from ‘INTEGER’ to ‘TEXT’?

Test Case: https://github.com/dhis2/api-tests/blob/master/modules/data-admin/optionSet.js#L77

Failing Job: https://travis-ci.org/dhis2/api-tests/jobs/166211140

BR,

Paulo Grácio


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Regards,

Mark Polak

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

mark@dhis2.org