Opened 5 years ago

Closed 5 years ago

# Tickets by resolution displays incorrect data

Reported by: Owned by: Alex Ryan J Ollos low TracMetrixPlugin minor 0.12

### Description

The Tickets by Resolution displays incorrect data. It will always display all tickets as resolved by as a single status (e.g. 'fixed', 'worksforme', etc.) based on the resolution status of the last ticket that has been resolved.

The problem can be fixed by adding 'GROUP BY resolution' to the end of the query starting on line 85 in model.py so the query looks like this:

            cursor.execute("""
SELECT resolution, count(resolution) FROM ticket
WHERE status='closed' AND id IN (%s) GROUP BY resolution"""
% ",".join(str_ids))


### comment:1 Changed 5 years ago by Ryan J Ollos

Status: new → accepted

### comment:2 Changed 5 years ago by Ryan J Ollos

In 13558:

Group tickets by resolution. Untested change. Refs #11414.

### comment:3 follow-up:  4 Changed 5 years ago by Ryan J Ollos

Resolution: → fixed accepted → closed

I haven't had any time for this plugin in a while. I appreciate if you are able to test the changes that were committed and report back how it is working.

### comment:4 in reply to:  3 ; follow-up:  5 Changed 5 years ago by Alex

I haven't had any time for this plugin in a while. I appreciate if you are able to test the changes that were committed and report back how it is working.

I'll do that. I noticed that there were some other issues as well, so I've slowly been working on a lot of various fixes and decided that rather than making a lot of individual reports it would probably just be better to roll it into one big patch.

### comment:5 in reply to:  4 ; follow-up:  6 Changed 5 years ago by Ryan J Ollos

I'll do that. I noticed that there were some other issues as well, so I've slowly been working on a lot of various fixes and decided that rather than making a lot of individual reports it would probably just be better to roll it into one big patch.

I don't mind if you report everything in one ticket, but the smaller patches are easier to review and test. With a big patch I'll end up spending time breaking it up (git add -p).

### comment:6 in reply to:  5 Changed 5 years ago by Alex

I don't mind if you report everything in one ticket, but the smaller patches are easier to review and test. With a big patch I'll end up spending time breaking it up (git add -p).

I can break it up into different components then and just report it in one ticket once I've finished.

### comment:7 Changed 5 years ago by Ryan J Ollos

If you post just a few small patches and the changes look good, I'll be happy to give you commit access.

### Modify Ticket

Change Properties