After the issue JENKINS-19142 was implemented it is no longer possible, to create a Job in a View by posting the xml in the url .../view/<viewname>/createItem.

          [JENKINS-41128] createItem in View not working when posting xml

          Markus Winter created issue -

          Alex Ellis added a comment - - edited

          +1 this is a blocker for moving from 1.6 to 2.x series for us. The issue exists in both: 2.3 and 2.4 (jenkins:latest and jenkinsci/jenkins on Docker Hub).

          Is there a workaround? mawinter69

          Related: https://issues.jenkins-ci.org/browse/JENKINS-9264

          Alex Ellis added a comment - - edited +1 this is a blocker for moving from 1.6 to 2.x series for us. The issue exists in both: 2.3 and 2.4 (jenkins:latest and jenkinsci/jenkins on Docker Hub). Is there a workaround? mawinter69 Related: https://issues.jenkins-ci.org/browse/JENKINS-9264

          Alex Ellis added a comment -

          Also pinging vlatombe

          Alex Ellis added a comment - Also pinging vlatombe
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-19142 [ JENKINS-19142 ]
          Oleg Nenashev made changes -
          Link New: This issue is related to JENKINS-9264 [ JENKINS-9264 ]

          Oleg Nenashev added a comment - - edited

          Yep, it seems to be a valid regression for this API. Explicit JENKINS-9264 fix would be really nice

          Oleg Nenashev added a comment - - edited Yep, it seems to be a valid regression for this API. Explicit JENKINS-9264 fix would be really nice
          Oleg Nenashev made changes -
          Labels New: jenkins2.0 regression

          I agree this is a regression however adding a job to a view programmatically was not documented (at least in the embedded documentation).

          If you check out <jenkins url>/api/, you'll see a Create Job section, which you don't see if you go to <jenkins url>/view/<somelistview>/api/.

          A workaround is to add the job without using the view, then use the view API <jenkins url>/view/<somelistview>/addJobToView to add it to the view.

          Vincent Latombe added a comment - I agree this is a regression however adding a job to a view programmatically was not documented (at least in the embedded documentation). If you check out <jenkins url>/api/ , you'll see a Create Job section, which you don't see if you go to <jenkins url>/view/<somelistview>/api/ . A workaround is to add the job without using the view, then use the view API <jenkins url>/view/<somelistview>/addJobToView to add it to the view.
          Vincent Latombe made changes -
          Assignee New: Vincent Latombe [ vlatombe ]
          Vincent Latombe made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

            vlatombe Vincent Latombe
            mawinter69 Markus Winter
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: