Strange behavior Jira / Oracle

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
anderson.martins
TestLink user
Posts: 5
Joined: Mon Mar 30, 2009 3:01 pm

Strange behavior Jira / Oracle

Post by anderson.martins »

Hi all, I need some help in order to connect the Bugs with Jira(Oracle), I have already installed PHP which is working properly with Oracle drivers and I also setup the testlink usual configurations like:

File: jira.cfg.php
define('BUG_TRACK_DB_HOST', 'devnt004.internal.suntech.com.br');
define('BUG_TRACK_DB_NAME', 'ORAJIRA.internal.suntech.com.br');
define('BUG_TRACK_DB_USER', 'xxxxx');
define('BUG_TRACK_DB_PASS', 'xxxxx');
define('BUG_TRACK_HREF', "http://devnt003.internal.suntech.com.br ... board.jspa");
define('BUG_TRACK_DB_TYPE', 'oracle');
define('BUG_TRACK_ENTER_BUG_HREF',"http://devnt003.internal.suntech.com.br ... fault.jspa");

File: config.inc.php
$g_interface_bugs = 'JIRA';

Once I made this, I used to have a blank screen when i tried to acess testlink.

My next step was to change the const.inc.php
adding in : require_once(TL_ABS_PATH . 'lib/bugtracking /int_bugtracking.php');

And know I get into the Testlink but I can't see anything with regards to the Bug Integration with Jira, event when i fail the case.

Jira: 3.10.2
MySql: 5.1.3
PHP: 5.2.9 (with oci 1.2.5)
TestLink: 1.8.0

Any help?

Thanks.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

are you sure you are able to connect via PHP to oracle ?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

NOTE: DBNAME must be ORACLE SCHEMA not host name of DB SERVER
anderson.martins
TestLink user
Posts: 5
Joined: Mon Mar 30, 2009 3:01 pm

Post by anderson.martins »

I will try your recommendation...

With regards to the PHP conection with Oracle, I was able to get it working per the script below:

<?php
$login = "****";
$senha = "****";

/* Configuração do Oracle */
$bd = "(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = devnt004.internal.suntech.com.br)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORAJIRA.internal.suntech.com.br)
)
)";


if ($conexao = OCILogon($login,$senha,$bd) )
echo "Conexão efetuada com sucesso!<br>";
else
echo "Não foi possível conectar ao Oracle.<br>";

$sql = 'select current_date from dual'; //query
$sql =$sql = OCIParse($conexao, $sql);
OCIExecute($sql); //executa a query
// OCICommit($conectar); // comita

while ($row = oci_fetch_array ($sql, OCI_NUM)) {
echo $row[0];
}


OCILogoff($conexao);

?>

Thanks
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

your test is not good because you are not using ADODB as is done by TL
anderson.martins
TestLink user
Posts: 5
Joined: Mon Mar 30, 2009 3:01 pm

:-(

Post by anderson.martins »

I give up, this thing does not work!
maximebellerose
TestLink user
Posts: 1
Joined: Tue Apr 13, 2010 5:51 pm

Howto: Get Jira/Oracle integration when schema!=default

Post by maximebellerose »

Edit lib/bugtracking/int_bugtracking.php
Search for function connect()

In the if (!$result['status']) code, add the following if else

elseif (BUG_TRACK_DB_TYPE == 'oci8')
{
$r = $this->dbConnection->exec_query("ALTER SESSION SET CURRENT_SCHEMA=XXXX");
}

Where XXXX = name of the schema in oracle containing the Jira tables.
eeijlar
Advanced user
Posts: 28
Joined: Mon Apr 06, 2009 4:25 pm

Re: Strange behavior Jira / Oracle

Post by eeijlar »

Have a look at this post:
http://www.teamst.org/forum/viewtopic.php?f=1&t=2981

I have Testlink working with JIRA, it takes a bit of work, but it can be done.
Post Reply