For everyone who can answer this, I will increment KARMA !!! :) Thank u in advance :)
Community moderators have prevented the ability to post new answers.
public String makePostRequestToCreateBoard(AgileBoard agileBoard, Long[] projects) {
String resource = "/rest/greenhopper/1.0/rapidview/create/presets";
Gson json = new Gson();
DataForBoardRequest dataForBoardRequest = new DataForBoardRequest();
dataForBoardRequest.setName(agileBoard.getBoardName());
String projectId[] = new String[projects.length];
for (int i = 0; i < projects.length; i++) {
projectId[i] = String.valueOf(projects[i]);
}
dataForBoardRequest.setProjectIds(projectId);
dataForBoardRequest.setPreset(agileBoard.getBoardType());
String stringObject = json.toJson(dataForBoardRequest);
String requestUrl = String.format("%s%s", baseUrl, resource.getUrl());
WebResource webResource = jerseyClient.resource(requestUrl);
String postAnswer = webResource.header("Authorization", "Basic " + authString).type(MediaType.APPLICATION_JSON)
.accept(MediaType.APPLICATION_JSON).entity(stringObject).post(String.class);
return postAnswer;
}
public class DataForBoardRequest {
private String name;
private String projectIds[] = new String[2];
private String preset;
public DataForBoardRequest() {
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String[] getProjectIds() {
return projectIds;
}
public void setProjectIds(String[] projectIds) {
String[] cloneProjectIds = projectIds.clone();
this.projectIds = cloneProjectIds;
}
public String getPreset() {
return preset;
}
public void setPreset(String preset) {
this.preset = preset;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry can you explain a little bit more. Can I call this commands from java ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, any command can be called from Java. Google: java run command.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way to configure specifics on the board creation, I couldn't find anything in the API the will let me do that. Like configure columns quick filters etc...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might want to explain the environment a little more - where is your program going to run? Are you aiming for an add-on in Jira/Agile, a Connect plugin, or an external program?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have Agile Boards info from other Jira instance for current project, and I want to recreate all boards for project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you can start your journey here : https://developer.atlassian.com/display/JIRADEV/JIRA+Agile+Development?
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I know that now he's explained a bit more. The docs Peter point to are a good starting point for writing stuff to use REST. Or, as Bob says, use the CLI, as you can run that from anywhere you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.