case sharing group

39 views
Skip to first unread message

Michel Akkaoui - de Sousa

unread,
Nov 26, 2016, 7:19:00 PM11/26/16
to commcare-users
Hi there, 

I have some issues regarding case sharing groups.
I've got two types of users : Field workers (ASBC) and medical staff at health facility (CSPS)
I've put them in locations so that each Field worker sees there own cases, and medical staff see the cases of several field workers. For each users, exactly one location.
I've also created groups, but they serve as reporting groups, not case sharing groups.

Here is the organisation levels : 

Here is the structure :

Here are the groups :

Here is an exemple of organization settings for a user :

Based on this configuration, I assumed that the user was in only one case sharing group.
Unfortunately, the phone says me whenever I try to open a form with user from the medical team that this user needs to be in exactly 1 case sharing group.

Could you please help me identify the issue here ?

Thanks in advance, 

Michel

Sheel Shah

unread,
Nov 28, 2016, 12:52:09 PM11/28/16
to commcar...@googlegroups.com
Hey Michel,

This error is likely appearing in a form that registers new cases.  Based on your configuration, any medical staff (those assigned to CSPS) have access to multiple locations that can own cases (i.e. each ASBC).  You'll need to setup the registration form so that the medical staff can choose which location they'd like to assign the case to.  You can do this by following the instructions here:

Thanks,
Sheel

--
You received this message because you are subscribed to the Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah


Michel Akkaoui - de Sousa

unread,
Nov 28, 2016, 4:19:59 PM11/28/16
to commcar...@googlegroups.com
Hi Sheel, 

Thanks for the answer.
Unfortunately, I was already doing this. I was using the location instance though. I just tried with the group instance as mentioned is the confluence link, but it failed again...

My previous configuration (locations) :

The configuration from the link (groups): 
https://dl.dropboxusercontent.com/spa/enxbvrwkrbi5b9e/1sqv3_ts.png

The case management for this : 

May I had that every forms of the app get the same error message when opening ? Not only the registering form, every single form of the app that require a case.

Any other hints ?

Michel Akkaoui
06 43 75 70 13
28 rue Raoul Ponchon, 49100 Angers

--
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/llmcW_lIMVI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-users+unsubscribe@googlegroups.com.

Michel Akkaoui - de Sousa

unread,
Nov 28, 2016, 4:22:20 PM11/28/16
to commcar...@googlegroups.com
oups, first link is wrong. here for the lookup configuration using locations : 

Too many copy/past from screenshots....

Michel Akkaoui
06 43 75 70 13
28 rue Raoul Ponchon, 49100 Angers

Michel Akkaoui - de Sousa

unread,
Nov 28, 2016, 4:31:06 PM11/28/16
to commcar...@googlegroups.com
And also something odd, there is only one user that is able to use the app without any error message : the one I use for testing. There is no error when creating or updating cases using the test user for CSPS and the one for test ASBC.

The real users (sic) created with a bulk upload are all having the issue. 
You can find attached the upload file I used.

In this file, I use the two first lines for testing.
The four last lines are the one having trouble. (CSPS location levels)

Michel Akkaoui
06 43 75 70 13
28 rue Raoul Ponchon, 49100 Angers

mobisan-service-3_users.xlsx

Sheel Shah

unread,
Nov 29, 2016, 2:53:44 PM11/29/16
to commcar...@googlegroups.com
Hi Michel,

Thanks for the information, the pictures and attachment is really helpful. 

Can you turn OFF case sharing in your application, make a new version and then update it.  Then test if the cases are being correctly assigned to the location / group. 

Can you also report an issue from your project space? 

Thanks,
Sheel

Michel Akkaoui - de Sousa

unread,
Nov 29, 2016, 3:06:06 PM11/29/16
to commcare-users
Hi Sheel, 

Actually, it won't be necessary...
I was just working on the project and found the glitch.

I was actually careless and assumed that the child cases I was creating in the same form as the parent case (which received the chosen location's owner_id) inherited the owner_id from their parents... I guess it wasn't true because in my last attempt, I forced this parameter the same way I did for the parents and it worked !

I still can't explain why my test users were able to do it and not the other...

Anyway, thanks for your insights !

Cheers, 

Michel
To unsubscribe from this group and stop receiving emails from it, send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah


--
You received this message because you are subscribed to a topic in the Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/commcare-users/llmcW_lIMVI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michel Akkaoui - de Sousa

unread,
Dec 2, 2016, 1:39:52 PM12/2/16
to commcare-users
One question though, it seems like owner_id can't be brought back using any methods. I tried so far :
  • easy reference in calculate condition
  • easy reference in default value
  • instance('commcaresession')/session/data/owner_id
  • instance('casedb')/casedb/case[@case_id=instance('commcaresession')/session/data/case_id]/index/owner_id (witch resulted in a crash in the app obviously)
  • instance('casedb')/casedb/case[@case_id=instance('commcaresession')/session/data/case_id]/owner_id
For each case, owner_id is blanck.

Could you please point me to the correct XPath sentence ?

Thanks a lot !

Michel

Cory Zue

unread,
Dec 2, 2016, 1:57:59 PM12/2/16
to commcar...@googlegroups.com
Hey Michel,

I believe it's instance('casedb')/casedb/case[@case_id=instance('commcaresession')/session/data/case_id]/@owner_id

(in case helpful, you can figure out special properties by looking at the structure of the casedb here and then using xpath against it - the "@" sign is necessary because owner_id is an attribute. you can ignore this if it doesn't help/make sense)


To unsubscribe from this group and stop receiving emails from it, send an email to commcare-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages