Edgewall Software
Modify

Opened 11 years ago

Last modified 8 years ago

#9946 new defect

CommitTicketUpdater does not honor wiki_format_messages setting

Reported by: guttman@… Owned by:
Priority: low Milestone: next-major-releases
Component: version control/changeset view Version: 0.12.1
Severity: normal Keywords: wiki_to_text, CommitTicketUpdater
Cc: info@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When the [changset] wiki_format_messages option is set to false, I would expect that the changset message that gets sent by email and that gets added as a comment to any referenced ticket(s) would be pre-formatted (i.e., not in wiki format). However, this is not the case.

In looking at the code, it seems the option isn't even checked - line 195 of method CommitTicketUpdater.make_ticket_comment() in tracopt/ticket/commit_updater.py:

    def make_ticket_comment(self, repos, changeset):
        """Create the ticket comment from the changeset data."""
        revstring = str(changeset.rev)
        if repos.reponame:
            revstring += '/' + repos.reponame
        return """\
In [%s]:
{{{
#!CommitTicketReference repository="%s" revision="%s"
%s
}}}""" % (revstring, repos.reponame, changeset.rev, changeset.message.strip())
}}}

Attachments (0)

Change History (6)

comment:1 by anonymous, 11 years ago

Or maybe I just don't understand that the wiki_format_messages option does… Regardless, what I really want is for the changeset emails sent from CommitTicketUpdater to be sent pre-formatted in easy-to-read text.

comment:2 by anonymous, 11 years ago

This is an visible annoyance bug to users of trac after upgrading to 0.12 that did not exist using the old trac-post-commit hooks and email mechanisms.

comment:3 by Christian Boos, 11 years ago

Keywords: wiki_to_text added
Milestone: next-major-0.1X

Well, the macro is there precisely for rendering the changeset according to the wiki_format_messages (see in tags/trac-0.12/tracopt/ticket//commit_updater.py#expand_macro and also #1507 for the background).

So what annoys you is that you see the {{{ / #!CommitTicketReference repository=... / }}} lines in the mail? These could disappear once we have wiki_to_text (#9879) and use that for generating the content of the mails.

comment:4 by anonymous, 11 years ago

Yes, the / #!CommitTicketReference repository=... / lines in the mail caused multiple complaints by users as soon as we upgraded to trac 0.12. By editing commit_updater.py by editing the lines to keep the original comment and SVN revision number the email output looks like it previously did. And trac still appears to be operating correctly. The addition on the CommitTickReference in the comment in Trac does not appear to perform any additional operations.

comment:5 by Carsten Fuchs <info@…>, 9 years ago

Cc: info@… added

comment:6 by Jun Omae, 8 years ago

Keywords: CommitTicketUpdater added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.