Unable to rename view with reconfig_view

Bug #1642641 reported by abregman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Jenkins
New
Undecided
Unassigned

Bug Description

I tried to run:

name = "old"
new_name = "new"
server = jenkins.Jenkins(url, user, password)

view_config = server.get_view_config(self.view_args.name)
new_config = re.sub(r"<name>.*</name>", "<name>%s</name>" % "new_name", view_config)
server.reconfig_view(name, new_config)

But it has no effect. I verified that new_config changed and includes the new name.

Revision history for this message
Khai Do (zaro0508) wrote :

What version of jenkins and python-jenkins are you using? Also how did you verify that new_config changed? If the config.xml file changed then python-jenkins is working as expected. Jenkins itself might be having issues reloading the view/job.

Revision history for this message
abregman (abregman) wrote :

Wrong formulation - I verified that new_config variable includes the new name (jenkins didn't although python-jenkins didn't raise any exception).

I'm using it here:
https://github.com/bregman-arie/jcli/blob/master/jcli/executor/view.py#L86

Versions:

Jenkins - 1.656
python-jenkins 0.4.13

Revision history for this message
Jamal (jamal9) wrote :

i am having the same issue with adding new projects to a view

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.