Exporting webform submission as batch does not allowed for extended field due to static method

Created on 16 March 2023, almost 2 years ago
Updated 24 July 2024, 5 months ago

Problem/Motivation

Working with a custom module which extends a new field to a webform_submission. This field to be specific is to change the status when webforms are downloaded.
I was unable to extend batchProcess() due to its static method. I would like to have some options to extend and add additional function post batchProcess() or batchFinish()

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: outdated

Version

6.1

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia edyuenyw

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @edyuenyw
  • πŸ‡¦πŸ‡ΊAustralia edyuenyw

    Patch to update an extended webform_submission field.

  • πŸ‡¦πŸ‡ΊAustralia edyuenyw

    Check for existing array key

  • Status changed to Postponed: needs info almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    It is unclear how to reproduce this issue.

    Is this an edge case, and you are just sharing your solution?

  • πŸ‡¦πŸ‡ΊAustralia edyuenyw

    Hi @jrockowitz,

    Thanks for the reply.

    This is not an issue that can be reproduced from the original webform.

    I am working on a custom module that uses this module and added an extra field to the the webform_submission config.
    This field is custom field and is used to mark the webform_submission status either "New" or "Exported". For example when user download/export the webforms will update the custom field to Exported. Or mark it as "New" so other reasons. This is fine when doing it within a batch limit because of our custom code that updates the field.

    However, if this is done as a batch, it has to go to the batch process to run it as batch. The issue for my case is that because of the static method of the batch process, I created this patch for now to add some code to update the custom field.

    Probably not sure if this is the way to go but would like to get opinions on this.

  • Status changed to Closed: outdated over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    I don't have any opinion because we are talking about custom code and functionality.

  • πŸ‡¦πŸ‡ΊAustralia yovince Melbourne

    hi~
    I just rerolled the patch for our requirement.

  • πŸ‡¦πŸ‡ΊAustralia yovince Melbourne
Production build 0.71.5 2024