Skip to content

GenericSetup: Field-only import #58

Description

@reinhardt

I would like to import a GenericSetup upgrade profile that only makes sure that a certain registry record of type TextLine exists without overwriting any existing value. I can't find a way to do that.

If I provide an empty value then this value is set, even if I specify purge="false":

  <record name="mypackage.myfield">
    <field type="plone.registry.field.TextLine">
      <title>My Field</title>
      <required>False</required>
    </field>
    <value purge="false" />
  </record>

I can see that the purge parameter is only used for lists, dicts and similar, so this is apparently not the way to go.

If I don't provide a value element then an existing value is cleared:

  <record name="mypackage.myfield">
    <field type="plone.registry.field.TextLine">
      <title>My Field</title>
      <required>False</required>
    </field>
  </record>

I would expect that not providing a value node would preserve any existing value, but it doesn't. So is there another way to achieve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions