webform_civicrm icon indicating copy to clipboard operation
webform_civicrm copied to clipboard

[WIP] - CATL-1562: Add start date to case role and record related case activity

Open nishant-bhorodia opened this issue 4 years ago • 6 comments

Overview

Currently when trying to add the case role to a case using webform

  1. Start date is not recorded with the case role.
  2. Case role activity is not recorded in CiviCRM against the case. As part of this PR, we are trying to sort both points mentioned above.

Before

screenshot(5)

image

After

screenshot(6)

screenshot(7)

Technical Details

In private function processCases() the code to add case role already exists. Just modified it to do the following:

  1. Add case role only if an active case role doesn't exist.
  2. Add start date to the case role.
  3. Also record related case role activity for the 'Assign Case Role' type.

nishant-bhorodia avatar Jul 30 '20 12:07 nishant-bhorodia

Hi! Could you please use the PR template in future?

KarinG avatar Jul 30 '20 13:07 KarinG

@nishant-bhorodia Also the above doesn't make it clear that this is being done to align to the way that CiviCRM core works when assigning a new case role. Can you make that clear please.

jamienovick avatar Jul 31 '20 09:07 jamienovick

@nishant-bhorodia I also think we need to go back to the drawing board on this. We want to align core and webform, but what we are doing is replicating core here. It would be much better if core and webform simply used the same single API call to create a case role and the API should then create the activity etc. Let's discuss before we go any further please.

jamienovick avatar Jul 31 '20 09:07 jamienovick

Thanks @jamienovick @KarinG Holding fire on this.

nishant-bhorodia avatar Jul 31 '20 10:07 nishant-bhorodia

With over 500 Drupal 8/CiviCRM installs and a D8WFC-beta1 to be out very soon (this weekend) - I’ll soon be updating the PR template that PRs are to be submitted for both D7WFC and D8WFC.

KarinG avatar Jul 31 '20 11:07 KarinG

@nishant-bhorodia @jamienovick Please see #392 #393. Note that I think the case role activity should be "fixed" in CiviCRM core and not in webform.

mattwire avatar Nov 16 '20 13:11 mattwire