How to programmatically get issues transitioned to other status by date

I am developing a report and want to get the number of issues by date which transitioned to a certain status. Should I access the history of the issues in the transition I want to verify and then check their history to see if tjey fall in the speciified range date?. Thanks.

Regards,

Edgar

I recommend working out the historical JQL. For example:

project = DEVHELP AND status in (Resolved, Done) AND status was in (Escalated) ORDER BY updated DESC

Finds all the issues that were once “escalated”.

HI Ibuchanan

Thanks for your response. But actually what I need to get is a result like the following using JqlQueryBuilder;

Date----------->Number of Issues in the “Integrated” status
1-April-2017->2
2-April-2017->1
3-April-2017->4
4-April-2017->7

By Now I can just get the total of issues in the Integrated status (in a certain range date) using the following code:

JqlQueryBuilder jqlQueryBuilder = JqlQueryBuilder.newBuilder(newQuery);
JqlClauseBuilder whereClauseBuilder = jqlQueryBuilder.where().defaultAnd();
WasClauseImpl wasClause = new WasClauseImpl(“status”, WAS, new SingleValueOperand(“Integrated”),
new TerminalHistoryPredicate(AFTER, new SingleValueOperand("-" + days + “d”)));
whereClauseBuilder.addClause(wasClause);

But I need to get a list or Map (like the one above) with the information of the number of issues in the Integrated state by day, week or month in the range specified by the AFTER -daysd clause, to later plot that information in a JFree chart. Thanks.

Regards,

Edgar