How to create a Bug Monthly report
Asked by Jatin Aggarwal:

Hello,

I want to make the bug report monthly wise which includes following keypoints-

1. The bug created in the respected month like- Number of bugs which are created from 1st April'2020- 30th Apri'2020
2. The bug which are resolved in the respected month irrespective of the created Date  
   like- A bug is created in 15thMAY'2020 but it got resolved in April'2020

I want these two things to be there in my bug report

Can you please help me how to do that?


Answers:
author: Diego
body: Hello [@Jatin Aggarwal](/t5/user/viewprofilepage/user-id/2011294) !

As I understand, you want to create a page that reports tickets created within a certain timeframe and also shows tickets closed within another specific time frame.

I can jump straight into saying that this is possible by using Jira Macro in Confluence and some Jira Query Language (JQL).

Here is some information about this macro:
> * ++***[\[Confluence Cloud\] Insert the Jira issues macro](https://support.atlassian.com/confluence-cloud/docs/insert-the-jira-issues-macro/)***++

Let us look at the JQL that takes care of your first request:

```
created >= '2020-05-01' AND created <= '2020-05-31'
```

This is filtering for tickets created between May 1st, 2020, and May 31st, 2020. Since you need to look for bugs only, we can write the query like this:

```
created >= '2020-05-01' AND created <= '2020-05-31' AND type = bug
```

This will display only tickets with the type set as bug in Jira. The type = bug can be altered to fit any other ticket type you might need to look into.

For us to look into tickets resolved within any given time frame we can use this:

```
status changed to done AND updatedDate >= '2020-05-01' AND updatedDate <= '2020-05-31'
```

The "status changed to done" part of this query can be altered to fit any other status that you might need to look into. Here is some more explanation on Jira statuses:
> * ++***[\[Jira Cloud\] Issue statuses, priorities, and resolutions](https://confluence.atlassian.com/adminjiracloud/issue-statuses-priorities-and-resolutions-973500867.html)***++

Since you need to look only at bugs, we can use this query:

```
status changed to done AND updatedDate >= '2020-05-01' AND updatedDate <= '2020-05-31' AND type = bug
```

Both filters can be altered to look into any given time frame, as long as dates follow the YYYY-MM-DD format (Year-Month-Day).

For more information about Jira Query Language operators, you can look here:
> * ++***[\[Jira Cloud\] Advanced search reference - JQL operators](https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/)***++
> * [++***\[Atlassian Jira\] Get started with Advanced Search and JQL***++](https://www.atlassian.com/software/jira/guides/expand-jira/jql#advanced-search)

*++**For short:**++*

Use this to look at tickets with any given type created between X and Y date:

```
created >= 'YYYY-MM-DD' AND created <= 'YYYY-MM-DD' AND type = desiredIssueType
```

Use this one to look at which tickets with any given type have been closed between X and Y date:

```
status changed to desiredStatus AND updatedDate >= 'YYYY-MM-DD' AND updatedDate <= 'YYYY-MM-DD' AND type = desiredIssueType
```

Here is what both filters in a Jira Issues macro look like for me. Please, keep in mind that I am not using the "type = bug" part of the query:
> ![Screen Shot 2020-05-12 at 15.45.13.png](https://community.atlassian.com/t5/image/serverpage/image-id/94534i7A82534A08FBA36D/image-dimensions/430x222?v=v2 "Screen Shot 2020-05-12 at 15.45.13.png")

I hope this helps! Looking forward to your reply.


Tags: bug

cloud

confluence-cloud

jira

report