Skip to content

Export does not produce empty element for empty inputs #2811

@eliasbalasis

Description

@eliasbalasis

Continuing from #2802

Exporting a configuration that has no value for some of its inputs does not produce an empty element in the exported content.

Consider the following folder-auth model for example:

jenkins:
  authorizationStrategy:
    folderBased:
      folderRoles:
      - folders:
        - "xxx"
        name: "xxx"
        permissions:
        - id: "Job/Build"
        - id: "Job/Discover"
        - id: "Job/Read"
        sids: []

The export configuration page does not display the empty "sids" element.

It seems 2053.vb_0da_47381a_25 introduced @ParametersAreNonnullByDefault which caused problems with my CASC configuration without "sids" element from initial export.

folder-auth is just one such case I had the misfortune of having to deal with, but there could be many others with similar symptoms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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