2

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.

16
  • 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
    Commented Feb 14, 2019 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 Commented Feb 14, 2019 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
    Commented Feb 14, 2019 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
    Commented Feb 14, 2019 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
    Commented Feb 14, 2019 at 16:27

1 Answer 1

3

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.

3
  • This was really useful, thanks Craig, got me out of a hole. Perhaps needs to be reported as a bug? I had this exact problem after restoring a 5.28.3 system.
    – Andy Clark
    Commented Feb 15, 2021 at 17:41
  • 1
    I added a comment to this issue lab.civicrm.org/dev/core/-/issues/2262
    – Andy Clark
    Commented Feb 15, 2021 at 17:51
  • Thanks for taking up the issue Andy, I think i'd assumed it was a local issue rather than a more generic one. Commented Feb 17, 2021 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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