开发者

Jira Key Performance Indicator Chart Gadget

开发者 https://www.devze.com 2023-01-26 13:27 出处:网络
I need to create a chart that shows Key Performance Indicator. (total of issues / issues resolved) I\'m using this query to return count of total issues and unresolved issues:

I need to create a chart that shows Key Performance Indicator. (total of issues / issues resolved)

I'm using this query to return count of total issues and unresolved issues:

    JqlQueryBuilder.newBuilder();
    final JqlClauseBuilder jqlClauseBuilder = JqlQueryBuilder.newBuilder().where().defaultAnd().unresolved();

        Query query;
        Query unresolvedQuery;
        query = jqlClauseBuilder.created().gtEq("-" + Integer.toString(start) + "d").and().
               created().ltEq("-" + Integer.toString(start-delta) + "d").buildQuery();
        unresolvedQuery = jqlClauseBuilder.creat开发者_运维问答ed().gtEq("-" + Integer.toString(start) + "d").and().
                       created().ltEq("-" + Integer.toString(start-delta) + "d").
                       unresolved().buildQuery();    


Long totIssues = searchService.searchCount(authenticationContext.getUser(), query);
Long solvedIssues = totIssues - searchService.searchCount(authenticationContext.getUser(), unresolvedQuery);

The problem is that I get a null value... What's wrong?


I found out why. The query is correct but the problem was that query=... is in a FOR so I had to move also the declaration of jqlClauseBuilder, otherwise after the first query, all the others are all wrong created.

0

精彩评论

暂无评论...
验证码 换一张
取 消