• Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      When creating a new view, there could be an option to copy already existing view - the same way it is when new project is created.

          [JENKINS-13978] Add posibility to copy view

          Derek Brown added a comment -

          I would use this feature every time I branch my projects. I would be using it today if it existed.
          Derek. . .

          Derek Brown added a comment - I would use this feature every time I branch my projects. I would be using it today if it existed. Derek. . .

          Nick Boldt added a comment -

          Same here. This would be incredibly handy for spawning new views to track new branches (and the accompanying jobs for that new branches).

          Nick Boldt added a comment - Same here. This would be incredibly handy for spawning new views to track new branches (and the accompanying jobs for that new branches).

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          changelog.html
          core/src/main/java/hudson/model/View.java
          core/src/main/resources/jenkins/model/Jenkins/newView.jelly
          http://jenkins-ci.org/commit/jenkins/1067585a49517414398b3becbebed09abf496761
          Log:
          JENKINS-13978 option to copy a view

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: changelog.html core/src/main/java/hudson/model/View.java core/src/main/resources/jenkins/model/Jenkins/newView.jelly http://jenkins-ci.org/commit/jenkins/1067585a49517414398b3becbebed09abf496761 Log: JENKINS-13978 option to copy a view

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3059
          JENKINS-13978 option to copy a view (Revision 1067585a49517414398b3becbebed09abf496761)

          Result = UNSTABLE
          Nicolas De Loof : 1067585a49517414398b3becbebed09abf496761
          Files :

          • changelog.html
          • core/src/main/java/hudson/model/View.java
          • core/src/main/resources/jenkins/model/Jenkins/newView.jelly

          dogfood added a comment - Integrated in jenkins_main_trunk #3059 JENKINS-13978 option to copy a view (Revision 1067585a49517414398b3becbebed09abf496761) Result = UNSTABLE Nicolas De Loof : 1067585a49517414398b3becbebed09abf496761 Files : changelog.html core/src/main/java/hudson/model/View.java core/src/main/resources/jenkins/model/Jenkins/newView.jelly

          Axel Behrens added a comment -

          Just upgraded to 1.542 but I don't see the option to copy an existing view on the /newView page. I can give a name and choose from 'Dashboard', 'List View' and 'My View', as before.
          Having it in the changelog suggests that it should work already, although this issue is still open...
          Axel

          Axel Behrens added a comment - Just upgraded to 1.542 but I don't see the option to copy an existing view on the /newView page. I can give a name and choose from 'Dashboard', 'List View' and 'My View', as before. Having it in the changelog suggests that it should work already, although this issue is still open... Axel

          Shannon Kerr added a comment -

          I can confirm that this does not appear to be implemented. I am also on 1.542 and do not see this functionality.

          Shannon Kerr added a comment - I can confirm that this does not appear to be implemented. I am also on 1.542 and do not see this functionality.

          Andréas Berg added a comment -

          I can confirm too. I see no trace of this functionality after upgrading to 1.546.

          Was really looking forward to this one.

          Andréas Berg added a comment - I can confirm too. I see no trace of this functionality after upgrading to 1.546. Was really looking forward to this one.

          Mads Nielsen added a comment -

          Is this in, i would VERY much like to see this introduced.

          Mads Nielsen added a comment - Is this in, i would VERY much like to see this introduced.

          Ulli Hafner added a comment -

          Wouldn't it be more comfortable if this would be exposed as an action on the view itself? I.e., have a context menu "Copy" for each view.

          Ulli Hafner added a comment - Wouldn't it be more comfortable if this would be exposed as an action on the view itself? I.e., have a context menu "Copy" for each view.

          Marco Ambu added a comment -

          Does anyone know the status of this change?

          Marco Ambu added a comment - Does anyone know the status of this change?

          Stephan Krull added a comment -

          There is a plugin offering a build step, I did not try it.

          I would appreciate if cloning / copying a view would be supported by the API.

          Stephan Krull added a comment - There is a plugin offering a build step, I did not try it. I would appreciate if cloning / copying a view would be supported by the API.

          Martin Jost added a comment -

          I found a solution (basically a colleague knew the trick): (tried on 2.263.4):

          alias jenkinsSSH='ssh foobar42 -p 4242'

          1. this needs to match the actual hostname/ssh port and assumes login by public key from the used account.

          So the trick is:

          1. Create the type of view , you plan to copy, at the planned position in Jekins GUI with the intended name
            (This seems easier, than doing it by script...)
          2. Copy the xml for an existing view, to the newly generated one.
            E.g.
            > jenkinsSSH get-view "21A_0.1mMP-Prom" | jenkinsSSH update-view "PHY_FB/FOOBAR"
            Note: No ...view/PHY_FB/view/FOOBAR" ! (as seen in the URL)

          Martin Jost added a comment - I found a solution (basically a colleague knew the trick): (tried on 2.263.4 ): alias jenkinsSSH='ssh foobar42 -p 4242' this needs to match the actual hostname/ssh port and assumes login by public key from the used account. So the trick is: Create the type of view , you plan to copy, at the planned position in Jekins GUI with the intended name (This seems easier, than doing it by script...) Copy the xml for an existing view, to the newly generated one. E.g. > jenkinsSSH get-view "21A_0.1mMP-Prom" | jenkinsSSH update-view "PHY_FB/FOOBAR" Note: No ...view/PHY_FB/view/FOOBAR" ! (as seen in the URL)

          Maciej Jaros added a comment -

          I think an important aspect is copying columns. I have custom columns in each view and there is no way to copy columns between views.

          If views would have a separate configs (separate xml files) then I would be able to at least easily copy by hand. Currently it requires editing a huge config xml just to clone the configuration of columns.

          Maciej Jaros added a comment - I think an important aspect is copying columns. I have custom columns in each view and there is no way to copy columns between views. If views would have a separate configs (separate xml files) then I would be able to at least easily copy by hand. Currently it requires editing a huge config xml just to clone the configuration of columns.

          Ulli Hafner added a comment -

          Isn't this feature already available via JCasC now?

          Ulli Hafner added a comment - Isn't this feature already available via JCasC now?

            Unassigned Unassigned
            pessoft Peter Kolínek
            Votes:
            31 Vote for this issue
            Watchers:
            32 Start watching this issue

              Created:
              Updated: