TestManagerForTracPlugin not working with TracTicketTemplatePlugin?

41 views
Skip to first unread message

Dave Huang

unread,
Jan 23, 2014, 1:58:49 PM1/23/14
to trac-...@googlegroups.com
http://trac-hacks.org/wiki/TestManagerForTracPlugin#LinkingaTickettoaTestCase says "This plugin also supports the TracTicketTemplatePlugin to fill a ticket template with this information", but it's not working for me... how should I configure things for that to work?

When I click the "Open a Ticket on this Test Case" button, I get a ticket with Summary that shows the full test case path with "[Insert problem summary]" appended to it, and the ticket Description is "Test Case: [wiki:TC_TT18_TT19_TC100?planid=], Test Plan: ()". It's not using the ticket template I have set up for ticket type "Bug", even though that's the default ticket type. Creating a new ticket by clicking on the "New Ticket" link in the Trac nav bar does use the ticket template, but of course, I don't get the test case information.

Trac: 1.0.1
testmanager: 1.8.1
tractickettemplate: 0.7

RjOllos

unread,
Jan 27, 2014, 8:01:53 PM1/27/14
to trac-...@googlegroups.com
On Thursday, January 23, 2014 10:58:49 AM UTC-8, Dave Huang wrote:
http://trac-hacks.org/wiki/TestManagerForTracPlugin#LinkingaTickettoaTestCase says "This plugin also supports the TracTicketTemplatePlugin to fill a ticket template with this information", but it's not working for me... how should I configure things for that to work?

When I click the "Open a Ticket on this Test Case" button, I get a ticket with Summary that shows the full test case path with "[Insert problem summary]" appended to it, and the ticket Description is "Test Case: [wiki:TC_TT18_TT19_TC100?planid=], Test Plan:  ()". It's not using the ticket template I have set up for ticket type "Bug", even though that's the default ticket type. Creating a new ticket by clicking on the "New Ticket" link in the Trac nav bar does use the ticket template, but of course, I don't get the test case information.

I test and found it was working okay after making the corrections now documented here:

Do you see any JavaScript errors in the browser console? Are json2.js and tt_newticket.js found in the page source?

Dave Huang

unread,
Jan 27, 2014, 10:12:42 PM1/27/14
to trac-...@googlegroups.com
On 2014-01-27 7:01 PM, RjOllos wrote:
I test and found it was working okay after making the corrections now documented here:

Do you see any JavaScript errors in the browser console? Are json2.js and tt_newticket.js found in the page source?

No JS errors in the console. Both json2.js and tt_newticket.js are in the page source; json2.js in the <head>, tt_newticket.js down at the very end of the page, right before </body>. When I load the page, it does make an AJAX request for https://mysite/trac/tt/query?... , and it gets a response back containing the various ticket templates.

RjOllos

unread,
Jan 28, 2014, 6:52:54 PM1/28/14
to trac-...@googlegroups.com
Do you have any other plugins installed that might be conflicting?

After the page loads, can you execute the following from the console and have the description populated?

jQuery("body").tt_newticket(); 

RjOllos

unread,
Jan 28, 2014, 6:59:41 PM1/28/14
to trac-...@googlegroups.com
You might want to try the following replacement in tt_newticket.js:

$(document).ready(function() {
    $("body").tt_newticket();
});

->

jQuery(document).ready(function($) {
    $("body").tt_newticket();
}); 

Dave Huang

unread,
Jan 28, 2014, 10:05:14 PM1/28/14
to trac-...@googlegroups.com
On 2014-01-28 5:52 PM, RjOllos wrote:
> Do you have any other plugins installed that might be conflicting?
I tried disabling almost all other plugins, but it didn't help.

I found the problem though... I was running a version of the plugin that
predates http://trac-hacks.org/changeset/13260 "support trac 1.0 with
type specified in URL"

But both the version prior to trac 1.0 support and the version with trac
1.0 support are called TracTicketTemplate-0.7, so I thought I already
had the latest version :( It looks like the version has stayed at 0.7
for about 4 years?

In any case, updating to the latest 0.7 from the svn repo fixed the problem.

RjOllos

unread,
Jan 28, 2014, 10:19:04 PM1/28/14
to trac-...@googlegroups.com
Thanks for sorting it out. Let's see if we can get the version bumped:

RjOllos

unread,
Feb 2, 2014, 3:29:59 AM2/2/14
to trac-...@googlegroups.com
Version number bumped to 0.8:
http://trac-hacks.org/changeset/13633 
Reply all
Reply to author
Forward
0 new messages