[prev in list] [next in list] [prev in thread] [next in thread] 

List:       trac
Subject:    Re: [Trac] Run some code when a ticket is created
From:       gcc <tonytowers64 () gmail ! com>
Date:       2017-02-10 9:42:48
Message-ID: ba8315cb-7f10-4c8f-a0c1-0aef85058556 () googlegroups ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks a lot! with the ITicketChangeListener was very easy to do it!

On Tuesday, February 7, 2017 at 6:42:46 PM UTC+1, RjOllos wrote:
> 
> 
> 
> On Monday, February 6, 2017 at 2:40:15 AM UTC-8, RjOllos wrote:
> > 
> > 
> > 
> > On Mon, Feb 6, 2017 at 2:34 AM gcc <tonyto...@gmail.com <javascript:>> 
> > wrote:
> > 
> > > Hi everyone:
> > > 
> > > I would like to know what would be the easiest/best way to implement the 
> > > execution of some code whenever a new ticket is created.
> > > One way that ocurred to me was to modify the insert method of the 
> > > ticket class so whenever it is created, the desired code is executed, but I 
> > > find this to be an ugly solution as it modifies the main program's code.
> > > 
> > > Thank you!
> > > 
> > 
> > Trac has a plugin architecture that supports implementations like you 
> > describe. You'll want to implement one of the following extension points:
> > 
> > 
> > https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketChangeListener \
> >  <https://www.google.com/url?q=https%3A%2F%2Ftrac.edgewall.org%2Fwiki%2FTracDev%2F \
> > PluginDevelopment%2FExtensionPoints%2Ftrac.ticket.api.ITicketChangeListener&sa=D&sntz=1&usg=AFQjCNFIpS0KCeFquR3dbVWerlFeSejhkw>
> >  
> > https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketManipulator
> >  
> > - Ryan
> > 
> 
> And based on your description it sounds like you probably want to 
> implement ITicketChangeListener in your plugin. The aforementioned document 
> has links to plugins that can serve as example implementations (thanks to 
> Peter for the great work on the API docs!).
> 
> - 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+unsubscribe@googlegroups.com. To post to this group, send \
email to trac-users@googlegroups.com. Visit this group at \
https://groups.google.com/group/trac-users. For more options, visit \
https://groups.google.com/d/optout.


[Attachment #5 (text/html)]

<div dir="ltr">Thanks a lot! with the ITicketChangeListener was very easy to do \
it!<br><br>On Tuesday, February 7, 2017 at 6:42:46 PM UTC+1, RjOllos \
wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: \
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><br><br>On \
Monday, February 6, 2017 at 2:40:15 AM UTC-8, RjOllos wrote:<blockquote \
class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div \
dir="ltr">On Mon, Feb 6, 2017 at 2:34 AM gcc &lt;<a href="javascript:" rel="nofollow" \
target="_blank" gdf-obfuscated-mailto="Uxd3fvT8DwAJ" \
onmousedown="this.href=&#39;javascript:&#39;;return true;" \
onclick="this.href=&#39;javascript:&#39;;return true;">tonyto...@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi \
everyone:<br><br>I would like to know what would be the easiest/best way to implement \
the execution of some code whenever a new ticket is created.<br>One way that ocurred \
to me was to modify the<span> insert method of the ticket class so whenever it is \
created, the desired code is executed, but I find this to be an ugly solution as it \
modifies the main program&#39;s code.<br><br>Thank \
you!</span></div></blockquote><div><br></div><div>Trac has a plugin architecture that \
supports implementations like you describe. You&#39;ll want to implement one of the \
following extension points:</div><div><br></div><div><a \
href="https://www.google.com/url?q=https%3A%2F%2Ftrac.edgewall.org%2Fwiki%2FTracDev%2F \
PluginDevelopment%2FExtensionPoints%2Ftrac.ticket.api.ITicketChangeListener&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNFIpS0KCeFquR3dbVWerlFeSejhkw" \
rel="nofollow" target="_blank" \
onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftrac.edgewal \
l.org%2Fwiki%2FTracDev%2FPluginDevelopment%2FExtensionPoints%2Ftrac.ticket.api.ITicket \
ChangeListener\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFIpS0KCeFquR3dbVWerlFeSejhkw&#39;;return \
true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftrac.edge \
wall.org%2Fwiki%2FTracDev%2FPluginDevelopment%2FExtensionPoints%2Ftrac.ticket.api.ITic \
ketChangeListener\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFIpS0KCeFquR3dbVWerlFeSejhkw&#39;;return \
true;">https://trac.edgewall.org/<wbr>wiki/TracDev/<wbr>PluginDevelopment/<wbr>ExtensionPoints/trac.ticket.<wbr>api.ITicketChangeListener</a><br></div><div><a \
href="https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.ticket.api.ITicketManipulator" \
rel="nofollow" target="_blank" \
onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftrac.edgewal \
l.org%2Fwiki%2FTracDev%2FPluginDevelopment%2FExtensionPoints%2Ftrac.ticket.api.ITicket \
Manipulator\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEB5u8o7-7yWqCxDYiibzOnhGZ9tw&#39;;return \
true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftrac.edge \
wall.org%2Fwiki%2FTracDev%2FPluginDevelopment%2FExtensionPoints%2Ftrac.ticket.api.ITic \
ketManipulator\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEB5u8o7-7yWqCxDYiibzOnhGZ9tw&#39;;return \
true;">https://trac.edgewall.org/<wbr>wiki/TracDev/<wbr>PluginDevelopment/<wbr>Extensi \
onPoints/trac.ticket.<wbr>api.ITicketManipulator</a><br></div><div><br></div><div>- \
Ryan</div></div></div></blockquote><div><br></div><div>And based on your description \
it sounds like you probably want to implement ITicketChangeListener in your plugin. \
The aforementioned document has links to plugins that can serve as example \
implementations (thanks to Peter for the great work on the API \
docs!).</div><div><br></div><div>- Ryan  </div></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &quot;Trac \
Users&quot; group.<br /> To unsubscribe from this group and stop receiving emails \
from it, send an email to <a \
href="mailto:trac-users+unsubscribe@googlegroups.com">trac-users+unsubscribe@googlegroups.com</a>.<br \
/> To post to this group, send email to <a \
href="mailto:trac-users@googlegroups.com">trac-users@googlegroups.com</a>.<br /> \
Visit this group at <a \
href="https://groups.google.com/group/trac-users">https://groups.google.com/group/trac-users</a>.<br \
/> For more options, visit <a \
href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br \
/>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic