Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20424 remove call to deprecated function. #10259

Merged
merged 1 commit into from
Apr 27, 2017

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Apr 26, 2017

This is the one covering the UI with errors. The fact it did not cause any test fails means it is
not covered by unit tests :-(.

As long as the Open Case link is still present for CiviCase users this is working

@davejenx might be worth merging this into the rc? Will clean up the most common source of red ink


@davejenx
Copy link
Contributor

@eileenmcnaughton This PR gets rid of the warning on most Civi pages. :-) Which link does this code provide?
There's still a warning on CiviCase Dashboard:
User deprecated function: Deprecated function, use CRM_Core_PseudoConstant::getKey Array ( [civi.tag] => deprecated ) in CRM_Core_Error_Log->log() (line 69 of /Users/davej/src/buildkit/build/dmaster/sites/all/modules/civicrm/CRM/Core/Error/Log.php).
I see there are different URLs in use for create case links:

  • /civicrm/case/add?reset=1&action=add&atype=13&context=standalone
    used for New Case menu item under Cases menu
  • /civicrm/case/add?reset=1&action=add&context=case&cid=132
    used for Add Case from Actions menu button on contact summary
  • /civicrm/case/add?action=add&context=standalone&reset=1
    used for Add Case button on CiviCase Dashboard

Which suggests the activity type may not be needed anyway!

@eileenmcnaughton
Copy link
Contributor Author

It seems to provide
'ref' => 'new-case',
'title' => ts('Case'),

reset=1&action=add&atype={$activityType}&context=standalone

which is none of those!

@eileenmcnaughton
Copy link
Contributor Author

hmm maybe it is - the activity type is 'Open Case' - does that co-incide with atype=13?

Required params
if (CRM_Core_Permission::check('access all cases and activities') ||
CRM_Core_Permission::check('add cases')

@eileenmcnaughton
Copy link
Contributor Author

screenshot 2017-04-27 21 58 49

AHA! that's where it is

This is the one covering the UI with errors. The fact it did not cause any test fails means it is
not covered by unit tests :-(.

As long as the Open Case link is still present for CiviCase users this is working
@eileenmcnaughton
Copy link
Contributor Author

& it was wrong! just fixed it - but also fixed one more that filters out 'Closed' cases when looking at 'upcoming' cases on the case dashboard

Copy link
Contributor

@seamuslee001 seamuslee001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

@eileenmcnaughton eileenmcnaughton merged commit 7958229 into civicrm:4.7.19-rc Apr 27, 2017
@eileenmcnaughton eileenmcnaughton deleted the caserc branch April 27, 2017 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants