In the case dashboard (D7, Civi 5.8.2)

The lists of cases with recently performed or upcoming activities are showing no results snapshot of case dashboard

Even though I know there are cases that meet the criteria.

Additionally the find cases results list is not showing any links under Most Recent or Next Scheduled

case results list

I think this is a local issue. I had a problem with the site yesterday and restored to overnight backup.

Looks like no data is lost, but these activities aren't showing

UPDATE My colleague has found 2 SQL views upcoming and most recent activities. Which were not rebuilt during the back up process.

Waiting for confirmation from client all is as expected. Will post more details as an answer later.

  • 1
    Have you tested against a more recent version than 5.8.2? Was it always like this for this installation or did something there change recently? – Demerit Feb 14 '19 at 15:07
  • Hi Demerit, I was in the middle of editting as you posted. This is following a db backup yesterday. Functionality was lost after back up. sandbox works as expected. other sites with case installed work as expected – Craig Almond Feb 14 '19 at 15:18
  • 1
    I might check the civi logs and see if there's any warnings. Can also turn on sql debugging and see if the dashboard query might give a clue. wiki.civicrm.org/confluence/display/CRMDOC43/Debugging – Demerit Feb 14 '19 at 15:46
  • 1
    Try SQL debugging, to see what it's actually trying to pull to give a clue to what's missing, not civicrm debugging. – Demerit Feb 14 '19 at 16:15
  • 1
    Does it let you create a new case? If you add an activity to a case does it then show on the dashboard as recent? – Demerit Feb 14 '19 at 16:27

It looks like Case creates 2 SQL views

civicrm_view_case_activity_upcoming civicrm_view_case_activity_recent

And in case dashboard/ find case results- these views are called on to provide upcoming and recent activity data.

When the database was restored from backup. These views had been emptied. And upcoming/ most recent activity data was showing as empty on the dashboards.

A colleague found some related SQL commands in public_html/sites/all/modules/civicrm/CRM/Case/BAO/Case.php function createCaseViewsQuery line 3057

And by running the related SQL Query was able to repopulate the views. These now automatically repopulate each time an activity is added.

| improve this answer | |

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.