How do I get a report of the name of the user who resolved an issue for issues closed last N days?

We are using JIRA On Demand and would like to create a filter that identifies the user who marked an issue as RESOLVED along with the date of resolution.

In other words:  For issues CLOSED last N days, show me the issue type, issue number, summary, name of the user who marked the issue resolved, the resolution date, the closed date.

On a single issue we can determine the "resolver" by looking in the History log.

But we would like to figure out how to write a Search Filter to run this as a report or create a dashboard element from it.

2 answers

I can propose 2 ways to do it

  1. Use SQL like:

    	, project.pkey + '-' + CAST( jiraissue.issuenum as varchar(20))
    	, jiraissue.SUMMARY	
    	, cwd_user.display_name	
    	, changegroup.CREATED	
    	join changeitem on	changegroup.ID = changeitem.groupid
    	join cwd_user	on	changegroup.AUTHOR = cwd_user.user_name
    	join jiraissue	
    		join issuetype	on	jiraissue.issuetype = issuetype.ID
    		join project	on	jiraissue.PROJECT = project.ID
    	on	changegroup.issueid	= jiraissue.ID
    	changeitem.FIELD = 'resolution'
    	and changeitem.OLDVALUE is null
    order by
    	changegroup.CREATED desc

    But you can not use it for dashboards

  2. Create scripted field via ScriptRunner to get user who resolved an issue. Here is a code example to look for change history (some russian comments):

    import com.atlassian.jira.component.ComponentAccessor
    import com.atlassian.jira.issue.Issue
    import com.atlassian.jira.issue.changehistory.ChangeHistory
    import com.atlassian.jira.issue.changehistory.ChangeHistoryManager
    import com.atlassian.jira.issue.history.ChangeItemBean
     * Created by VZverev on 01.12.2015.
    Issue issue;
    ///Начальное значение для статуса
    PreviousStatus prevStatus = new PreviousStatus(Calendar.getInstance().getTimeInMillis(), issue.getStatusObject().getName());
    ChangeHistoryManager changeHistoryManager = ComponentAccessor.getChangeHistoryManager();
    //Дата, с которой анализируем историю изменений
    Calendar lastFriday = Calendar.getInstance();
    lastFriday.add(Calendar.WEEK_OF_YEAR, -1);
    lastFriday.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
    Date lastFridayDate = new Date(lastFriday.getTimeInMillis())
    if(issue.getCreated().getTime() > lastFriday.getTimeInMillis())
        return "новый запрос";
    for(ChangeHistory changeHistory: changeHistoryManager.getChangeHistoriesSince(issue, lastFridayDate)) {
        for(ChangeItemBean changeItemBean: changeHistory.getChangeItemBeans())
            if(changeItemBean.getField().equals("status")) {
                prevStatus.setNewStatus(changeItemBean.getCreated().getTime(), changeItemBean.getFromString());
    return prevStatus.getStatus().equals(issue.getStatusObject().getName())?"не изменился": prevStatus.getStatus()
    class PreviousStatus{
        private long dateInMills;
        private String value;
        public PreviousStatus(long _dateInMills, String _value){
            dateInMills = _dateInMills;
            value = _value;
        public setNewStatus(long _dateInMills, String _value){
            if(_dateInMills < dateInMills){
                dateInMills = _dateInMills;
                value = _value;
        public String getStatus(){return value}


0 votes
Joe Pitt Community Champion Jan 14, 2016

Since you're using the on demand version, you can't use scripting and and the SQL can't be used in a filter. A method I've used in the past for capturing milestone info is to copy the info to new step specific fields. You'd create a custom 'closed date' and 'closed by' fields. In a the post functions copy the updated date and user to those fields. Make sure you put the copy updated date AFTER the update function in the post function list. I always restrict transitions to the assignee so I copy the current assignee field. Put them on the view screen and they will be readily visible. Also remember to clear them if you reopen the issue or having an open issue with closed date and user will be confusing to most people. As I mentioned I like this for all milestone events like passed testing, reopened, etc.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,096 views 13 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot