Mailing List Archive

list of placeholders to be used in a ticket comment
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

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAJ4osO%3DuGs1nK8m_HxbH9N5uj3RiUjMPEnu56oMVU86x5pw%3DuQ%40mail.gmail.com.
Re: list of placeholders to be used in a ticket comment [ In reply to ]
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:
https://trac.edgewall.org/wiki/TracIni#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:
https://trac.edgewall.org/ticket/12485


>
> 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
>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/cd02016f-d2e1-4f32-ae94-dab1d6c0e609n%40googlegroups.com.