Unable to save selected Org. unit for a user - new importer

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

···

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

···

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks


Morten

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])

  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])

  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])

  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

···

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

user_payload.json (3.47 KB)

···

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

···

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Morten

This is what I get when I access /api/users/LPbEQkdyiE3.json

{

“httpStatus”: “Not Found”,

“httpStatusCode”: 404,

“status”: “ERROR”,

“message”: “User with id LPbEQkdyiE3 could not be found.”

}

···

On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen morten@dhis2.org wrote:

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Hm ok, I just took the first UID I saw… so you are not importing the whole payload you sent me?

Try again with EWLx0WdzWWr which seems to be the one being reported on…

···

On Fri, Mar 18, 2016 at 6:14 PM, Archana Chillala archanac@thoughtworks.com wrote:

This is what I get when I access /api/users/LPbEQkdyiE3.json

{

“httpStatus”: “Not Found”,

“httpStatusCode”: 404,

“status”: “ERROR”,

“message”: “User with id LPbEQkdyiE3 could not be found.”

}

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen morten@dhis2.org wrote:

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Morten

With EWLx0WdzWWr, the payload is:

{

“lastUpdated”: “2016-03-18T10:51:59.463+0000”,

“id”: “EWLx0WdzWWr”,

“href”: “http://localhost:8080/api/users/EWLx0WdzWWr”,

“created”: “2016-03-18T10:49:09.213+0000”,

“name”: “kodi anil”,

“displayName”: “kodi anil”,

“externalAccess”: false,

“surname”: “anil”,

“firstName”: “kodi”,

“access”: {

“read”: true,

“update”: true,

“externalize”: false,

“delete”: true,

“write”: true,

“manage”: false

},

“userCredentials”: {

“created”: “2016-03-18T10:49:09.217+0000”,

“lastLogin”: “2016-03-18T10:49:09.123+0000”,

“passwordLastUpdated”: “2016-03-18T10:49:09.123+0000”,

“invitation”: false,

“externalAuth”: false,

“selfRegistered”: false,

“disabled”: false,

“username”: “anil”,

“userInfo”: {

“id”: “EWLx0WdzWWr”

},

“user”: {

“id”: “tDCAuNDMAwM”

},

“cogsDimensionConstraints”: [],

“catDimensionConstraints”: [],

“userRoles”: [

{

“id”: “WgyN1LHRB4u”

}

]

},

“teiSearchOrganisationUnits”: [],

“organisationUnits”: [],

“dataViewOrganisationUnits”: [],

“userGroupAccesses”: [],

“attributeValues”: [],

“userGroups”: []

}

···

On Fri, Mar 18, 2016 at 4:49 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, I just took the first UID I saw… so you are not importing the whole payload you sent me?

Try again with EWLx0WdzWWr which seems to be the one being reported on…

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 6:14 PM, Archana Chillala archanac@thoughtworks.com wrote:

This is what I get when I access /api/users/LPbEQkdyiE3.json

{

“httpStatus”: “Not Found”,

“httpStatusCode”: 404,

“status”: “ERROR”,

“message”: “User with id LPbEQkdyiE3 could not be found.”

}

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen morten@dhis2.org wrote:

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Hm ok, is your dhis2 synced with the very latest changes? (I assume you are using the metadata sync branch?)

I’m not currently able to reproduce…

···

On Fri, Mar 18, 2016 at 6:32 PM, Archana Chillala archanac@thoughtworks.com wrote:

With EWLx0WdzWWr, the payload is:

{

“lastUpdated”: “2016-03-18T10:51:59.463+0000”,

“id”: “EWLx0WdzWWr”,

“href”: “http://localhost:8080/api/users/EWLx0WdzWWr”,

“created”: “2016-03-18T10:49:09.213+0000”,

“name”: “kodi anil”,

“displayName”: “kodi anil”,

“externalAccess”: false,

“surname”: “anil”,

“firstName”: “kodi”,

“access”: {

“read”: true,

“update”: true,

“externalize”: false,

“delete”: true,

“write”: true,

“manage”: false

},

“userCredentials”: {

“created”: “2016-03-18T10:49:09.217+0000”,

“lastLogin”: “2016-03-18T10:49:09.123+0000”,

“passwordLastUpdated”: “2016-03-18T10:49:09.123+0000”,

“invitation”: false,

“externalAuth”: false,

“selfRegistered”: false,

“disabled”: false,

“username”: “anil”,

“userInfo”: {

“id”: “EWLx0WdzWWr”

},

“user”: {

“id”: “tDCAuNDMAwM”

},

“cogsDimensionConstraints”: [],

“catDimensionConstraints”: [],

“userRoles”: [

{

“id”: “WgyN1LHRB4u”

}

]

},

“teiSearchOrganisationUnits”: [],

“organisationUnits”: [],

“dataViewOrganisationUnits”: [],

“userGroupAccesses”: [],

“attributeValues”: [],

“userGroups”: []

}

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:49 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, I just took the first UID I saw… so you are not importing the whole payload you sent me?

Try again with EWLx0WdzWWr which seems to be the one being reported on…

On Fri, Mar 18, 2016 at 6:14 PM, Archana Chillala archanac@thoughtworks.com wrote:

This is what I get when I access /api/users/LPbEQkdyiE3.json

{

“httpStatus”: “Not Found”,

“httpStatusCode”: 404,

“status”: “ERROR”,

“message”: “User with id LPbEQkdyiE3 could not be found.”

}

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen morten@dhis2.org wrote:

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Morten

Yes, with the latest code from metadata version.

Oh, Morten, I figured out - it’s the caching issue. I could save the user with org. unit only when in incognito mode.

Thanks for your time.

···

On Fri, Mar 18, 2016 at 5:22 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, is your dhis2 synced with the very latest changes? (I assume you are using the metadata sync branch?)

I’m not currently able to reproduce…

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 6:32 PM, Archana Chillala archanac@thoughtworks.com wrote:

With EWLx0WdzWWr, the payload is:

{

“lastUpdated”: “2016-03-18T10:51:59.463+0000”,

“id”: “EWLx0WdzWWr”,

“href”: “http://localhost:8080/api/users/EWLx0WdzWWr”,

“created”: “2016-03-18T10:49:09.213+0000”,

“name”: “kodi anil”,

“displayName”: “kodi anil”,

“externalAccess”: false,

“surname”: “anil”,

“firstName”: “kodi”,

“access”: {

“read”: true,

“update”: true,

“externalize”: false,

“delete”: true,

“write”: true,

“manage”: false

},

“userCredentials”: {

“created”: “2016-03-18T10:49:09.217+0000”,

“lastLogin”: “2016-03-18T10:49:09.123+0000”,

“passwordLastUpdated”: “2016-03-18T10:49:09.123+0000”,

“invitation”: false,

“externalAuth”: false,

“selfRegistered”: false,

“disabled”: false,

“username”: “anil”,

“userInfo”: {

“id”: “EWLx0WdzWWr”

},

“user”: {

“id”: “tDCAuNDMAwM”

},

“cogsDimensionConstraints”: [],

“catDimensionConstraints”: [],

“userRoles”: [

{

“id”: “WgyN1LHRB4u”

}

]

},

“teiSearchOrganisationUnits”: [],

“organisationUnits”: [],

“dataViewOrganisationUnits”: [],

“userGroupAccesses”: [],

“attributeValues”: [],

“userGroups”: []

}

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:49 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, I just took the first UID I saw… so you are not importing the whole payload you sent me?

Try again with EWLx0WdzWWr which seems to be the one being reported on…

On Fri, Mar 18, 2016 at 6:14 PM, Archana Chillala archanac@thoughtworks.com wrote:

This is what I get when I access /api/users/LPbEQkdyiE3.json

{

“httpStatus”: “Not Found”,

“httpStatusCode”: 404,

“status”: “ERROR”,

“message”: “User with id LPbEQkdyiE3 could not be found.”

}

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen morten@dhis2.org wrote:

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Ok, great you figured it out :slight_smile:

···

On Fri, Mar 18, 2016 at 7:16 PM, Archana Chillala archanac@thoughtworks.com wrote:

Yes, with the latest code from metadata version.

Oh, Morten, I figured out - it’s the caching issue. I could save the user with org. unit only when in incognito mode.

Thanks for your time.

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 5:22 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, is your dhis2 synced with the very latest changes? (I assume you are using the metadata sync branch?)

I’m not currently able to reproduce…

On Fri, Mar 18, 2016 at 6:32 PM, Archana Chillala archanac@thoughtworks.com wrote:

With EWLx0WdzWWr, the payload is:

{

“lastUpdated”: “2016-03-18T10:51:59.463+0000”,

“id”: “EWLx0WdzWWr”,

“href”: “http://localhost:8080/api/users/EWLx0WdzWWr”,

“created”: “2016-03-18T10:49:09.213+0000”,

“name”: “kodi anil”,

“displayName”: “kodi anil”,

“externalAccess”: false,

“surname”: “anil”,

“firstName”: “kodi”,

“access”: {

“read”: true,

“update”: true,

“externalize”: false,

“delete”: true,

“write”: true,

“manage”: false

},

“userCredentials”: {

“created”: “2016-03-18T10:49:09.217+0000”,

“lastLogin”: “2016-03-18T10:49:09.123+0000”,

“passwordLastUpdated”: “2016-03-18T10:49:09.123+0000”,

“invitation”: false,

“externalAuth”: false,

“selfRegistered”: false,

“disabled”: false,

“username”: “anil”,

“userInfo”: {

“id”: “EWLx0WdzWWr”

},

“user”: {

“id”: “tDCAuNDMAwM”

},

“cogsDimensionConstraints”: [],

“catDimensionConstraints”: [],

“userRoles”: [

{

“id”: “WgyN1LHRB4u”

}

]

},

“teiSearchOrganisationUnits”: [],

“organisationUnits”: [],

“dataViewOrganisationUnits”: [],

“userGroupAccesses”: [],

“attributeValues”: [],

“userGroups”: []

}

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:49 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hm ok, I just took the first UID I saw… so you are not importing the whole payload you sent me?

Try again with EWLx0WdzWWr which seems to be the one being reported on…

On Fri, Mar 18, 2016 at 6:14 PM, Archana Chillala archanac@thoughtworks.com wrote:

This is what I get when I access /api/users/LPbEQkdyiE3.json

{

“httpStatus”: “Not Found”,

“httpStatusCode”: 404,

“status”: “ERROR”,

“message”: “User with id LPbEQkdyiE3 could not be found.”

}

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen morten@dhis2.org wrote:

Ok, can you verify that there are no org units in /api/users/LPbEQkdyiE3.json also?

On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala archanac@thoughtworks.com wrote:

Here’s the payload sent to the importer.

PFA…the JSON file for the same.

Morten

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

There are no errors in the logs.

Here are the logs when creating a user after selecting an org. unit.

  • INFO 2016-03-18 16:19:09,213 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,214 ‘HQ_admin’ create org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-195])
  • INFO 2016-03-18 16:19:09,217 ‘HQ_admin’ create org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: SuOpRuGGf72 (AuditLogUtil.java [qtp22690626-195])

Screenshot while saving user:

After saving, when we click ‘edit’ user - this is what it looks like -

Logs while updating the user:

  • INFO 2016-03-18 16:21:59,462 ‘HQ_admin’ update org.hisp.dhis.user.UserCredentials, name: admin HQ, uid: NMlkIlYQCfS (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,463 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])
  • INFO 2016-03-18 16:21:59,464 ‘HQ_admin’ update org.hisp.dhis.user.User, name: kodi anil, uid: EWLx0WdzWWr (AuditLogUtil.java [qtp22690626-193])

Any thoughts?

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Archana

Could you share the exact payload your are sending to the importer? I already have tests for this, and it works fine… so there might be something different on your end…

Also, are you getting any kind of error reports back?

On Fri, Mar 18, 2016 at 5:28 PM, Archana Chillala archanac@thoughtworks.com wrote:

Hi Morten,

I am using DHIS 2.23 and have the new importer. I have tried to create a user by assigning a role and an organisation unit to it and saved it. But, when we edit the user and see, no org. units are selected (even if they have been selected while creating).

This was working fine with the old importer. But, after taking the latest code for the new importer, the issue arose.

Could you please look into the issue ASAP. It’s blocking other related work.

Thanks

Archana Chillala
Application Developer
Email
archanac@thoughtworks.com
Telephone
+91 9100960533
ThoughtWorks

Morten

Morten