Skip to content

Export does not produce empty element for empty inputs #2811

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions