Restore unsaved changes warning in new Manage Jenkins UI#26292
Restore unsaved changes warning in new Manage Jenkins UI#26292Maanvi212006 wants to merge 3 commits intojenkinsci:masterfrom
Conversation
|
Please restore the pull request template and answer all the items in the pull request template. When you skip the pull request template, it looks like you are not paying attention to the contributing guidelines. Show that you are paying attention to the contributing guidelines by completing the pull request template. I've marked this pull request as draft. When you've completed the pull request template and confirmed that you've done all the steps in that template, you can mark it as "Ready for Review". In the very near future, we will immediately close pull requests that do not use the pull request template. |
|
Please use the actual template not one you've made up: The change itself looks sensible, (assuming it works) |
There was a problem hiding this comment.
When I run Jenkins from this pull request with the command:
JENKINS_HOME=work java -jar war/target/jenkins.war
and complete the setup wizard by choosing to install no plugins, when I open the "Manage Jenkins" -> "System" page, it reports the following stack trace to the console:
2026-02-12 13:30:40.281+0000 [id=126] INFO h.m.UpdateCenter$CompleteBatchJob#run: Completed installation of 0 plugins in 17 ms
2026-02-12 13:30:56.201+0000 [id=32] WARNING o.k.s.f.adjunct.AdjunctsInPage#findNeeded: No such adjunct found: hudson-behavior
org.kohsuke.stapler.framework.adjunct.NoSuchAdjunctException: Neither hudson-behavior.css, .js, .html, nor .jelly were found
at org.kohsuke.stapler.framework.adjunct.Adjunct.<init>(Adjunct.java:127)
at org.kohsuke.stapler.framework.adjunct.AdjunctManager.get(AdjunctManager.java:154)
at org.kohsuke.stapler.framework.adjunct.AdjunctsInPage.findNeeded(AdjunctsInPage.java:169)
at org.kohsuke.stapler.framework.adjunct.AdjunctsInPage.generate(AdjunctsInPage.java:115)
at org.kohsuke.stapler.jelly.AdjunctTag.doTag(AdjunctTag.java:86)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:271)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:100)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:271)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.impl.TagScript.getBodyText(TagScript.java:767)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:141)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:102)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:102)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:100)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:271)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:121)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:121)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:121)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
That will need to be fixed before the pull request can be merged.
| permissions="${attrs.permissions}" | ||
| type="${newManageJenkins ? 'two-column' : 'one-column'}"> | ||
|
|
||
| <st:adjunct includes="hudson-behavior"/> |
There was a problem hiding this comment.
The hudson-behavior.js is always included and even when not that would not be the correct way.
| </l:defer.placeholder> | ||
| <l:defer.children> | ||
| <d:invokeBody /> | ||
| <div class="jenkins-config"> |
There was a problem hiding this comment.
I don't see why this should solve the problem. To detect that there is a changed field there is lib.form.confirm.js. I think it is loaded but for some reason it doesn't catch the changes.
|
With #26314 we have a much more promising approach. |
|
/label proposed-for-close |
|
Closing |

Fixes #JENKINS-26270
Testing done
This change was tested manually since it affects frontend behavior.
Screenshots (UI changes only)
Before
No warning and one leaves the page potentially losing unsaved changes
After
Proposed changelog entries
Proposed changelog category
/label bug,web-ui
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.Desired reviewers
@jenkinsci/core-pr-reviewers