Problem/Motivation

webform_service_parse_submission($webform, $submission) parses a submission from an external format into what webforms expect. The problem with it is that it forces many submission properties and it ignores everything from the external submission except the data array. Despite it allowing some changes via an alter hook, this only allows changes on the modified submission object, without access to the initial submission data.
I have found that I need to know the data from the original submission in my alter hook in order to meaningfully update the submission_obj.

Proposed resolution

I propose to add the original submission object to the hook alter so it can be used for the modules implementing the alter.
From drupal_alter('webform_service_submission', $submission_obj); to drupal_alter('webform_service_submission', $submission_obj, $submission);.

Remaining tasks

1. Do the patch.
2. Review by the community.

User interface changes

None.

API changes

None. The changes are backwards compatible with implementations of a single hook alter argument.

Data model changes

None.

Comments

kurkuma created an issue. See original summary.

kurkuma’s picture

Status: Active » Needs review
StatusFileSize
new468 bytes

tyler.frankenstein’s picture

Status: Needs review » Fixed

Looks good, thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.