CRM-5599 Recording activities in a case that are NOT with the client.

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: CiviCase
    • Labels:
      None

      Description

      Rationale
      ========
      Some case activities (meetings, phone calls, etc.) are ABOUT the case but the 'target' contact (WITH...) is NOT the client. Currently there is no way to record these in a case.

      Implementation
      ============
      1. On Edit case activity form (civicrm/case/activity), add link to the right of the read-only Client Name value: 'With other contact(s)"
      2. When clicked, replace Client Name label and value with the target_contact_id field label and widget we use in non-case activity form ('With Contact') - so user can select one or more contacts from the DB.
      3. Post-process saves target contact id values for this activity
      4. Add 'With' column (after 'Type') to case activities selector (Manage Case, Find Cases and Dashboard drilldowns).
      5. When editing or viewing case activities, we need to detect whether target contact id = client contact id or not and display proper label (and include editable 'target_contact_id' field with defaults set) when target != client.

        Attachments

          Activity

          [CRM-5599] Recording activities in a case that are NOT with the client.
          David Greenberg added a comment -

          A few issues....
          1. The option to replace Client as target with another / other contacts should be available in ADD and EDIT mode (the issue text referred to the 'edit' form, not 'edit' mode).

          2. When I click 'With other contact(s) - the Client label and field s/b REPLACED by the With Contact(s) label and field. AND on save only the With Ciient values s/b used as the target_contact values. Currently we're ADDING the With Contact targets to the Client and inserting / using both.

          EXAMPLE:

          • Client is 'Jane Doe'
          • I add a Follow-up Activity, and click With Contact(s) - and select 'Walter Adams'
          • After save, WITH for this activity s/b ONLY 'Walter Adams' (not Walter and Jane)

          3. Activity View pop-up - Move the With Contacts label / value just below Client (when present).

          David Greenberg added a comment -

          4. Activity View pop-up should ONLY include the 'With Contacts' row IF there are target contacts for this activity that are NOT clients of this case (e.g. they are not linked to this case in civicrm_case_contact).

          EXAMPLE:
          Case clients are Jane Doe and Roger Smith
          Follow-up Activity is 'with' Peter Piper

          Activity View s/b:

          Client Jane Doe; Roger Smith
          With Contact Peter Piper

          David Greenberg added a comment -

          5. Regarding 'With' column in case activity selectors ... I think we should only display contact there that are target contacts for the activity AND are NOT the client (same as rule for Activity View in comment above this one). Otherwise, the selector gets distorted and messy esp for cases with multiple clients (as allowed in CRM-5931).

          David Greenberg added a comment -

          (additional info on item 2. in comments above)
          ... when swapping in the 'With Contact' label + field, we should also swap the 'With other contact(s)' link to say 'With client'. Since clicking that link reverts the form to original state with read-only Cilent label / field.

          Do test this with the multi-client functionality OFF (default) and ON (http://issues.civicrm.org/jira/browse/CRM-5931)

          Kiran Jagtap added a comment -

          Done w/ above point fixes.

          Kiran Jagtap added a comment -

          Please make sure to test multi-client functionality w/ this as dgg commented.

          Dave D added a comment -

          1) When I click File on Case, it looks like it is creating a new activity and then marking the old one is_deleted=1, but then the old one is still displaying on the activities tab and if you do for example a full text search you see both the new case one and the old deleted one.

          2) If you create it from the case side, it's inconsistent because there is only one copy, and so you only see it on case.

          Ideally for us, the non-case side activity would be something that just indicates it was filed, maybe with a link. The two reasons are that the non-case side shouldn't contain case-related details, and that if it's left as an identical copy and you come back later, you wonder "hmm, didn't I file that yesterday"?

          David Greenberg added a comment -

          Kiran - Dave D's last comment about "File on Case" is actually about CRM-5761 - so I will update that issue accordingly.

          However, found two bugs on this issue:

          1. When I click "With other contact(s)" I get the expected fb token input field AND I also see an unlabeled checkbox on the right upper corner of form (screenshot attached). I think this is supposed to be hidden ?? The HTML for it is:

          <input type="hidden" value="" name="hidden_target_contact">
          <input type="checkbox" class="form-checkbox" value="1" name="hidden_target_contact" id="hidden_target_contact">

          2. in multi-client mode, I created a new case with 2 clients. Then went to manage case and edited one of the automatically created activities (a Follow-up). When the Activity form loads, the With Contact div is displayed initially (with one of the two clients contact name defaulted in the fb-token input field. Expected behavior is that the read-only Client(s) div loads by default when editing any activity UNLESS user has already assigned it to a target other than the client.

          You can mark this issue closed once these are resolved.

          David Greenberg added a comment -

          Shows unlabeled checkbox in upper right corner which I think is supposed to be hidden.

          Ashwini Poharkar added a comment -

          Tested in r27970

            People

            • Assignee:
              Ashwini Poharkar
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: