Skip to content
Permalink
Browse files

[FIXED JENKINS-28096] Use Job instead of AbstractProject when checkin…

…g project names. This avoids validation errors with workflow's snippet generator.
  • Loading branch information...
ikedam committed Apr 25, 2015
1 parent 6ad2f22 commit f28c55475678492a5e0659cb444b062fa5fe748b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
@@ -497,7 +497,7 @@ private boolean perform(Run src, Run<?,?> dst, String expandedFilter, String exp
public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {

public FormValidation doCheckProjectName(
@AncestorInPath AbstractProject anc, @QueryParameter String value) {
@AncestorInPath Job<?,?> anc, @QueryParameter String value) {
// Require CONFIGURE permission on this project
if (!anc.hasPermission(Item.CONFIGURE)) return FormValidation.ok();
FormValidation result;
@@ -515,7 +515,7 @@ else if (value.indexOf('$') >= 0)
else
result = FormValidation.error(
hudson.tasks.Messages.BuildTrigger_NoSuchProject(
value, AbstractProject.findNearest(value).getName()));
value, Items.findNearest(Job.class, value, anc.getParent()).getName()));
return result;
}

0 comments on commit f28c554

Please sign in to comment.
You can’t perform that action at this time.