Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How create Agile Board programmatically?

Igor Guzenko May 21, 2014

For everyone who can answer this, I will increment KARMA !!! :) Thank u in advance :)

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
DMYTRO SORYCH June 26, 2014

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;

}

}

Igor Guzenko July 1, 2014

Nice listing)

1 vote
Pylypenko Artem May 21, 2014

Peter is rigth.

Igor Guzenko May 21, 2014

What ? Peter's answer don't helpful:)

1 vote
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2014
Igor Guzenko May 21, 2014

I'm sorry can you explain a little bit more. Can I call this commands from java ?

Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2014

Yes, any command can be called from Java. Google: java run command.

Isaac Montes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2016

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...

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2014

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?

Igor Guzenko May 21, 2014

I have Agile Boards info from other Jira instance for current project, and I want to recreate all boards for project.

Igor Guzenko May 21, 2014

I use project tab plugin module...

Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2014

Maybe you can start your journey here : https://developer.atlassian.com/display/JIRADEV/JIRA+Agile+Development?

Best regards,

Peter

Igor Guzenko May 21, 2014

Peter Van de Voorde , thanks I saw this page, and I didn't find answers about really development cases here.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 21, 2014

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.

DMYTRO SORYCH May 21, 2014

Nic Brough ,it seems that the question is about a way to create Agile board via REST query, etc

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events