Webform to preload case roles
Overview: This ticket is targeted at improving the case loading functionality for webforms. We need to be get the webform to preload case roles in addition to the other case fields when we pass the contactID and the caseID appended to the webform URL
How it works currently: As things stand, all other case fields (except the case roles) are preloaded if we pass the contacID and the case ID in the webform URL.
How we would like to improve the functionality: We are proposing this to be a configuration on the Case Component in the webform.
This configuration will be a checkbox on the case tab within the CiviCRM tab of Webforms. If this is checked, case roles will be preloaded along with other case fields when the contactID and the caseID is passed in the webform URL.
If the role is set to a particular user (existing contact field - for eg - homeless services coordinator is set to Contact 2) in webform configurations, it should preload by passing the appropriate parameters in the webform url. If in this case - there are more than one contacts with the same role, for example - on a case - if there are more than one benefits officer, then we should just get the first one the API picks (with no particular preference) *(help text: this will allow roles to preload on the webform by passing the contactID and the caseID in the URL)