Cant get trac plugin to work

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
malexs
Advanced user
Posts: 17
Joined: Wed Apr 02, 2008 2:15 pm

Cant get trac plugin to work

Post by malexs »

Hi, I am trying to get testlink to use trac as the bug management system.

I have changed the following setting in config.inc.php

Code: Select all

$g_interface_bugs='TRAC';
And in cfg\trac.cfg.php i set

Code: Select all

define('BUG_TRACK_DB_HOST', 'http://server/tracs/psql-test/');
I dont really understand the $g_interface_bugs_project_name_mapping setting though or how it affects the integration?


When i am in the execute screen in testlink and click the ad bug icon, it shows me the pop up window to add the bug id. I do so and click add bug, but i get the error "Bug ID does not exist on BTS!".

Also, on a side note, I have noticed that on the add bug window that appears, if you click the "Access to Bug Tracking System (Trac)" link before you click add it will take you to testlink, but if you click it after it will take you to trac. It seems to me that it should always take you to the bug tracking system.

Furthermore, the link it takes me to in trac cannot be found.

It sends me to: http://server/tracs/psql-test/Task/ticket
Yet the actual link needed to add a new bug is:
http://server/tracs/psql-test/newticket

I am running trac version 0.10.4.

can anyone help?
malexs
Advanced user
Posts: 17
Joined: Wed Apr 02, 2008 2:15 pm

Post by malexs »

ok i made some modifications and got it working...
We essentially have all our 'projects' in trac under one 'trac project'.

Code: Select all

/** Trac Project Root */
define('BUG_TRACK_DB_HOST', 'http://server/tracs/psql-test');

/** Mapping TL test project name vs trac project url */
$g_interface_bugs_project_name_mapping = array(
    'software x' => '',
    'test Project' => '',
);

/*--- Don't change the following parameters. ---*/
/** Link to the bugtracking system, for entering new bugs. */
define('BUG_TRACK_ENTER_BUG_HREF', '/newticket');


note that i actually had to change something that was after the "Dont change the following"...

previously the last line was

Code: Select all

define('BUG_TRACK_ENTER_BUG_HREF', '/ticket');
and i had to change this to read newticket.


there is still the issue with the "Access to Bug Tracking System (Trac)" linking to testlink instead of trac, but ill have a look in tracker and raise that there.
malexs
Advanced user
Posts: 17
Joined: Wed Apr 02, 2008 2:15 pm

Post by malexs »

well almost...
adding tickets works,, but the link to the trac ticket under the execute tab in testlink now links to
http://server/tracs/psql-test/newticket/9522 instead of
http://server/tracs/psql-test/ticket/9522

:(
nihongo
TestLink user
Posts: 12
Joined: Thu Mar 27, 2008 12:15 pm

Post by nihongo »

if you write your localhost asdress/tracs/newticket your location will be to create a new ticket.
Instead you maybe can create tickets before you link to them.
try to create a bug in TRAC and then use /ticket/1.

I have another problem... when I click the "add bug"-button the pop-up window turns white.. do you have a clue about that one?

I wrote about it here to:
http://www.teamst.org/phpBB2/viewtopic.php?t=810
malexs
Advanced user
Posts: 17
Joined: Wed Apr 02, 2008 2:15 pm

Post by malexs »

hi nihongo,
so when the add new bug window pops up .. does the "Access to Bug Tracking System (Trac)" link actually take you to create a new ticket page in trac?

if so, can you please post your testlink/cfg/trac.cfg.php file so i can have a look.

thanks
nihongo
TestLink user
Posts: 12
Joined: Thu Mar 27, 2008 12:15 pm

Post by nihongo »

hi
no, when the add new bug window pops up the " Access to Bug Tracking System (Trac)" link me to localhost/testlink.. just like for you.

I post my configuration-files anyway:


$g_interface_bugs='TRAC';
define ('TL_INTERFACE_BUGS', 'TRAC');
define('BUG_TRACK_DB_HOST', 'http://localhost:8000/trac/');
define('BUG_TRACK_ENTER_BUG_HREF', '/ticket');

$g_interface_bugs_project_name_mapping = array ('addressbook' => 'trac',);
roto8car
TestLink user
Posts: 5
Joined: Wed Oct 22, 2008 9:06 pm

Post by roto8car »

Apparently this was solve by bug 1468 http://testlink.org/mantis/view.php?id=1468

But there is no solution listed in the bug fix and I'm not sure how to get the 1.7.5 hotfix w/o messing up something else.

I could use some help getting this solved quickly.

The Access to Bug Tracking System link on the add bug window does not point to add a new bug.

Steps:
-when you have a bug tracking system configured (i used trac).
-open up executions
-click add bug icon next to a failed test case.
-the add bug window appears.
-the link for "Access to Bug Tracking System link" should link to the bug tracking system add new bug page. However it links to testlink. Actually, in the source for the page it is empty.
<a style="font-weight:normal" target="_blank" href="">
Access to Bug Tracking System (Trac)</a>
-after you add a bug or try to add a bug with a bug id that does not exist in the system, the correct link is displayed.


I suspect this may have something to do with $bts_url not being initialised properly when the add new bug window is displayed.

(0003756)
toshi (developer)
2008-07-02 07:26

I have fixed this issue for testlink 1.7.5.
Thank you for your reports. [/url]
malexs
Advanced user
Posts: 17
Joined: Wed Apr 02, 2008 2:15 pm

Post by malexs »

Hi roto8car,

It would appear that when they do commits to the code for a bug they include the bug id in the checkin comment eg. "BUGID 1785" ..

unfortunately viewvc from sourceforge doesnt seem to allow you to search for these messages .. see http://testlink.cvs.sourceforge.net/vie ... /testlink/ .. so if you need this asap, i would try to contact toshi (who fixed the bug) directly...
Post Reply