0

This works correctly on the Joomla demo server with 4.6.0, but not on my Joomla with CiviCRM 4.6.8. Not sure if this is a problem with the more recent CiviCRM versions, or something else in my configuration.

On the demo server, if you create cases in CiviCase, then go to the CiviCase dashboard, you can click on the numbers in the grid layout showing how many cases of what case type have what case status. This works by adding parameters to the URL of &status=2 and &type=2 (for example).

On my installation, the destination page seems to pick up status correctly, but even when type=3, it comes to a page giving an error that it couldn't find any cases, and shows the wrong search criteria for type:

 No matches found for:
Case Status(s) = Processing ...AND...
Case Type(s) In 1 ...AND...
Application = All Applications 

Why does it think I want case type of 1, when the URL specified type=3 ?

If, from this screen, I select the Case type I want and click Search it gives a correct report as expected. But it's very inconvenient to have those direct links from the dashboard not work.

  • This might be the type of problem where I'd use xdebug + netbeans (or other IDE) and trace it to see what it's doing. It takes about 30-60 min to set up if you've never done it but if you're doing lots of customization it's worth it. netbeans.org/kb/docs/php/debugging.html – Demerit Oct 17 '15 at 14:55
  • I discovered that if the url uses &case_type_id=2 rather than &type=2 it works as expected. – Norris Oct 27 '15 at 23:14
  • I discovered that if the url uses &case_type_id=2 rather than &type=2 it works as expected. There are code changes between 4.6.0 and 4.6.8 in CRM/Case/BAO/Query.php which affect building of the case_type_id clause. I can't figure out where that clause is now built...I assume that was changed to check the URL params for 'case_type_id' and Case/BAO/Case.php simply wasn't updated to make the correct URL parameters? – Norris Oct 27 '15 at 23:20
  • 1
    I started an issue at issues.civicrm.org/jira/browse/CRM-17453 – Norris Oct 27 '15 at 23:36
1

This is fixed in newer versions

//find the code change here.. every time you click on dashboard link, in the CRM/Case/Form/Search.php file line number368,369, its hard coded to 1. it needs to be $caseTpe(which is getting the actual case type value)

 $this->_formValues['case_type_id'][$caseType] = 1;
  $this->_defaults['case_type_id'][$caseType] = 1;

change the above lines to use $caseType variable:

  $this->_formValues['case_type_id'][$caseType] = $caseType;
  $this->_defaults['case_type_id'][$caseType] = $caseType;

hope this helps some one

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.