CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • My Cases not showing for user
Pages: [1]

Author Topic: My Cases not showing for user  (Read 6394 times)

myles

  • I post frequently
  • ***
  • Posts: 263
  • Karma: 11
My Cases not showing for user
July 17, 2013, 03:15:56 am
Seeking to construct this use-case...

We shall be using external people to manage certain cases.
We wish to restrict their access to CiviCRM data for anything but the case.

Test...

Test user created in Drupal 7 username TestCase
User assigned to a group 'Case Managers'

Case Managers given 'can access CiviCRM' and 'access my cases and activities'.

After that an administrator creates a case and assigns the case manager role to the test user..

The test user can see the case dashboard but there are no cases listed under 'my cases'  by which I mean a search for 'my cases' reveals nothing.

I've tried assigning various actions to them - nothing pops up at all.

I've also tried assigning the case to them by editing the 'create case activity and either changing the reporter or assigning it.
I've also tried entering them as a client

Nothing enables them to see the case 

Until..

Once I allow them access to view all contacts then they can see the case

But when they click on manage case (remembering that they are the case manager role) they receive the civicrm 'you are not authorised to access this page' notice.

This doesn't seem consistent with the documentation....

The following is a list of the CiviCase-related permissions:

Access my cases and activities: allows a user to create new cases, add activities to the cases they've created and edit those activities. Users with this permission can NOT see cases or activities created by others.
If you need to restrict certain users to ONLY see case data (i.e. hide all other contact information from them), assign "access my cases and activities" permission WITHOUT "edit and view contacts" permission. This permissioning model is useful for users who are external to your organisation and who should not be allowed to see contact details. 

FETmz

  • I’m new here
  • *
  • Posts: 18
  • Karma: -1
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.21
  • MySQL version: 5.5.31
  • PHP version: 5.3.10-1ubuntu3.6
Re: My Cases not showing for user
July 28, 2013, 08:15:38 pm
A possible explanation could be:

Core issue is that, a person cannot access a case (even if they are the case manager), if there is not an activity record (any activity record) in the next 14 days. Due to how civi is checking permissions in:

- CRM_Case_Page_Tab::preProcess() line 75
- CRM_Case_Form_CaseView::preProcess() line 102

The actual SQL is generated in CRM_Case_BAO_Case::getCaseActivityQuery(), which is called by CRM_Case_BAO_Case::getCases()
There are two SQL views civicrm_view_case_activity_recent and civicrm_view_case_activity_upcoming which have hard coded 14 day time periods.

Difficult to expand the 14 day window without impacting other parts of the system as the underlying SQL is not specific to permissions but to general searches / dashboard lists. Even if it was to be altered, there is no guarantee an activity will exist. Excluding the activity part of the query causes SQL errors.


To replicate, go to the case dashboard
- scroll down to "My Cases with Upcoming Activities" and "My Cases With Recently Performed Activities"
- Find a case which is on the "recent" list, but not the "upcoming" list.
- manage the case
- permissions error (when fatal permissions error is enabled).

Original feature in Civi:
http://issues.civicrm.org/jira/browse/CRM-5666

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • My Cases not showing for user

This forum was archived on 2017-11-26.