[英]Jira Gadget: Get all Issues of specific type
I'd like to create a new chart gadget for jira using jfreechart. 我想使用jfreechart为jira创建一个新的图表小工具。 To collect all the information I need for the chart, I need all issues of a certain issue type.
为了收集图表所需的所有信息,我需要某个问题类型的所有问题。 How do I look them up in my java class?
如何在我的Java类中查找它们? More specific, if I want to use a jquery I need the currently logged in user.
更具体地说,如果我想使用jquery,则需要当前登录的用户。 How do I get the appropriate user object?
如何获得适当的用户对象?
Found the solution. 找到了解决方案。 First get those two objects via constructor injection:
首先通过构造函数注入获得这两个对象:
final SearchService searchService
final JiraAuthenticationContext authenticationContext
Then execute your query like that: 然后像这样执行查询:
final SearchResults results = searchService.search(authenticationContext.getLoggedInUser(), query,
PagerFilter.getUnlimitedFilter());
return results.getIssues();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.