Skip to content

[JENKINS-42728] An attempt to update a view using the CLI command update-view using input of a different view type does not fail #21939

Closed

Description

@jenkins-infra-bot

If you try to update a view using the CLI command update-view using input of a different view type, the command succeeds. This is not correct.

Steps to reproduce:

  • Create view of typeA using UI
  • Get xml representation of view
  • Create view of typeB using UI
  • Update view using xml from typeA
  • The command succeeds.

Originally reported by scoheb, imported from: An attempt to update a view using the CLI command update-view using input of a different view type does not fail
  • assignee: scoheb
  • status: Resolved
  • priority: Minor
  • component(s): cli
  • label(s): 2.46.3-rejected
  • resolution: Fixed
  • resolved: 2017-05-04T16:03:16+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-11-24
Raw content of original issue

If you try to update a view using the CLI command update-view using input of a different view type, the command succeeds. This is not correct.

Steps to reproduce:

  • Create view of typeA using UI
  • Get xml representation of view
  • Create view of typeB using UI
  • Update view using xml from typeA
  • The command succeeds.

Activity

  1. jenkins-infra-bot commented on Apr 7, 2017

    @jenkins-infra-bot
    Author
    scoheb:

    Review pending here: #2804

  2. jenkins-infra-bot commented on May 4, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:
    • Original comment link
    • Raw content of original comment:

      Code changed in jenkins User: Scott Hebert Path: core/src/main/java/hudson/model/View.java test/src/test/java/hudson/cli/UpdateViewCommandTest.java test/src/test/resources/hudson/cli/testview-foo.xml http://jenkins-ci.org/commit/jenkins/07683617d3f9277fe274e7a35f745b14b6a35e44 Log: JENKINS-42728 Updating view with CLI using input of a different view type should fail (#2804)

      • JENKINS-42728 Updating view with CLI using different view type should fail
      • Additionally, updating a view using an XML that will be converted by XStream via an alias will succeed.

      [FIXES JENKINS-42728]

      • Remove TestView
      • update test

    Code changed in jenkins
    User: Scott Hebert
    Path:
    core/src/main/java/hudson/model/View.java
    test/src/test/java/hudson/cli/UpdateViewCommandTest.java
    test/src/test/resources/hudson/cli/testview-foo.xml
    http://jenkins-ci.org/commit/jenkins/07683617d3f9277fe274e7a35f745b14b6a35e44
    Log:
    JENKINS-42728 Updating view with CLI using input of a different view type should fail (#2804)

    • JENKINS-42728 Updating view with CLI using different view type should fail
    • Additionally, updating a view using an XML that will be converted by XStream via an alias
      will succeed.

    [FIXES JENKINS-42728]

    • Remove TestView
    • update test
  3. removed
    bugFor changelog: Minor bug. Will be listed after features
    on Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions