2

Drupal 7.39 Webform Civi Integration version 7.x-4.11.

Just noticed that for contacts with multiple open case types, a new activity submitted via a webform does not always go to the correct case type.

In the Civi Webform settings under Activities, File on Case section I have Test Case as the Case Type, open and resolved selected under Case Status and contact 2 selected for Case Client.

Nothing selected under the Case section of the webform. In the past, I didn't add anything here for an activity on an already open case. Should I be using this section if the case is already open or is this section just for changing case roles, status, etc.?

One case client has two open cases, an open Test Case and an open Other Case Type.

When I click on the link to add a New Test Case Activity, the correct webform comes up with the correct client name. Once submitted however, the activity is filed under Other Case Type and not Test Case.

If I use the same form for someone with only a Test Case, the activity is created in the correct case.

I tried with enabling the Case processing section, but still encounter the same error.

I thought I had this working before, but I could be wrong.

3
  • If I enable case processing, will that allow me to add the case id to the url for more specific targeting?
    – pmoz
    Commented Sep 22, 2015 at 11:43
  • In the Case processing section, what options did you have set?
    – Graham
    Commented Sep 22, 2015 at 13:39
  • For Update Existing Case I had Ongoing, Case Type I selected the specific case type, Case Status was set to Ongoing, for the Case Role section I had Case Client set to cid2, Case Creator set to automatic (although I am not opening a case with this activity) and Case Coordinator set to none. I tried it lie that, then I tried it with Select None in the Case Roles section.
    – pmoz
    Commented Sep 22, 2015 at 15:23

2 Answers 2

2

Looks like this was a bug in the comparison logic. See if this fix works for you: https://github.com/colemanw/webform_civicrm/pull/17

3
  • Thanks Coleman. I'll check it out tonight or tomorrow when I get home from the User Summit!
    – pmoz
    Commented Sep 25, 2015 at 15:37
  • Your fix appears to do the trick! Have I told you lately how awesome you guys are (aside from a few hours ago)?
    – pmoz
    Commented Sep 26, 2015 at 1:40
  • Cool, glad it works for you.
    – Coleman
    Commented Sep 26, 2015 at 2:13
0

Not an answer per se, more a comment, but too long to fit in the comment box:

For me this sounds like a bug. I've just checked the set-up I'm using for a very similar scenario, where I'm creating a new activity and filing it on a pre-existing case. Case processing is not enabled, and the activity is being created as I expect in the correct case, where I am passing in the case client id into a hidden field in the form.

As you are specifying 'Test Case' as the case type for the 'File on Case' section then I would say there is no way that the activity should be getting filed anywhere other than in a Test Case, hence my assertion that there is a bug at work here. In my case I'm only working with one case type so I've not come across this issue.

4
  • Thanks Graham, I experience the same issue on the development server.
    – pmoz
    Commented Sep 22, 2015 at 17:55
  • 1
    When the activity is filed on the wrong case, it seems to go to the highest case_id (or in other words, most recently opened case). Never does it appear to go to the lower numbered case.
    – pmoz
    Commented Sep 22, 2015 at 18:16
  • Which suggests to me that it isn't filtering for case type at all, despite what you've told it to do, and is simply going for the first case it can find based on the other criteria.
    – Graham
    Commented Sep 23, 2015 at 8:35
  • I went to try a user select field for the Case Type and that isn't an option in the activities section. I'm out of ideas.
    – pmoz
    Commented Sep 24, 2015 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.