2

I'm on Drupal 7 and CiviCRM 5.10 (yes, I'll update to 5.12 this weekend). I have a case with multiple case status: Active, Maintenance, Closed. When case activities are entered in the system, it doesn't seem to save the case status at the time the case activity is entered. For example:

  • 4/26/19 Case Opened
  • 4/26/19 Client meeting
  • 4/28/19 Case status changed from active to maintainence
  • 4/30/19 Housing visit
  • 4/31/19 Housing visit

If I were to create a Views report of the case activities, I see that the case status for 4/26/19 is labeled "Maintenance" but it should "Active" (which is the case status at the time it was entered).

Does anyone know how I could create a report and pull the case status AT the time of the activities entry?

1

You need to base it on the entire history of activity subjects which is a bit tricky. I'm not sure how to do it in a drupal view.

In pseudocode it would be something like SELECT ChangeCaseStatus activity with MAX(date) earlier than activity date currently being output. If null then Active.

  • Hmm.. haven't figured it out yet. I don't see an option to see the entire history of activity subjects. Seems like when I pull case activities, it is already set to the most recent status. – Kristine May 31 at 18:33
  • Yeah I don't know how you'd do this in a drupal view. I usually do case reporting separately, so that you have access to run your own SQL where needed. – Demerit May 31 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.