CommitTicketReferenceMacro for non-referenced tickets

44 views
Skip to first unread message

Cooke, Mark

unread,
May 21, 2014, 5:11:14 AM5/21/14
to trac-...@googlegroups.com
Folks,

I have a commit message where I forgot to reference all the tickets. I tried to add the `CommitTicketReferenceMacro` macro to a new comment but it just displays "(The changeset message doesn't reference this ticket)". To me this is an odd restriction and limits the usefulness of the macro.

I cannot see any way round this, is there one and I missed it?

If not, does anyone else think that allowing non-referenced tickets to display the commit message would be useful?


Cheers,

~ Mark C

Craig A

unread,
May 29, 2014, 10:09:35 AM5/29/14
to trac-...@googlegroups.com, mark....@siemens.com
>> If not, does anyone else think that allowing non-referenced tickets to display the commit message would be useful? 

I agree it would be useful. Often we encounter this when a typo is made on commit and we need to go back and update the Trac ticket comment

Cooke, Mark

unread,
May 30, 2014, 1:56:05 AM5/30/14
to trac-...@googlegroups.com, Craig A
I thought to raise a trac ticket for this but I do not seem to be able to use the new ticket page (it shows briefly then I get a "cannot display page" message for `a.rfihub.com/blah` (I suspect a dodgy advert?)

Anyway, I have achieved what I need for now by creating a new `CommitTicketRefMacro` and simply by commenting out the test for ticket reference:

http://trac.edgewall.org/browser/trunk/tracopt/ticket/commit_updater.py?rev=12785&marks=307-312#L279

If I manage to create a ticket I will attach the macro to said ticket.

Cheers,

~ Mark C

RjOllos

unread,
May 31, 2014, 1:14:16 PM5/31/14
to trac-...@googlegroups.com, txc...@gmail.com, mark....@siemens.com
We'll see if the behavior can be fixed in http://trac.edgewall.org/ticket/11633, however there may be some reason to preserve the existing behavior. I'll add some comments about that in #11633 after I have some time to look at the code more closely and test out some different scenarios. 

Cooke, Mark

unread,
Jun 2, 2014, 3:30:05 AM6/2/14
to trac-...@googlegroups.com, txc...@gmail.com, RjOllos
> > -----Original Message-----
> > From: Craig A [mailto:txc...@gmail.com <javascript:> ]
> > Sent: 29 May 2014 15:10
> >
> > > If not, does anyone else think that allowing non-referenced
> > > tickets to display the commit message would be useful?
> >
> > I agree it would be useful. Often we encounter this when a typo is
> > made on commit and we need to go back and update the Trac ticket
> > comment
>
> I thought to raise a trac ticket for this but I do not seem to be able
> to use the new ticket page (it shows briefly then I get a "cannot display
> page" message for `a.rfihub.com/blah` <http://a.rfihub.com/blah> (I suspect
> a dodgy advert?)
>
> Anyway, I have achieved what I need for now by creating a new
> `CommitTicketRefMacro` and simply by commenting out the test for ticket
> reference:
>
> http://trac.edgewall.org/browser/trunk/tracopt/ticket/commit_updater.p
> y?rev=12785&marks=307-312#L279
> <http://trac.edgewall.org/browser/trunk/tracopt/ticket/commit_updater.py?rev=
> 12785&marks=307-312#L279>
>
> If I manage to create a ticket I will attach the macro to said ticket.
>
> Cheers,
>
> ~ Mark C
>
> -----Original Message-----
> From: RjOllos [mailto:rjo...@gmail.com]
> Sent: 31 May 2014 18:14
>
> We'll see if the behavior can be fixed in
> http://trac.edgewall.org/ticket/11633, however there may be some reason to
> preserve the existing behavior. I'll add some comments about that in #11633
> after I have some time to look at the code more closely and test out some
> different scenarios.

Thanks for that. I could not see any reason in the macro code, indeed the check is not applied for other use cases (such as the wiki) and this provides an easy way to (partially) recover from an incomplete commit message. However I am not too familiar with the rest of the code.

~ Mark C

Reply all
Reply to author
Forward
0 new messages