Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19897

Cannot edit multiple case activities via profile, because deprecated "access CiviCase" permission is referenced

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.15
    • Fix Version/s: 4.7.16
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      When searching for activities and then updating multiple activities via a profile, you are given the option to choose all activities or just the selected ones (via radio buttons).

      Strangely, different code runs depending on on which radio button is selected. If "all" is selected, it does this permission checking:

      CRM/Core/Activity/Form/Task.php, lines 117-121:

      
            foreach ($components as $componentID => $componentName) {
              if (!CRM_Core_Permission::check("access $componentName")) {
                $componentClause[] = " (activity_type.component_id IS NULL OR activity_type.component_id <> {$componentID}) ";
              }
            } 
      
      

      If the activities belong to CiviCase, this will exclude all the activites because there is no "access CiviCase" permission!

      It was deprecated 7 years ago: https://issues.civicrm.org/jira/browse/CRM-6105

      I found that this prevented most users from editing activities this way as they would just not see any of the activities. I could see them on my own user account, but others could not, even other administrators. I have no idea why it worked for me; from the code, it looks like it would not work at all.

      Commenting out this code has allowed users to do their work. Could it be removed in the next release, or does it have some value that needs to be retained & edited?

      (I've marked this issue "Contributed Code" as my contribution is the suggestion to remove it)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              naomi Naomi Rosenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: