Mantis Bugtracker 

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001926TestLinkIntegration with Other Systemspublic2008-12-11 03:002009-01-20 05:19
Assigned Tomhavlat 
PlatformOSOS Version
Product Version1.8 RC 2 
Fixed in Version1.8 RC 3 
Summary0001926: Trac: Unclear configuration
Description(Note: I'm running 1.8RC2 after upgrading automatically from 1.7.4.)

I turned on TRAC BTS integration.

When I have marked a test case as Failed, the test case detail view shows a bug icon under the heading "BUG management".

Whenever I click on that icon, I get a new browser window with a text entry field, and 'Add bug' and 'Close' buttons.

Whenever I type a bug # into the field and click 'Add bug', the newer browser goes blank. And my PHP log conatins this error:

[10-Dec-2008 13:46:56] PHP Fatal error: Call to a member function query() on a non-object in C:\Inetpub\wwwroot\testlink\lib\bugtracking\int_trac.php on line 207
TagsNo tags attached.
Database (MySQL,Postgres,etc)
BrowserFirefox 3
PHP Version5.2
QA Team - Task Workflow Status
Attached Files

- Relationships
child of 0001938closedtoshi BTS trac and redmine interfaces migration to 1.8 

-  Notes
mbearden (reporter)
2008-12-11 03:01

Here is the contents of my trac.cfg.php file:
 * TestLink Open Source Project - [^]
 * $Id: trac.cfg.php,v 1.3 2008/07/04 02:42:30 tosikawa Exp $
 * Constants used throughout TestLink are defined within this file
 * they should be changed for your environment
 * [Trac Settings]
 * The XmlRpcPlugin plugin should be installed in your Trac.
 * @link [^] "Trac XmlRpcPlugin"
 * In addition, you should add the permission of 'TICKET_VIEW' and 'XML_RPC'
 * to the user 'anonymous' in Trac.

//Set the bug tracking system Interface to Trac 0.10.x
//also tested with Trac 0.10.4

// Note: Please save this file in the character set same as PHP.

/** Trac Project Root */
define('BUG_TRACK_DB_HOST', '' [^]);

/** Mapping TL test project name vs trac project url */
$g_interface_bugs_project_name_mapping = array(
    '<YourTLTestProjectName1>' => '<YourTracProject1>',
    '<YourTLTestProjectName2>' => '<YourTracProject2>',

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

/* The following parameters are not in use. */
define('BUG_TRACK_DB_TYPE', '[Not in Use]');
define('BUG_TRACK_DB_NAME', '[Not in Use]');
define('BUG_TRACK_DB_CHARSET', '[Not in Use]');
define('BUG_TRACK_DB_USER', '[Not in Use]');
define('BUG_TRACK_DB_PASS', '[Not in Use]');
schlundus (reporter)
2008-12-11 04:02

I think the error occurs in:
$tracProjectName = $g_interface_bugs_project_name_mapping[$tprojectName];
            $this->m_dbHost = BUG_TRACK_DB_HOST . $tracProjectName;
            $this->m_xmlrpcClient = new IXR_Client($this->m_dbHost . '/xmlrpc');

and $this->m_xmlrpcClient seems to be NULL

So i think your cfg is not ok, but i cannot help you further
mbearden (reporter)
2008-12-11 04:08

I (reporter of this ticket) found a configuration-related fix and got this working. I'll explain below.

You could close this ticket OR consider it as a request to change the comments in your trac.cfg.php file, which misled me into entering wrong configuration.

This comment appears in trac.cfg.php (default):
/** Trac Project Root */
define('BUG_TRACK_DB_HOST', 'http://<YourTracServer>/trac/' [^]);

The example value shows not JUST a server host name, but also the "/trac/" ending which is the home Trac PROJECT on that server. But I see the variable name is BUG_TRACK_DB_HOST, which suggest it is JUST the host? At first, I entered this value according to the sample value: hostname/projectname. This resulted in the error I documented when opening this ticket. After I changed this to just hostname (I chopped off my project name), this works.

Also, I had not filled in a value in trac.cfg.php for $g_interface_bugs_project_name_mapping, because I had not understood what this was for. (Since I had already typed the Trac project name into what would apparently be used as the base of the URL.) I moved the Trac project name into $g_interface_bugs_project_name_mapping, and tied it to my TestLink project name. This change was made at the same time as the value of BUG_TRACK_DB_HOST was changed.

Is there documentation on this? I failed to find it. I guess that this is either a "nothing" issue, or else it's just a request for clearer documentation inside the comments. I would have understood this alternative comment more readily and probably not made the mistake I did:

define('BUG_TRACK_DB_HOST', 'http://<YourTracServer>/' [^]);
schlundus (reporter)
2008-12-12 05:35

@martin: Could you update documentation?
mhavlat (reporter)
2008-12-12 06:11

toshi (reporter)
2008-12-17 12:15

I have not modified trac and redmine interfaces for TL 1.8 yet.
I will finish the work by RC3.
toshi (reporter)
2008-12-17 12:18

In addition, I added a short manual to Mantis (issue id 1295). [^]
mhavlat (reporter)
2009-01-04 05:04

I added explanation to installation manual.

- Issue History
Date Modified Username Field Change
2008-12-11 03:00 mbearden New Issue
2008-12-11 03:00 mbearden Browser => Firefox 3
2008-12-11 03:00 mbearden PHP Version => 5.2
2008-12-11 03:01 mbearden Note Added: 0004827
2008-12-11 04:02 schlundus Note Added: 0004829
2008-12-11 04:08 mbearden Note Added: 0004830
2008-12-12 04:05 schlundus Status new => assigned
2008-12-12 04:05 schlundus Assigned To => schlundus
2008-12-12 05:35 schlundus Assigned To schlundus => mhavlat
2008-12-12 05:35 schlundus Note Added: 0004843
2008-12-12 06:11 mhavlat Note Added: 0004844
2008-12-12 06:12 mhavlat Priority normal => low
2008-12-12 06:12 mhavlat Severity major => text
2008-12-12 06:12 mhavlat Summary Error when clicking on bug icon (open_add_bug_window) in test => Trac: Unclear configuration
2008-12-17 12:08 toshi Relationship added child of 0001938
2008-12-17 12:15 toshi Note Added: 0004859
2008-12-17 12:18 toshi Note Added: 0004860
2009-01-04 05:05 mhavlat Note Added: 0004906
2009-01-04 07:20 mhavlat Status assigned => resolved
2009-01-04 07:20 mhavlat Fixed in Version => next development 1.8 RC3
2009-01-04 07:20 mhavlat Resolution open => fixed
2009-01-20 05:19 mhavlat Status resolved => closed

Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker