Skip to content

Commit

Permalink
[FIXED JENKINS-28096] Use Job instead of AbstractProject when checkin…
Browse files Browse the repository at this point in the history
…g project names. This avoids validation errors with workflow's snippet generator.
  • Loading branch information
ikedam committed Apr 25, 2015
1 parent 6ad2f22 commit f28c554
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down

0 comments on commit f28c554

Please sign in to comment.