Trac 1.0.1-1 Ticket default description

67 views
Skip to first unread message

ONeal Freeman

unread,
Mar 7, 2014, 11:35:08 AM3/7/14
to trac-...@googlegroups.com
I realize the template plugin should do this but I am having issues with it right now and I have a deadline to meet so I am also pursuing other avenues.

Has anyone gotten this to work to add multiple lines to the default description?

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" py:strip=""> <!-- Custom match templates go here --> <span py:if="req.environ['PATH_INFO']=='/newticket' and not req.args.has_key('preview')"> <textarea py:match="textarea[@id='field-description' and @class='wikitext']" py:attrs="select('@*')"> Your custom description goes here. </textarea> </span> </html>

RjOllos

unread,
Mar 7, 2014, 2:29:23 PM3/7/14
to trac-...@googlegroups.com
You can add multiple lines to the ticket description through trac.ini. Just prefix line 2:end with a leading space. For example,

[ticket]
default_description = line1 
 line2
 line3
 line4
 

ONeal Freeman

unread,
Mar 7, 2014, 2:56:13 PM3/7/14
to trac-...@googlegroups.com
I guess you and I are the only ones on this forum!

Adding the line in the ini won't give me blank lines between entries and that's why I was pursuing the tickettemplateplugin and the code snippet I posted.

As long as I can get one of them to work I can go live with trac.

I also thought I saw your name on the graphviz plugin. Is that you too?

RjOllos

unread,
Mar 7, 2014, 3:13:37 PM3/7/14
to trac-...@googlegroups.com
On Friday, March 7, 2014 11:56:13 AM UTC-8, ONeal Freeman wrote:
I guess you and I are the only ones on this forum!

Adding the line in the ini won't give me blank lines between entries and that's why I was pursuing the tickettemplateplugin and the code snippet I posted.

I see. I'm going to look into how we can handle that case (though that won't help you for now).
 
We could try to get that Genshi snippet working, but I think we are better off trying to get to the bottom of the problems with TracTicketTemplatePlugin. Do you use IRC? If you jumped on the IRC channel we could try to work through it in real time.

As long as I can get one of them to work I can go live with trac.

I also thought I saw your name on the graphviz plugin. Is that you too?

Yeah, I've committed a few fixes for that plugin.
 

RjOllos

unread,
Mar 10, 2014, 10:03:21 AM3/10/14
to trac-...@googlegroups.com
I hope we can continue debugging the issue with your Trac instance and TracTicketTemplatePlugin, but in the meantime, putting the following in template/site.html should allow you to set a ticket template:

      xmlns:py="http://genshi.edgewall.org/"
      py:strip="">
  <py:if test="req.environ['PATH_INFO']=='/newticket' and not req.args.has_key('preview')">
    <textarea py:match="textarea[@id='field-description']" py:attrs="select('@*')">
Your custom description goes here.

This is the second line, preceeded by a line of whitespace.
    </textarea>
  </py:if>
</html>
 

ONeal Freeman

unread,
Mar 10, 2014, 12:34:19 PM3/10/14
to trac-...@googlegroups.com
Yes I do think we should continue to debut the template plugin.

I could not get the above code in the site.html to work. I do not know if I am missing the appropriate tag like <body> or  what but I messed with it a month before stumbling on the templateplugin.

ONeal Freeman

unread,
Mar 10, 2014, 12:43:14 PM3/10/14
to trac-...@googlegroups.com


On Monday, March 10, 2014 9:03:21 AM UTC-5, RjOllos wrote:
Well I spoke too soon.  I pasted your code snippet in and it works fine. 

RjOllos

unread,
Mar 10, 2014, 1:09:13 PM3/10/14
to trac-...@googlegroups.com
The change from what you originally posted is that I removed the `and @class='wikitext'` in the XPath selector. The textarea has multiple classes, so it wasn't matching.

Hopefully that will hold you over for now. I'll review the other thread and try to come up with something else to try for determining the problems with TracTicketTemplatePlugin. I'm running low on ideas though.

ONeal Freeman

unread,
Mar 10, 2014, 3:22:09 PM3/10/14
to trac-...@googlegroups.com
I sincerely appreciate the time you have spent on this with me. Like I said in my first post, I feel like I've read (but not understood) everything on the internet about trac. I've been struggling no less than 6-weeks with getting trac on windows. It hought BitNami would simplify the install... 

Steffen Hoffmann

unread,
Mar 10, 2014, 4:45:49 PM3/10/14
to trac-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.03.2014 20:22, ONeal Freeman wrote:
> I sincerely appreciate the time you have spent on this with me. Like I
> said in my first post, I feel like I've read (but not understood)
> everything on the internet about trac. I've been struggling no less than
> 6-weeks with getting trac on windows. It hought BitNami would simplify
> the install...

This is no "normal" issue. I assure you, that I as almost Win noob got
Trac to fly by using a BitNami Trac stack in WinXP within less than one
hour, then started tweaking for a few more, not more than one day in
total. Sorry, we'll still try, just need some more logging or another
fresh idea.

Steffen Hoffmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iEYEARECAAYFAlMeJHkACgkQ31DJeiZFuHdjWwCfQtsX6WnEaDKJqpT0ILPd5k9Y
d+MAoI+Ep83dT6HluLDC9oH2bksAhavg
=9SiF
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages