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) »
  • How do I find all the cases where mr Y has a specific role?
Pages: [1]

Author Topic: How do I find all the cases where mr Y has a specific role?  (Read 2008 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
How do I find all the cases where mr Y has a specific role?
October 17, 2011, 05:45:00 am
Hi,

Is this normal that only the cases where the contact is a client are listed in the case tab? That's a different logic than for activities (where the tab is containing all the activities, no matter if the contact is the creator or assigned or with), isn't it?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How do I find all the cases where mr Y has a specific role?
October 17, 2011, 07:26:41 am

yes. Cases were designed to revolve around the "case client" and hence that behavior

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How do I find all the cases where mr Y has a specific role?
October 17, 2011, 10:07:23 am
Hi,

Say that doctors have a "first evaluation" activity with the client (part of the case). How do I find for a doctor all the first evaluation she has done?

The activities that are part of a case a removed from all the contacts activity tab (not only from the client activity tab), so you can't find it from the activity tab, nor from the case tab.

Am I missing something?

The goal is to find all the cases from a  non client contact, either from an activity or from the case. How do you do that?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How do I find all the cases where mr Y has a specific role?
October 17, 2011, 11:59:41 pm
I am not sure I understand what you are after but....would you not get the list of all 'first evaluations' if you check the activities of the doctor?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How do I find all the cases where mr Y has a specific role?
October 18, 2011, 01:10:56 am
What I'm after in a way to see from the contact page a list of all the cases that contact has been involved with, no matter her role in the case.

As it doesn't seem to be possible at the case level, I was trying to do the search based on the activity (each case is going to have a specific activity I can use as a proxy).

However, it seems that the activities that belong to a case are not displayed in the normal activity tab. Not sure if it's a bug or a feature, but when I assigned (from the activity tab) an activity to a case, it was removed from the activity tab.

So I'm trying to find a way, but neither the case nor the activity seem to be visible from the contact, unless the contact is the client (in that case he got the case)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How do I find all the cases where mr Y has a specific role?
October 18, 2011, 01:59:09 am
Hmmm I have a few issues with case activities being separate from 'normal' activities too....
I assume by
Quote
a list of all the cases that contact has been involved with
you mean the cases that the contact either has a direct relationship with or has activities in? If not, you would also get all the indirect relations and that would be a bit much?
So am I correct in assuming you can only get the data you want by accessing the MySQL tables directly?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How do I find all the cases where mr Y has a specific role?
October 18, 2011, 02:10:30 am
Quote from: Erik Hommel on October 18, 2011, 01:59:09 am
Hmmm I have a few issues with case activities being separate from 'normal' activities too....

I understand the logic of case only for client (even so I'd prefer having the case in the tab for all the relationship of the case), can understand too the logic of hiding the activities from the activity tab if they are related to a case, but not being able to access an activity of a contact neither from the case nor the activity is a bug IMO

Quote from: Erik Hommel on October 18, 2011, 01:59:09 am
I assume by
Quote
a list of all the cases that contact has been involved with
you mean the cases that the contact either has a direct relationship with or has activities in?

Yes.

Quote from: Erik Hommel on October 18, 2011, 01:59:09 am
So am I correct in assuming you can only get the data you want by accessing the MySQL tables directly?

Haven't checked what you can get out of the api, but if it doesn't exist already, think it should be an option from api.activity.get (that is already a bit hairy).

How do you deal with the vanished activities (the ones in a case where the contact isn't the client)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How do I find all the cases where mr Y has a specific role?
October 18, 2011, 02:26:12 am
Hmmm not sure, but from what I have seen I would guess you need to to check if the contact has either been an assignee or a target by checking the tables?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How do I find all the cases where mr Y has a specific role?
October 18, 2011, 06:16:02 am

can u edit:

CRM/Case/Info.php

and change

                       'showActivitiesInCore' => 0

to

                       'showActivitiesInCore' => 1

I suspect this will do what u need :)

lbo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How do I find all the cases where mr Y has a specific role?
October 18, 2011, 06:35:22 am
Nice one, will check that!
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: How do I find all the cases where mr Y has a specific role?
October 20, 2011, 11:22:05 pm
If a role is assigned, case summary report has filters to find this.

But if you're just looking for "show me cases where person X is involved in an activity on that case", then I don't think there is an existing way to do this.


xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How do I find all the cases where mr Y has a specific role?
October 21, 2011, 08:34:24 am
Quote from: demeritcowboy on October 20, 2011, 11:22:05 pm
But if you're just looking for "show me cases where person X is involved in an activity on that case", then I don't think there is an existing way to do this.

What was the reasoning of not putting them in the case tab? (it never occurred to me they would only be there for the client)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: How do I find all the cases where mr Y has a specific role?
October 23, 2011, 02:16:30 pm
It just wasn't a requirement. Cases tab shows the cases for that client, and if someone has a role in a case you can find them through a report, or relationship to the client. There just wasn't a need for more than that.

Then the reason for not having case activities appear on the activities tab is a separate thing that was specific to the Physician Health program, having to do with separating the clinical side of their business from non-clinical (e.g. education/training workshops), both from operational convenience as well as the higher privacy requirements of the clinical side.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How do I find all the cases where mr Y has a specific role?
October 24, 2011, 10:00:30 pm
Quote from: demeritcowboy on October 23, 2011, 02:16:30 pm
It just wasn't a requirement. Cases tab shows the cases for that client, and if someone has a role in a case you can find them through a report, or relationship to the client. There just wasn't a need for more than that.

IMO the rapport isn't very convenient to simply see the case where a specific contact is involved with, and relationship doesn't tell you which case it is, or if they are several.

(related topic, I never liked case polluting the relationship tab I'd much rather have the cases in the case and not put the case relationships in the relationship).

Quote from: demeritcowboy on October 23, 2011, 02:16:30 pm

Then the reason for not having case activities appear on the activities tab is a separate thing that was specific to the Physician Health program, having to do with separating the clinical side of their business from non-clinical (e.g. education/training workshops), both from operational convenience as well as the higher privacy requirements of the clinical side.

You could use activity filter anyway by activity type as a way of separating, isn't it?
(I might try to add a "associated with case" filter, unchecked by default)

As for the privacy, are you sure the case activities don't appear in any activity search/advanced search/report? Pretty sure they are (and that's a good thing IMO)

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: How do I find all the cases where mr Y has a specific role?
October 25, 2011, 07:14:25 pm
Quote from: xavier on October 24, 2011, 10:00:30 pm
You could use activity filter anyway by activity type as a way of separating, isn't it?
(I might try to add a "associated with case" filter, unchecked by default)

As for the privacy, are you sure the case activities don't appear in any activity search/advanced search/report? Pretty sure they are (and that's a good thing IMO)

X+

I don't think either of those was available during the project's initial scoping when civi 2.1 was the current stable release. In any case it's what I would call a "weak" privacy requirement, where it's convenient to keep them separate and if possible those who don't need it shouldn't see it, as opposed to a "strong" privacy requirement where only certain people are allowed to see it. (Or fuzzy vs. strict, if you like.)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCase (Moderator: Dave Greenberg) »
  • How do I find all the cases where mr Y has a specific role?

This forum was archived on 2017-11-26.