list of placeholders to be used in a ticket comment

7 views
Skip to first unread message

Markus Rosjat

unread,
Aug 27, 2021, 2:47:10 AMAug 27
to trac-...@googlegroups.com
Hi there,

is there a list of usable placeholders to use in a ticket comment? 

background:

I want to make smal macro that i can use in a ticket comment to add a line with a date, the user , the time and a short comment. So i would at least need a hint on the user that is editing the ticket.


on a other note, is macro still a valid way to approach stuff or should i take a look at plugins? 


cheers 

Markus

RjOllos

unread,
Sep 6, 2021, 6:10:16 PMSep 6
to Trac Users
On Thursday, August 26, 2021 at 11:47:10 PM UTC-7 markus...@gmail.com wrote:
Hi there,

is there a list of usable placeholders to use in a ticket comment? 

Nothing thus far. It might be reasonable to have a "default_comment" setting in the [ticket] section:
 
background:

I want to make smal macro that i can use in a ticket comment to add a line with a date, the user , the time and a short comment. So i would at least need a hint on the user that is editing the ticket.

You want the macro to be added to every comment? You can certainly do that with a macro, and you could auto-add the macro using JavaScript, but there may be a better way such as writing a plugin to add the info to the page.

This might be completely unrelated, but for a long time I've been wanting to work on ITicketCommentProvider so that a plugin could add a ticket comment:
 

on a other note, is macro still a valid way to approach stuff or should i take a look at plugins? 

Macro vs plugin really just depends on your use case. However, the macro vs plugin difference can often be confused with single-file plugin vs setuptools-packaged plugin, since macros were often implemented as single-file plugins in early versions of Trac. I found this aspect confusing when I first started with Trac.

 
cheers 

Markus
Reply all
Reply to author
Forward
0 new messages