Problem/Motivation

I can successfully migrate webforms and their associated nodes, and have the webform selected on the node, like so (either works):

  webform:
    plugin: migration_lookup
    migration: webform
    source: nid

  webform/target_id:
    plugin: migration_lookup
    migration: webform
    source: nid

However, I can't figure out how to select whether the webform status on the node in open or closed. By which I mean that I can open/close a webform both on the admin screen and when editing the node, as there are two places to control the open/close status. And I can migrate the webform status with status: status in the d7_webform migration. But after doing so, the node's webform status will always be set to open, regardless of the webform's status.

What I want to know how to do, is how to migrate the D7 webform's status into the content type's webform setting for open/close status, instead of the D9 webform status, as I want content editors to be able to control the status and I'd prefer to not have to manually update all the statuses on each node's webform settings.

I tried setting a constant value in the migrate, but I can't figure out what to use in the YAML.

source:
  plugin: d7_node
  node_type: webform
  constants:
    webform_status: closed

destination:
  plugin: entity:node
  default_bundle: webform

process:
  nid: nid
  title: title
  status: status
  ...
  webform:
    plugin: migration_lookup
    migration: webform
    source: nid
  
  # What do I put here?
  webform/settings/status: constants/webform_status

Comments

solideogloria created an issue.