Skip to content
Permalink
Browse files
[JENKINS-31162] A CopyCategory is returned when it makes sense
  • Loading branch information
recena committed Mar 15, 2016
1 parent c0bf2de commit d204d57b82e45c03344269644d4e5301558f3f55
Showing 2 changed files with 6 additions and 1 deletion.
@@ -367,6 +367,11 @@ public static Categories getCategories(Authentication a, ItemGroup c) {
categories.getItems().add(category);
}
}
if (Jenkins.getInstance().getAllItems().size() > 0) {
Category copy = new Category("category-id-copy", "Copy existing Item", "", "category-icon-copy",
ItemCategory.MIN_WEIGHT, ItemCategory.MIN_TOSHOW, new ArrayList<Map<String, Serializable>>());
categories.getItems().add(copy);
}
return categories;
}

@@ -85,7 +85,7 @@ public static Integer getWeight(@Nonnull TopLevelItemDescriptor descriptor) {
protected abstract String getDescriptionFor(@Nonnull TopLevelItemDescriptor descriptor);

/**
* Finds the description specified by the first configurator.
* Finds the weight specified by the first configurator.
* If none can be found a empty string is returned. {@see DefaultConfigurator#getDescriptionFor}.
*
* @param descriptor the item to categorize.

0 comments on commit d204d57

Please sign in to comment.