Re: [Trac] ticket notification - ticket_subject_template

2021-02-11 Thread RjOllos


On Thursday, February 11, 2021 at 12:29:40 PM UTC-8 Clemens Feige wrote:

> Clemens wrote on 11.02.2021 at 00:49: 
> > Hello 
> > 
> > I am struggling with the `ticket_subject_template` option from the INI 
> > file. What I want is a E-mail subject like so: 
> > 
> > [TRAC] MyEnvironment ticket #123: bla bla summary 
> > 
> > ... but what I get is only the default value: 
> > 
> > [TRAC] #123: bla bla description 
> > 
> > The project/environment and the plain text "ticket" is missing. 
> > 
> > I have configured as follows: 
> > 
> > smtp_subject_prefix = [TRAC] 
> > ticket_subject_template = ${prefix} ${env} ticket #${ticket.id}: 
> ${summary} 
> > 
> > According to the docu this is supposed to be a Jinja2-template. 
> > 
> > 
> https://trac.edgewall.org/wiki/TracIni#notification-ticket_subject_template-option
>  
> > 
> > 
> > I have TRAC 1.4.2. 
> > 
> > What is wrong? 
> > 
> > Thanks 
> > Clemens 
> > 
>
> I SOLVED the problem. 
>
> By mistake I had a second config option with same name 
> `ticket_subject_template`, which is why TRAC did not accept my other 
> config.
>

We've been able to solve that problem with the move to Python3, but there 
was no simple way to solve it in Python2:
https://trac.edgewall.org/ticket/11538

Ryan 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/638369bc-fbb1-4a50-8345-9a492f73ac39n%40googlegroups.com.


Re: [Trac] ticket notification - ticket_subject_template

2021-02-11 Thread Clemens Feige

Clemens wrote on 11.02.2021 at 00:49:

Hello

I am struggling with the `ticket_subject_template` option from the INI 
file. What I want is a E-mail subject like so:


[TRAC] MyEnvironment ticket #123: bla bla summary

... but what I get is only the default value:

[TRAC] #123: bla bla description

The project/environment and the plain text "ticket" is missing.

I have configured as follows:

smtp_subject_prefix = [TRAC]
ticket_subject_template = ${prefix} ${env} ticket #${ticket.id}: ${summary}

According to the docu this is supposed to be a Jinja2-template.

https://trac.edgewall.org/wiki/TracIni#notification-ticket_subject_template-option 



I have TRAC 1.4.2.

What is wrong?

Thanks
Clemens



I SOLVED the problem.

By mistake I had a second config option with same name 
`ticket_subject_template`, which is why TRAC did not accept my other config.


Second, the config has to look as follows:

smtp_subject_prefix = [TRAC]
ticket_subject_template = ${prefix} ${env.project_name} ticket 
#${ticket.id}: ${summary}


This will produce a subject as expected:

[TRAC] MyEnvironment ticket #123: bla bla summary

Clemens

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/trac-users/4793fb8b-5a64-f975-e86e-4f66058a3b30%40osypkamed.com.