Clone User Issue

Hello,

We noticed on our dhis2 (2.37), when we clone a user to create another one, the createdby field does not change, it keeps the creator of the source user.

Is it a bug ?

Regards

1 Like

Hi @didate . Thanks for reporting this. I can’t reproduce this problem on 2.37 play instance. It might have been a bug in an earlier version of 2.37. Which version are you using?

1 Like

Hello @tzemp

I’m using the same version.

I tried to reproduce in play version, but the API does not display the createdby field. I’ve used the following query :

https://play.dhis2.org/2.37.9.1/api/37/users/OhBMBATrkP7.json?fields=userCredentials[id,username,lastLogin,createdBy,lastUpdatedBy]

In my instance this query give me the created by field

How can I show the createdBy field by API on play instance ?

@didate : createdBy is an optional property, so not all users have it. If you create a new user through the api, userCredentials.createdBy should be populated.

1 Like

Thank you @tzemp

I confirm there is a bug, see following screen : didate was created by admin (John Traoré) and didate2 has been created by didate (Machin Machin) but the API show admin as didate2 creator.

NB : I’ve open a bug in jira : [DHIS2-15595] - Jira

1 Like