Repository navigation
Conversation
|
333: @OS2Forms/koordinationsgruppe vi estimerer 2,5 timer til review af denne. Vil I godkende? |
|
Handler states does not make sense under the context of Digital Signature - therefore it has been removed. However, signature doesn't make sense on draft, so this has been added to the states in which the signature flow should not run! |
stankut
left a comment
There was a problem hiding this comment.
The only two things i could find, which are similar in all three handlers 😄
| public const ATTACHMENT_ELEMENT = 'attachment_element'; | ||
| public const SENDER_ADDRESS = 'sender_address'; | ||
| private const string ADDITIONAL = 'additional'; | ||
| private const string STATES = 'states'; |
There was a problem hiding this comment.
Typed class constants require PHP 8.3, while this package still declares "php": "^8.1". On PHP 8.1/8.2, loading any of these three handlers will cause a parse error, breaking forms that use them.
We either need to remove string type here or bump the PHP version in composer.json
| WebformSubmissionInterface::STATE_CONVERTED => $this->t('anonymous <b>submission is converted</b> to authenticated.'), | ||
| WebformSubmissionInterface::STATE_COMPLETED => $this->t('<b>submission is completed</b>.'), | ||
| WebformSubmissionInterface::STATE_UPDATED => $this->t('<b>submission is updated</b>.'), | ||
| WebformSubmissionInterface::STATE_DELETED => $this->t('<b>submission is deleted</b>.'), |
There was a problem hiding this comment.
The handler only processes states in postSave(), but deleting a submission invokes postDelete() instead. Therefore selecting “submission is deleted” can never trigger this handler.
Please either implement the corresponding delete hook or remove STATE_DELETED from the available options.
| public const FASIT_HANDLER_CPR_ELEMENT = 'cpr_element'; | ||
| public const FASIT_HANDLER_ATTACHMENT_ELEMENT = 'attachment_element'; | ||
| private const string ADDITIONAL = 'additional'; | ||
| private const string STATES = 'states'; |
There was a problem hiding this comment.
Typed class constants require PHP 8.3, while this package still declares "php": "^8.1". On PHP 8.1/8.2, loading any of these three handlers will cause a parse error, breaking forms that use them.
We either need to remove string type here or bump the PHP version in composer.json
| WebformSubmissionInterface::STATE_CONVERTED => $this->t('anonymous <b>submission is converted</b> to authenticated.'), | ||
| WebformSubmissionInterface::STATE_COMPLETED => $this->t('<b>submission is completed</b>.'), | ||
| WebformSubmissionInterface::STATE_UPDATED => $this->t('<b>submission is updated</b>.'), | ||
| WebformSubmissionInterface::STATE_DELETED => $this->t('<b>submission is deleted</b>.'), |
There was a problem hiding this comment.
The handler only processes states in postSave(), but deleting a submission invokes postDelete() instead. Therefore selecting “submission is deleted” can never trigger this handler.
Please either implement the corresponding delete hook or remove STATE_DELETED from the available options.
| */ | ||
| private const QUEUE_ID = 'os2forms_fbs_handler'; | ||
| private const string ADDITIONAL = 'additional'; | ||
| private const string STATES = 'states'; |
There was a problem hiding this comment.
Typed class constants require PHP 8.3, while this package still declares "php": "^8.1". On PHP 8.1/8.2, loading any of these three handlers will cause a parse error, breaking forms that use them.
We either need to remove string type here or bump the PHP version in composer.json
| WebformSubmissionInterface::STATE_CONVERTED => $this->t('anonymous <b>submission is converted</b> to authenticated.'), | ||
| WebformSubmissionInterface::STATE_COMPLETED => $this->t('<b>submission is completed</b>.'), | ||
| WebformSubmissionInterface::STATE_UPDATED => $this->t('<b>submission is updated</b>.'), | ||
| WebformSubmissionInterface::STATE_DELETED => $this->t('<b>submission is deleted</b>.'), |
There was a problem hiding this comment.
The handler only processes states in postSave(), but deleting a submission invokes postDelete() instead. Therefore selecting “submission is deleted” can never trigger this handler.
Please either implement the corresponding delete hook or remove STATE_DELETED from the available options.
|
Please wait to merge this PR until the Drupal 11 release is out. |
|
@jekuaitk this PR may be merged to develop-branch when the corrections is made. |
Closes #334
When using digital signature other handlers should be modified to run on "locked" submission state.
This PR adds configuration to handlers that allow stating on which states the handler should run, akin to the e-mail handler.
The default state on which handlers run are "completed".