dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #44075
Re: Unable to save selected Org. unit for a user - new importer
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@xxxxxxxxxxxxxxxx
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
On Fri, Mar 18, 2016 at 4:49 PM, Morten Olav Hansen <morten@xxxxxxxxx>
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@xxxxxxxxxxxxxxxx> wrote:
>
>> This is what I get when I access <server>/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@xxxxxxxxxxxxxxxx
>> Telephone +91 9100960533 <+91+9100960533>
>> [image: ThoughtWorks]
>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>
>> On Fri, Mar 18, 2016 at 4:39 PM, Morten Olav Hansen <morten@xxxxxxxxx>
>> wrote:
>>
>>> Ok, can you verify that there are no org units in
>>> <server>/api/users/LPbEQkdyiE3.json also?
>>>
>>> On Fri, Mar 18, 2016 at 5:59 PM, Archana Chillala <
>>> archanac@xxxxxxxxxxxxxxxx> wrote:
>>>
>>>> Here's the payload sent to the importer.
>>>>
>>>> PFA...the JSON file for the same.
>>>>
>>>> Archana Chillala
>>>> Application Developer
>>>> Email archanac@xxxxxxxxxxxxxxxx
>>>> Telephone +91 9100960533 <+91+9100960533>
>>>> [image: ThoughtWorks]
>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>
>>>> On Fri, Mar 18, 2016 at 4:26 PM, Archana Chillala <
>>>> archanac@xxxxxxxxxxxxxxxx> 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:
>>>>>
>>>>>
>>>>> [image: Inline image 2]
>>>>>
>>>>>
>>>>> After saving, when we click 'edit' user - this is what it looks like -
>>>>>
>>>>> [image: Inline image 4]
>>>>>
>>>>>
>>>>> 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@xxxxxxxxxxxxxxxx
>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>> [image: ThoughtWorks]
>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>
>>>>> On Fri, Mar 18, 2016 at 4:06 PM, Morten Olav Hansen <morten@xxxxxxxxx>
>>>>> 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@xxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
>>>>>>> Telephone +91 9100960533 <+91+9100960533>
>>>>>>> [image: ThoughtWorks]
>>>>>>> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Morten
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Morten
>>>
>>
>>
>
>
> --
> Morten
>
Follow ups
References