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

In CiviCase the Add New Role function on Manage Case doesn't always work

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: CiviCase
    • Labels:
      None

      Description

      On the manage case screen for a case http://<server>/index.php?q=civicrm/contact/view/case&reset=1&id=2&cid=6&action=view&context=dashboard&selectedChild=case (replace id and cid to match a case in your installation) if you expand the Case Roles section there's a link to Add New Role. The code is in templates/CRM/Case/Form/CaseView.tpl in the javascript function addRole(). To create that code I had copied and pasted the code that was already in that file for assigning a case role, and then for convenience did the same thing that the delete role assignment action does where it just does a page reload at the end instead of some more ajax-like action to update the html table.

      The problem is that when using https, the extra time it takes is too long and the page reloads before the ajax call to create the relationship completes, so you see the page reload, and there's no error, but the role isn't added. I imagine you might also see this happen on slow connections using regular http.

      So I think the fix is to make it more ajax-ish instead of doing the page reload.

      And similarly the code for the delete role assignment action should be more ajax-ish.

        Attachments

          Activity

            People

            • Assignee:
              sushant Sushant Paste
              Reporter:
              demeritcowboy Dave D
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: