Add migrate process plugin for concatenating the value with a string

Created on 31 March 2018, over 6 years ago
Updated 25 August 2022, over 2 years ago

We have Concat for concatenating source strings together, but we currently have no way to prefix or suffix values with strings from a provided configuration.

Patch coming shortly, with documentation explaining how this can work.

Feature request
Status

Closed: works as designed

Version

8.6 ⚰️

Component
Migration 

Last updated 4 days ago

Created by

🇨🇦Canada colan Toronto 🇨🇦

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇨🇦Canada darkodev

    I don't only post on d.o. for others, but for myself when I forget how I did things :-)

    An example of concatenating a file description value with the node title and a constant using include_source (after trying a whole bunch of process chains that did not work). There could be a better way, but I haven't found it.

    Hope this help someone further.

    source:
      constants:
        factsheet: 'Factsheet'
    
    field_file:
      - plugin: sub_process
        include_source: true
        source_key: node_source
        source: field_some_file
        process:
          target_id: fid
          display: display
          description:
            - plugin: concat
              source:
                - 'node_source/title'
                - 'node_source/constants/factsheet'
              delimiter: ' '
    
Production build 0.71.5 2024