Edgewall Software
Modify

Ticket #10555 (closed defect: fixed)

Opened 4 months ago

Last modified 3 months ago

make_ticket_comment should use [changeset:%s]

Reported by: j@… Owned by: j@…
Priority: normal Milestone: 0.12.3
Component: ticket system Version: 0.12dev
Severity: normal Keywords:
Cc: ryano@…
Release Notes:
API Changes:

Description

currently make_ticket_comment just wraps the changeset revisin in [revid] while closing tickets.
depending on the version control backend changesets might not be detected correctly by the wiki. using an explicit [changeset:revid] will always work.

Attachments

make_ticket_comment_changeset.patch (424 bytes) - added by j 4 months ago.
NoBrackets.png (13.6 KB) - added by Ryan J Ollos <ryano@…> 3 months ago.
Brackets.png (8.7 KB) - added by Ryan J Ollos <ryano@…> 3 months ago.

Download all attachments as: .zip

Change History

comment:1 Changed 4 months ago by rblank

  • Milestone set to 0.12.3
  • Resolution set to fixed
  • Status changed from new to closed

Patch applied in [10957]. Thanks!

comment:2 Changed 4 months ago by rblank

  • Owner set to j@…

Changed 3 months ago by Ryan J Ollos <ryano@…>

Changed 3 months ago by Ryan J Ollos <ryano@…>

comment:3 Changed 3 months ago by Ryan J Ollos <ryano@…>

My version control system is Subversion. After upgrading from 0.12.2 to 0.12.3, I noticed that the formatting of the log messages inserted by the post-commit hook have changed. They used to look like this:


and now look like this:


The brackets have gone away. I think this is due to this patch, because we've changed from inserting [10957] to inserting [changeset:10957], so we get 10957 rather than [10957].

I guess this isn't a big deal, but I'm used to seeing the brackets, and Trac has formatted the changeset messages with the brackets around the changeset for at least a while now, so it was an unexpected change.

comment:4 Changed 3 months ago by Ryan J Ollos <ryano@…>

  • Cc ryano@… added

comment:5 Changed 3 months ago by rblank

Yes, I knew about the change. I actually had a version of the patch that restored the brackets, using this syntax:

In [changeset:9453/psi "[9453/psi]"]:

I decided not to use it for two reasons:

  • The message also appears in plain text in the ticket notification email, and using this syntax makes the message less readable.
  • Showing the bracket syntax without the changeset: is actually a lie for exactly those cases for which this ticket was filed (i.e. revision IDs where using only brackets doesn't work), and pretends you can use it when in fact you can't.

Fortunately, it's fairly easy to have your brackets back if you really want to, by subclassing the TicketCommitUpdater component in a small single-file plugin and overriding the method generating the message (which was introduced exactly for this purpose).

And of course, if enough people feel strongly about it, we can always change to the more complicated syntax, with brackets.

comment:6 Changed 3 months ago by Ryan J Ollos <ryano@…>

Thanks for the reply. I understand now, the justifications for the change seem good. It's nice to have a workaround too!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from j@…. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.