How to copy a agile board using Java API?

I am developing an add-on (Jira 7.5+) that can create project based on the customer actions. The project is created using a template but it happens that the project can be a software project so I have to create a board based that project too. While it is possible to create a board programatically I can not find a way to copy  a existing board including the configuration. Moreover as far as I know there is no way to configure a given board using Java API.

I am aware that it does exist a REST API that does what I am asking for but since the add-on will run on the server side I am not able to make an authenticated REST call without storing somewhere an user and password for it.

Thanks.

2 answers

1 accepted

Accepted Answer
1 vote

I managed to copy a agile board doing this:

First adding greenhopper dependency to my add-on pom.xml:

<dependency>
          <groupId>com.atlassian.jira.plugins</groupId>
          <artifactId>jira-greenhopper-plugin</artifactId>
          <version>7.4.0</version>
          <scope>provided</scope>
      </dependency>

Next I have to get the RapidBoardService within my class:

RapidViewService rapidViewService = (RapidViewService) ComponentAccessor.getOSGiComponentInstanceOfType(RapidViewService.class);

RapidViewService has a method for fully copying a rapidview:

rapidViewService.copy(user, board)

Hello @Antonio Dionisio, which JIRA version do you use?

0 votes

Have you already explored this - https://docs.atlassian.com/jira-software/6.7.12/ ?

For example, package com.pyxis.greenhopper.jira.boards

<dependency>
<groupId>com.atlassian.jira.plugin</groupId>
<artifactId>jira-greenhopper-api</artifactId>
<version>6.7.12</version>
</dependency>

ithis is my code ,but it's not work

what should i do?

i have the same problem with you ,i add the code to pom.xml,certainty l failed.

You'll need to describe your problem better than "it failed".

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Apr 22, 2018 in Jira Software

How-to setup a secured Jira Software 7.9.0 on Ubuntu 16.04.4 in less than 30 minutes

...PermissionsStartOnly=true User=www-data Group=www-data ExecStart=/opt/jira/bin/startup.sh ExecStop=/opt/jira/bin/shutdown.sh TimeoutStartSec=120 TimeoutStopSec=600 PrivateTmp=true [Install] WantedBy...

1,731 views 14 13
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you