Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-74060][JENKINS-74061][JENKINS-74062] Remove legacy checkUrl validation #109

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/resources/hudson/scm/CVSSCM/global.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ THE SOFTWARE.
<f:repeatable field="authentication">
<local:blockWrapper>
<f:entry field="cvsRoot" title="${%CVS Root}">
<f:textbox name="cvsAuthentication.cvsRoot" checkUrl="'descriptorByName/CVSSCM/checkAuthenticationCvsRoot?value='+escape(this.value)" />
<f:textbox name="cvsAuthentication.cvsRoot" checkUrl="descriptorByName/CVSSCM/checkAuthenticationCvsRoot" checkDependsOn="" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<f:textbox name="cvsAuthentication.cvsRoot" checkUrl="descriptorByName/CVSSCM/checkAuthenticationCvsRoot" checkDependsOn="" />
<f:textbox name="cvsAuthentication.cvsRoot" checkUrl="${it.descriptor.descriptorUrl}/checkAuthenticationCvsRoot" checkDependsOn="" />

Would be cleaner, but I've tried to keep the diff smaller. Can change if someone has strong opinion on this.

</f:entry>
<f:entry field="username" title="${%Username}">
<f:textbox name="cvsAuthentication.username" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ THE SOFTWARE.
<table>
<f:block>
${%Choose the CVS tag name for this build}:
<f:textbox name="name" value="jenkins-${it.build.number}"
checkUrl="'checkTag?value='+encodeURIComponent(this.value)"/> <br />
<f:entry>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds the markup needed for validation to work.

<f:textbox name="name" value="jenkins-${it.build.number}"
checkUrl="checkTag" checkDependsOn=""/>
</f:entry>
${%Create tag as branch} <f:checkbox name="createBranch" /> <br />
${%Move tag if it already exists} <f:checkbox name="moveTag" />
</f:block>
Expand All @@ -50,7 +52,7 @@ THE SOFTWARE.
<j:forEach var="up" items="${upstream}">
<f:entry title="${up.key.name} #${up.value}">
<f:textbox name="upstream.${up.key.name}" value="hudson-${up.value}"
checkUrl="'checkTag?value='+encodeURIComponent(this.value)"/>
checkUrl="checkTag" checkDependsOn=""/>
</f:entry>
<f:entry title="${%Create tag as branch}">
<f:checkbox name="upstream-createBranch.${up.key.name}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ THE SOFTWARE.
<local:blockWrapper>
<f:block>
${%Choose the CVS tag name for this build}:
<f:textbox name="name" value="hudson-${it.build.number}"
checkUrl="'checkTag?value='+encodeURIComponent(this.value)"/>
<f:entry>
<f:textbox name="name" value="hudson-${it.build.number}"
checkUrl="checkTag" checkDependsOn=""/>
</f:entry>
</f:block>

<j:set var="upstream" value="${it.build.transitiveUpstreamBuilds}" />
Expand All @@ -62,7 +64,7 @@ THE SOFTWARE.
<j:forEach var="up" items="${upstream}">
<f:entry title="${up.key.fullDisplayName} #${up.value}">
<f:textbox name="upstream.${up.key.fullName}" value="hudson-${up.value}"
checkUrl="'checkTag?value='+encodeURIComponent(this.value)"/>
checkUrl="checkTag" checkDependsOn=""/>
</f:entry>
</j:forEach>
</f:optionalBlock>
Expand Down