I am have connected an instance of JIRA (running on Oracle) to Testlink. The connection to the JIRA database seems to be fine, but Testlink is not parsing the data returned from JIRA properly. In the file:
/lib/int_jira.php
The section where it gets the bug status has the following php code:
Code: Select all
function getBugStatus($id)
{
$myFile = "jir.log";
$fh = fopen($myFile, 'w');
if (!$this->isConnected())
return false;
$status = false;
// 20070818 - francisco.mancardi@gruppotesi.com
// $query = "SELECT issuestatus FROM jiraissue WHERE pkey='$id'";
$query = "SELECT s.pname as issuestatus " .
"FROM issuestatus s, jiraissue i " .
"WHERE i.pkey='$id' AND i.issuestatus = s.ID";
fwrite($fh, $query);
$result = $this->dbConnection->exec_query($query);
fwrite($fh,$result);
if ($result)
{
$status = $this->dbConnection->fetch_array($result);
if ($status)
{
$status = $status['issuestatus'];
}
else
$status = null;
}
fwrite($fh, "\n");
fwrite($fh, "Status: ");
fwrite($fh,$status);
fclose($fh);
return $status;
}
Code: Select all
SELECT s.pname as issuestatus " .
"FROM issuestatus s, jiraissue i " .
"WHERE i.pkey='$id' AND i.issuestatus = s.ID
Code: Select all
$result = $this->dbConnection->exec_query($query);
Code: Select all
$status = $this->dbConnection->fetch_array($result);
Code: Select all
$status = $status['issuestatus'];
Any ideas?
/Jlar