How to get Issue Id and Issue name in report plugin output?

Sopan Sagorkar July 3, 2015

We are developing report plugin in JIRA and want to display issue id, issue summary,issue discription as a output.
We have wriiten a JQL query for this 

JqlQueryBuilder queryBuilder = JqlQueryBuilder.newBuilder();
Query query=queryBuilder.where().createdBetween(startDate,endDate).and().project(projectId).and().issueType("Test").buildQuery();

 

and for getting the result we are using  searchResult as follow :

 SearchResult  searchResults= searchProvider.search(query, remoteUser, PagerFilter.getUnlimitedFilter());

But we are not getting any data in searchResult

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Onkar Ahire
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.
July 6, 2015
0 votes
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.
July 3, 2015

Is your log file showing any errors or warnings when the code runs?

Sopan Sagorkar July 5, 2015

There are no errors or warning in log file we are not getting any value in "serachResult".

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.
July 5, 2015

Ok, that strongly suggests that the filter is working, but finding nothing. If you run the equivalent JQL in JIRA, do you get anything? (Created > startDate and Created < endDate and project = xxx and issuetype = "Test") run as the same user. You might also want to check that remoteUser contains a valid user who can see the issues - a null in there will run the filter as non-logged in user, which is still valid, but may well not be able to see anything. As a rather klunky debug method, I'd also try running the code with more simply queries built - does "project = x and issuetype = y" return anything for example? If that works, then you know it's the date clause that's the problem.

TAGS
AUG Leaders

Atlassian Community Events