﻿ticket	summary	type	release	owner	status	created	modified	_description	_reporter
13002	Add DB index on PR.ticket	enhancement		lucid	new	2016-12-19T09:46:51+01:00	2016-12-19T09:46:51+01:00	Since [16118] we search PR's also by ticket id. Might be a good idea to add a DB index to ensure this isn't slowing everything down.	lucid
12714	Wrong comment id when comment gets edited	defect		lucid	new	2016-03-24T09:57:46+01:00	2019-02-27T09:51:51+01:00	"In source:pullrequestsplugin/trunk/pullrequests/web_ui.py@14804:143#L122 there's this code:

{{{#!python
comment_number = (ticket.get_comment_number(ticket['changetime']) or 0) + 1
}}}

This is a hack to work around a Trac API limitation. `ITicketManipulator .validate_ticket` is called when new comments are added, but it's difficult to find the comment number of the new comment.

So instead this assumes the ticket changetime can be used to find the last previous comment, and adding 1 yields in the new comment. Or no previous comment is found, so the new comment is comment number one.

But this fails when the ticket was last changed for other reasons than adding a comment, e.g. for editing a comment. In that case searching for a ""previous comment"" created at the ticket changetime fails and `comment_number` is 1, which is wrong!"	anonymous
