Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41128

createItem in View not working when posting xml

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            Hide
            alexellisadp 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? Markus Winter

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

            Show
            alexellisadp 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? Markus Winter Related: https://issues.jenkins-ci.org/browse/JENKINS-9264
            Hide
            alexellisadp Alex Ellis added a comment -

            Also pinging Vincent Latombe

            Show
            alexellisadp Alex Ellis added a comment - Also pinging Vincent Latombe
            Hide
            oleg_nenashev 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

            Show
            oleg_nenashev 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
            Hide
            vlatombe 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.

            Show
            vlatombe 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.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vincent Latombe
            Path:
            core/src/main/java/hudson/model/ListView.java
            test/src/test/java/hudson/model/ListViewTest.java
            test/src/test/resources/hudson/model/ListViewTest/addJobUsingAPI/config.xml
            http://jenkins-ci.org/commit/jenkins/84d9244520b917629e82b762eb7b7548cf5f6b9f
            Log:
            [FIXED JENKINS-41128] createItem in View not working when posting xml

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: core/src/main/java/hudson/model/ListView.java test/src/test/java/hudson/model/ListViewTest.java test/src/test/resources/hudson/model/ListViewTest/addJobUsingAPI/config.xml http://jenkins-ci.org/commit/jenkins/84d9244520b917629e82b762eb7b7548cf5f6b9f Log: [FIXED JENKINS-41128] createItem in View not working when posting xml
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/model/ListView.java
            test/src/test/java/hudson/model/ListViewTest.java
            test/src/test/resources/hudson/model/ListViewTest/addJobUsingAPI/config.xml
            http://jenkins-ci.org/commit/jenkins/8f8b058548a4b912d6a9e6fa1a4a0873a70598f7
            Log:
            Merge pull request #2760 from Vlatombe/JENKINS-41128

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

            Compare: https://github.com/jenkinsci/jenkins/compare/2a03dda885d8...8f8b058548a4

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/ListView.java test/src/test/java/hudson/model/ListViewTest.java test/src/test/resources/hudson/model/ListViewTest/addJobUsingAPI/config.xml http://jenkins-ci.org/commit/jenkins/8f8b058548a4b912d6a9e6fa1a4a0873a70598f7 Log: Merge pull request #2760 from Vlatombe/ JENKINS-41128 [FIXED JENKINS-41128] createItem in View not working when posting xml Compare: https://github.com/jenkinsci/jenkins/compare/2a03dda885d8...8f8b058548a4
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Vincent Latombe
            Path:
            core/src/main/java/hudson/model/ListView.java
            test/src/test/java/hudson/model/ListViewTest.java
            test/src/test/resources/hudson/model/ListViewTest/addJobUsingAPI/config.xml
            http://jenkins-ci.org/commit/jenkins/a6672a3bbb263eae99e7505c7d9957c55e294301
            Log:
            [FIXED JENKINS-41128] createItem in View not working when posting xml

            (cherry picked from commit 84d9244520b917629e82b762eb7b7548cf5f6b9f)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Vincent Latombe Path: core/src/main/java/hudson/model/ListView.java test/src/test/java/hudson/model/ListViewTest.java test/src/test/resources/hudson/model/ListViewTest/addJobUsingAPI/config.xml http://jenkins-ci.org/commit/jenkins/a6672a3bbb263eae99e7505c7d9957c55e294301 Log: [FIXED JENKINS-41128] createItem in View not working when posting xml (cherry picked from commit 84d9244520b917629e82b762eb7b7548cf5f6b9f)

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: