Skip to content

[JENKINS-74795] Job created via REST API attaches to default view (regression in 2.475) #16586

@jenkins-infra-bot

Description

@jenkins-infra-bot

Programmatically created jobs (via posting XML to url /createItem/api/json?name=my_job_name) now attached to default view in Jenkins (i can see them in /var/lib/jenkins/config.xml eather, section ).

This behavior started since we've updated Jenkins from previous LTS (2.462.3) to current LTS (2.479.1)

Steps to reproduce:

  1. upgrade to Jenkins 2.479.1
  2. prepare any valid job XML config (see below)
  3. curl -X POST -u "username:api-token" \
         -H "Content-Type: application/xml" \
         --data-binary @​job.xml \
         "https:///createItem/api/json?name=my_job_name"
    

Expected:
Job doesn't attached to any view

Actual:
Job attached to default view

job.xml example:

'1.1' encoding='UTF-8'?>

  tst job from API
  false
  
  true
  false
  
  
  
  

Jenkins settings:

Job attached to default view:


Originally reported by an_nikolaev, imported from: Job created via REST API attaches to default view (regression in 2.475)
  • assignee: basil
  • status: Closed
  • priority: Minor
  • component(s): core
  • label(s): 2.479.2-fixed, regression
  • resolution: Fixed
  • resolved: 2024-11-08T13:49:59+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-11-24
Raw content of original issue

Programmatically created jobs (via posting XML to url /createItem/api/json?name=my_job_name) now attached to default view in Jenkins (i can see them in /var/lib/jenkins/config.xml eather, section <views><listView><jobNames>).

This behavior started since we've updated Jenkins from previous LTS (2.462.3) to current LTS (2.479.1)

Steps to reproduce:

  1. upgrade to Jenkins 2.479.1
  2. prepare any valid job XML config (see below)
  3. curl -X POST -u "username:api-token" \
         -H "Content-Type: application/xml" \
         --data-binary @job.xml \
         "https://<jenkins_host>/createItem/api/json?name=my_job_name"
    

Expected: Job doesn't attached to any view

Actual: Job attached to default view

job.xml example:

<?xml version='1.1' encoding='UTF-8'?>
<project>
  <description>tst job from API</description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <triggers/>
  <builders/>
  <publishers/>
  <buildWrappers/>
</project>

Jenkins settings:

Job attached to default view:

environment
Jenkins=2.479.1<br/>
Drop Down ViewsTabBar plugin=1.7
5 attachments

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions