IDEA-155327 Improvement to automated Branch Name in the Open Task dialog

added taskType placeholder
This commit is contained in:
Dmitry Avdeev
2018-10-10 17:04:56 +03:00
parent b32526e4d9
commit 89f89308a8
@@ -13,7 +13,7 @@ public class DefaultCommitPlaceholderProvider implements CommitPlaceholderProvid
@NotNull
@Override
public String[] getPlaceholders(TaskRepository repository) {
return new String[] { "id", "number", "summary", "project"};
return new String[] { "id", "number", "summary", "project", "taskType"};
}
@Nullable
@@ -27,6 +27,8 @@ public class DefaultCommitPlaceholderProvider implements CommitPlaceholderProvid
return task.getSummary();
if ("project".equals(placeholder))
return StringUtil.notNullize(task.getProject());
if ("taskType".equals(placeholder))
return task.getType().name();
throw new IllegalArgumentException(placeholder);
}