webform_civicrm
webform_civicrm copied to clipboard
[WIP] - CATL-1562: Add start date to case role and record related case activity
Overview
Currently when trying to add the case role to a case using webform
- Start date is not recorded with the case role.
- 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
After
Technical Details
In private function processCases()
the code to add case role already exists. Just modified it to do the following:
- Add case role only if an active case role doesn't exist.
- Add start date to the case role.
- Also record related case role activity for the 'Assign Case Role' type.
Hi! Could you please use the PR template in future?
@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.
@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.
Thanks @jamienovick @KarinG Holding fire on this.
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.
@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.