Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get all boards from Jira with pagination

srddra July 20, 2020

Hi!

I'm working on a plugin for confluence that show data from Jira.

I need help in 2 points.

  • I need to get all boards with pagination. I know I have to use "startAt", but I'm new in Java and I don't understend how to do it.

This my actual code (that get only the first page):

public String getBoards(ApplicationLink applicationLink) {
Map<String,String> restPath = new HashMap<>();
restPath.put("rest","/rest/agile/1.0/board");
restPath.put("query","");
LOG.debug("Prepared JIRA REST Path boards list retrieval: path '{}', query '{}'", restPath.get("rest"), restPath.get("query"));
return getJiraEntities(applicationLink, restPath);
}

How can I change that code (che path created) for working with pagination?

  • I'm show those boards in a <input>. I want to call the next page after scrolling down the first one. Here my html:
<div class="field-group top-label" id="bar-pool-field">
<label for="bar-pool-id"><span class="bar-pool-label"></span><span class="aui-icon icon-required"></span></label>
<input id="bar-pool-id" name="bar-pool-id" title="{getText('myplugin.editor.label.pool')}" />
</div>
<div class="field-group top-label" id="bar-sub-pool-field">
<label for="bar-sub-pool-id"></label>
<input id="bar-sub-pool-id" name="bar-sub-pool-id" title="{getText('myplugin.editor.label.subPool')}" />
</div>

 I think I need to attach a scrolling event listener and make the call for the new board. Right?

 

Thanks for your help

0 answers

Suggest an answer

Log in or Sign up to answer