Re: [Trac] Re: Ticket Reminder e-mails

2022-03-14 Thread Jun Omae
On Tue, Mar 15, 2022 at 4:43 AM Dan  wrote:
> It seems like the author has basically left this plugin unchanged for about 
> four years (the source is on gitHub), so I'm assuming he wouldn't be 
> interested in looking over the changes.

The latest of plugin source is on trac-hacks.org:

https://trac-hacks.org/wiki/TracHtmlNotificationPlugin
https://trac-hacks.org/svn/trachtmlnotificationplugin
https://trac-hacks.org/browser/trachtmlnotificationplugin

Also, I made the repository on github.com private.

-- 
Jun Omae  (大前 潤)

-- 
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/CAEVLMag0BxUg3yN78A7myZYLD%3DDni2U2M19ai7UNAW5rPBFH-g%40mail.gmail.com.


[Trac] Re: Ticket Reminder e-mails

2022-03-14 Thread Dan
FWIW, I ended up just pasting in the related code from Trac and 
TracHtmlNotificationPlugin.  Works OK as far as I can tell after limited 
testing, but I should clean up the code a bit.

It seems like the author has basically left this plugin unchanged for about 
four years (the source is on gitHub), so I'm assuming he wouldn't be 
interested in looking over the changes.  In the past, I have worked with 
Ryan on plugin mods, though via tickets.  (Thanks very much, by the way, 
for all the help over the years.)  I'm not sure how/where would be the best 
way to get the updated plugin into the Trac ecosytem.

I'm kind of looking forward to (and also dreading) the port to Python 3 for 
all the plugins I've been using lol.

Thanks!

- Dan

On Friday, March 11, 2022 at 10:44:31 AM UTC-6 Dan wrote:

> I've been looking for a way to give reminders for tickets, and I think 
> TicketReminder plugin does basically what I need.  I am currently using 
> Trac 1.4.2.  However, that plugin is mostly out of date.  (If there is 
> another one that is more maintained, please let me know.)
>
> I ended up getting the plugin mostly updated (substituting outdated APIs, 
> porting to Jinja2, and incorporating notification preferences), but I am 
> currently having it send e-mails via a TicketChangeEvent sent to 
> NotificationSystem.  However, I can't figure out a way to modify the 
> subject line to add "Ticket Reminder" or something like that.
>
> Is the proper way to deal with this problem to subclass TicketChangeEvent 
> and TicketFormatter?  I haven't tried it yet, but seems like that might 
> work.  Unfortunately TicketFormatter has the "realm" hard-coded to 
> 'ticket', so it seems I can't really re-use some of the functions that I'd 
> like to; I'd have to re-implement them.
>
> I'd appreciate any words of wisdom.
>
> - Dan
>
>

-- 
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/2dd27a33-6059-4591-b075-798d205d45c7n%40googlegroups.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-14 Thread RjOllos


On Monday, March 14, 2022 at 11:06:58 AM UTC-7 sec...@gmail.com wrote:

> OK thanks Ryan.
>
> I'm facing some final problems with Genshi templates in Trac 1.4.3.
>
> It looks like Trac is trying to render my templates with Jinja2 instead of 
> Genshi...
>
> Is there anything I should do to force Genshi to render my templates?
>
> Here is the stack trace:
>
> 18:47:17 Trac[main] DEBUG: Rendering response with template 
> testmanagerstats.html
> 18:47:17 Trac[web_ui] DEBUG: TestManagerTemplateProvider init
> 18:47:17 Trac[wiki] DEBUG: WikiTestManagerInterface init
> 18:47:17 Trac[workflow] DEBUG: TestManagerWorkflowInterface init
> 18:47:17 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering 
> XML/HTML template 
> Traceback (most recent call last):
>   File 
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/trac/web/chrome.py",
>  
> line 1706, in _iterable_jinja_content
> for chunk in stream:
>   File 
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>  
> line 1357, in __next__
> return self._next()
>   File 
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>  
> line 1334, in _buffered_generator
> c = next(self._gen)
>   File 
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>  
> line 1125, in generate
> yield self.environment.handle_exception()
>   File 
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>  
> line 832, in handle_exception
> reraise(*rewrite_traceback_stack(source=source))
>   File 
> "/home/roberto/.cache/Python-Eggs/TestManager-1.10.3-py2.7.egg-tmp/testmanager/templates/testmanagerstats.html",
>  
> line 125, in top-level template code
> ${m['name']}
>   File 
> "/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
>  
> line 452, in getitem
> return obj[argument]
> UndefinedError: 'm' is undefined
>
>
> And the relevant template code, where it looks like the "py:for" directive 
> is not understood nor run:
>
>  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
> http://www.w3.org/1999/xhtml;
> xmlns:xi="http://www.w3.org/2001/XInclude;
> xmlns:i18n="http://genshi.edgewall.org/i18n;
> xmlns:py="http://genshi.edgewall.org/;
> i18n:domain="testmanager"
> >
> 
> 
>
> # import 'macros.html' as jmacros with context
>
> [...]
> 
> All Test Plans
> 
> ${m['name']}
>  
> 
>
>
> And the code I use to render the template:
>
> class TestStatsPlugin(Component):
> implements(INavigationContributor, IRequestHandler, ITemplateProvider, 
> IPermissionRequestor)
>
> [...]
> def process_request(self, req):
> [...]
> return 'testmanagerstats.html', data
>
>
> Any help is appreciated. Thanks.
> Roberto
>

You'll need to return:

 return 'testmanagerstats.html', data, None

in order to tell Trac that the template being rendered is a Genshi 
template. Also, you can't use "import ... jmacros" in a Genshi template, 
that's Jinja2 syntax.

https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja#IRequestHandler

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/a7b670fa-a7be-453d-9c4b-f425df3a380bn%40googlegroups.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-14 Thread Roberto Longobardi
OK thanks Ryan.

I'm facing some final problems with Genshi templates in Trac 1.4.3.

It looks like Trac is trying to render my templates with Jinja2 instead of
Genshi...

Is there anything I should do to force Genshi to render my templates?

Here is the stack trace:

18:47:17 Trac[main] DEBUG: Rendering response with template
testmanagerstats.html
18:47:17 Trac[web_ui] DEBUG: TestManagerTemplateProvider init
18:47:17 Trac[wiki] DEBUG: WikiTestManagerInterface init
18:47:17 Trac[workflow] DEBUG: TestManagerWorkflowInterface init
18:47:17 Trac[chrome] ERROR: Jinja2 UndefinedError error while rendering
XML/HTML template
Traceback (most recent call last):
  File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/trac/web/chrome.py",
line 1706, in _iterable_jinja_content
for chunk in stream:
  File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 1357, in __next__
return self._next()
  File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 1334, in _buffered_generator
c = next(self._gen)
  File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 1125, in generate
yield self.environment.handle_exception()
  File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
  File
"/home/roberto/.cache/Python-Eggs/TestManager-1.10.3-py2.7.egg-tmp/testmanager/templates/testmanagerstats.html",
line 125, in top-level template code
${m['name']}
  File
"/home/roberto/Documenti/build/pve-trac14-vero/lib/python2.7/site-packages/jinja2/environment.py",
line 452, in getitem
return obj[argument]
UndefinedError: 'm' is undefined


And the relevant template code, where it looks like the "py:for" directive
is not understood nor run:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;>
http://www.w3.org/1999/xhtml;
xmlns:xi="http://www.w3.org/2001/XInclude;
xmlns:i18n="http://genshi.edgewall.org/i18n;
xmlns:py="http://genshi.edgewall.org/;
i18n:domain="testmanager"
>



# import 'macros.html' as jmacros with context

[...]

All Test Plans

${m['name']}




And the code I use to render the template:

class TestStatsPlugin(Component):
implements(INavigationContributor, IRequestHandler, ITemplateProvider,
IPermissionRequestor)

[...]
def process_request(self, req):
[...]
return 'testmanagerstats.html', data


Any help is appreciated. Thanks.
Roberto



Il giorno lun 14 mar 2022 alle ore 18:12 RjOllos  ha
scritto:

>
>
> On Monday, March 14, 2022 at 10:09:29 AM UTC-7 sec...@gmail.com wrote:
>
>> Unfortunately you are right, there's still some incompatibility with Trac
>> 1.4.x, which I didn't spot because of an incorrect setup of my test
>> environment... I was actually testing against a Trac 1.2.x instead... My
>> bad.
>>
>> I fixed most of the problems last night and I'm almost ready for a new
>> release. I just want to perform more extensive tests with Trac versions
>> 1.2, 1.3 and 1.4.
>>
>> A question for Ryan, though: how old Trac versions do you think it still
>> makes sense to support? Will it be ok to stop at 1.2 or you think I should
>> go even backward?
>>
>> Regards.
>> Roberto
>>
>
> Supporting back to 1.2 is probably fine since the old version works with
> 1.0. The 1.4 and 1.5 release lines are currently the only that are
> maintained.
>
> 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/fe8ac504-e056-46f4-86ee-3933cf83dfcbn%40googlegroups.com
> 
> .
>

-- 
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/CAJkkV1Exakykj4humfV5ww1DH7Ndcv3RZV8LEcM%3DN0-%2BkPmcow%40mail.gmail.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-14 Thread RjOllos


On Monday, March 14, 2022 at 10:09:29 AM UTC-7 sec...@gmail.com wrote:

> Unfortunately you are right, there's still some incompatibility with Trac 
> 1.4.x, which I didn't spot because of an incorrect setup of my test 
> environment... I was actually testing against a Trac 1.2.x instead... My 
> bad.
>
> I fixed most of the problems last night and I'm almost ready for a new 
> release. I just want to perform more extensive tests with Trac versions 
> 1.2, 1.3 and 1.4.
>
> A question for Ryan, though: how old Trac versions do you think it still 
> makes sense to support? Will it be ok to stop at 1.2 or you think I should 
> go even backward?
>
> Regards.
> Roberto
>

Supporting back to 1.2 is probably fine since the old version works with 
1.0. The 1.4 and 1.5 release lines are currently the only that are 
maintained.

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/fe8ac504-e056-46f4-86ee-3933cf83dfcbn%40googlegroups.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-14 Thread Roberto Longobardi
Unfortunately you are right, there's still some incompatibility with Trac
1.4.x, which I didn't spot because of an incorrect setup of my test
environment... I was actually testing against a Trac 1.2.x instead... My
bad.

I fixed most of the problems last night and I'm almost ready for a new
release. I just want to perform more extensive tests with Trac versions
1.2, 1.3 and 1.4.

A question for Ryan, though: how old Trac versions do you think it still
makes sense to support? Will it be ok to stop at 1.2 or you think I should
go even backward?

Regards.
Roberto

Il lun 14 mar 2022, 16:49 Ryan Ollos  ha scritto:

>
>
> On Mon, Mar 14, 2022 at 8:45 AM Steve Sagodi  wrote:
>
>> Hi we installed on our TRAC instance but none of our existing test cases
>> show up on the Test Manage page just Example Catalog.
>>
>> Clicking on the Test Stat gives an error
>> *-  Trac detected an internal error:*NameError: global name 'env' is not
>> defined
>>
>> Any suggestions on if we missed a config item ?
>>
>
> Almost certainly that's a coding error. Could you please locate the
> traceback in the log and post it here?
> https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs
>
>
> --
> 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/CA%2BBGpn8bNF4EELF7YTnWaO53iB8bNo%2B9n5dcwud22e%3DQDFo0LA%40mail.gmail.com
> 
> .
>

-- 
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/CAJkkV1FOBRRtNaVNitcT4Do3oKkDbuQm0%3Dvd7RDqE5-fNXQLkw%40mail.gmail.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-14 Thread Ryan Ollos
On Mon, Mar 14, 2022 at 8:45 AM Steve Sagodi  wrote:

> Hi we installed on our TRAC instance but none of our existing test cases
> show up on the Test Manage page just Example Catalog.
>
> Clicking on the Test Stat gives an error
> *-  Trac detected an internal error:*NameError: global name 'env' is not
> defined
>
> Any suggestions on if we missed a config item ?
>

Almost certainly that's a coding error. Could you please locate the
traceback in the log and post it here?
https://trac.edgewall.org/wiki/TracTroubleshooting#ChecktheLogs

-- 
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/CA%2BBGpn8bNF4EELF7YTnWaO53iB8bNo%2B9n5dcwud22e%3DQDFo0LA%40mail.gmail.com.


Re: [Trac] Re: TestManagerForTracPlugin not working

2022-03-14 Thread Steve Sagodi
Hi we installed on our TRAC instance but none of our existing test cases 
show up on the Test Manage page just Example Catalog.

Clicking on the Test Stat gives an error
*-  Trac detected an internal error:*NameError: global name 'env' is not 
defined

Any suggestions on if we missed a config item ?

On Monday, February 7, 2022 at 11:04:26 PM UTC-8 figaro wrote:

> Thank you for your efforts. Will look into this also over the next few 
> weeks.
>
> -- figaro
>
> On Tuesday, 8 February 2022 at 00:25:21 UTC+1 sec...@gmail.com wrote:
>
>> Hi,
>> I've pushed my latest changes on both the sourceforge and the new GitHub 
>> repo: https://github.com/seccanj/testman4trac
>>
>> After some tests on Trac 1.4 and Python 2.7 the changes look good.
>>
>> Please, try them out and let me know if something's wrong.
>>
>> Thanks
>> Roberto
>>
>> Il giorno lunedì 7 febbraio 2022 alle 20:08:22 UTC+1 RjOllos ha scritto:
>>
>>> On Monday, February 7, 2022 at 7:26:47 AM UTC-8 robert@gmail.com 
>>> wrote:
>>>

 Perhaps Roberto can publish his updates then.

>>>
>>> That would be ideal. I'd love to contribute as time allows via GitHub of 
>>> trac-hacks. With the code being on Sourceforge, I'm unsure if the code is 
>>> really open for contributions.
>>>  
>>>
 I'd be willing to test them certainly.  I agree with the order of 
 updates you suggest.  Python 3 is not even a particular interest of mine 
 at 
 the moment, though longer term it should be.  My installation is still 
 running on Python2.

 Robert Kuropkat

>>>

-- 
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/b631690b-50f7-42c7-96b5-75cfaff9df91n%40googlegroups.com.