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

Email sent to case -assignees gives wrong URL

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.0.8
    • Fix Version/s: 4.1.0
    • Component/s: CiviCase
    • Labels:
      None

      Description

      When a case is assigned the assignee receives an email. However, the link is constructed so the their id is in it rather than the target - causing them to show as the 'client' when they click on it.

      • Have attached the patch we are using on client site*

      I talked w Brian on IRC & he agrees this is incorrect behaviour:

      (4:40:00 PM) eileen: lcdweb - can I talk case activities with you?
      (4:40:12 PM) lcdweb: eileen: sure
      (4:41:37 PM) eileen: The issue we're getting reported is that when a case activity is assigned an email is sent to the person it's assigned to. However the url is such that the cid is set to the person is assigned to :: /civicrm/case/activity/view?reset=1&aid=1853&cid=319&caseID=170 & then the person it's assigned to is showing as the 'client' on the resulting page
      (4:42:23 PM) lcdweb: hmm....hadn't seen that
      (4:42:31 PM) lcdweb: give me a min and i'll test
      (4:45:13 PM) lcdweb: eileen: by "resulting page" do you mean the case management screen?
      (4:45:36 PM) eileen: yes, although I'm looking at the 'view' link at the moment because it seems the easiest to see it on
      (4:45:41 PM) lcdweb: i.e. – go to case management screen > create new activity > assign to someone > return to case management screen and the client is screwed up
      (4:46:28 PM) lcdweb: eileen: I don't seem to be getting that. when i'm returned to manage case, everything is as it should be
      (4:46:31 PM) lcdweb: as well as the activities
      (4:46:31 PM) eileen: nope - it's the emails generated according 'send a copy of case' msg template
      (4:46:55 PM) eileen: case/activity/view?reset=1&aid=1853&cid=319&caseID=170 vs
      (4:46:55 PM) eileen: case/activity/view?reset=1&aid=1853&cid=318&caseID=170
      (4:47:31 PM) lcdweb: ah, ok. one sec.
      (4:47:47 PM) eileen: id 318 is is target contact id, 319 is assignee contact id - if you swap the id in the url it puts the wrong person's name as client
      (4:52:19 PM) lcdweb: eileen: yeah, you're right, it screws it up
      (4:54:24 PM) eileen: OK - thing I wasn't clear about is whether the tpl needs fixing - in that case or the url. Not clear about the whole permissioning side
      (4:56:56 PM) yashodha left the room (quit: Ping timeout: 276 seconds).
      (4:57:48 PM) eileen: lcdweb - ie. this seems the fix from our client point of view - http://pastebin.com/aYJmYdJT - but not sure if URL will have permission problems in some cases
      (5:00:42 PM) lcdweb: eileen: yeah... looks right to me. since the copy to case thing requires you have a case role, then i don't think you're going to have a permissionoing issue
      (5:00:56 PM) lcdweb: because the only permissions affecting cases are all / none / mine
      (5:01:11 PM) lcdweb: and if i have a case role, then all / mine both apply
      (5:01:18 PM) lcdweb: i said that wrong
      (5:01:32 PM) lcdweb: if you have a case role, then you can view the case in question,and receiving the link shouldn't be an issue
      (5:02:23 PM) eileen: OK - so I'll try doing the same for the 3 links & submit a ticket. I guess Lobo will filter it as appropriate
      (5:02:51 PM) lcdweb: which is to say – i don't think there's a permission problem. and when i looked at the links in the email – the manage case link did pull up the correct case, and the correct client was listed. but it was inside my contact record. i.e. – it just didn't retain the client's c ontext
      (5:02:56 PM) lcdweb: yeah
      (5:03:30 PM) eileen: OK cool - I'll just have to see whether it is straight forward & can go into 4.1 or not & will plague me for the entire 4.1 series
      (5:04:42 PM) lcdweb:

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: