Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002481TestLinkIntegration with Other Systemspublic2009-05-05 23:222015-03-12 11:05
Reporterfreeride65 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.8.2 
Fixed in Version1.9.5 (2012 Q4 - bug fixing) 
Summary0002481: Integration with Jira, after adding a bug-id i don't see details of bug
DescriptionThis feature work with testlink 1.7.4. within the same condition ( jira run on oracle )

After adding a jira bug-id i look at the TEST RESULT but i find just the bug-id ( prevoiusly created came from jira), in 1.7.4 version i saw also the status and the title. Jira run on oracle and i checked that the testlink-oracle connection is up ( by some print on function getBugStatus($id)) and if i try to run the query "SELECT s.pname as issuestatus..." on the same function using an oracle client ( toad e.g) i get the correct status of the jira bug.

By print $status after fetch it seems that is empty.

On the same server runs also TESTLINK 1.7.4 that is able to show what is missing on the 1.8.2
TagsNo tags attached.
Database (MySQL,Postgres,etc)
Browserinternet explorer 6.0
PHP Version5.2.9.1
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filesjpg file icon jira0002481.jpg [^] (169,294 bytes) 2009-05-06 15:48


doc file icon testlink0002481.doc [^] (33,280 bytes) 2009-05-12 16:13
doc file icon testlink0002481_status.doc [^] (20,480 bytes) 2009-05-12 16:21

- Relationships

-  Notes
(0006764)
freeride65 (reporter)
2009-05-06 15:08

In the config.inc.php i set $g_interface_bugs = 'JIRA';

In the jira.cfg.php i set:
define('BUG_TRACK_DB_HOST', 'test92a.CSI.IT');
define('BUG_TRACK_DB_NAME', '');
define('BUG_TRACK_DB_TYPE', 'oci8');
define('BUG_TRACK_DB_USER', 'user');
define('BUG_TRACK_DB_PASS', 'mypass');
define('BUG_TRACK_DB_CHARSET',"UTF-8");
define('BUG_TRACK_HREF', "http://jiraprod.csi.it:8083/browse/" [^]);
define('BUG_TRACK_ENTER_BUG_HREF',"http://jiraprod.csi.it:8083" [^]);

db_name like in the 1.7.4 jira.cfg.php is empty
(0006765)
freeride65 (reporter)
2009-05-06 15:22

THIS IS THE SMARTY DEBUG
--------------------{$g_bugInterface}---------------------
 jiraInterface Object (11)
dbHost => test92a.CSI.IT
dbName => empty
dbUser => user
dbPass => pass
dbType => oci8
showBugURL => http://jiraprod.csi.it:8083/browse/ [^]
enterBugURL => http://jiraprod.csi.it:8083 [^]
dbCharSet => UTF-8
tlCharSet => UTF-8
dbConnection => database Object (5)
  db => ADODB_oci8 Object (96)
    databaseType => oci8
    dataProvider => oci8
    replaceQuote => ''
    concat_operator => ||
    sysDate => TRUNC(SYSDATE)
    sysTimeStamp => SYSDATE
    metaDatabasesSQL => SELECT USERNAME FROM ALL_USERS WHERE ...
    _stmt =>
    _commit => 32
    _initdate => 1
    metaTablesSQL => select table_name,table_type from cat...
    metaColumnsSQL => select cname,coltype,width, SCALE, PR...
    _bindInputArray => 1
    hasGenID => 1
    _genIDSQL => SELECT (%s.nextval) FROM DUAL
    _genSeqSQL => CREATE SEQUENCE %s START WITH %s
    _dropSeqSQL => DROP SEQUENCE %s
    hasAffectedRows => 1
    random => abs(mod(DBMS_RANDOM.RANDOM,10000001)/...
    noNullStrings =>
    connectSID =>
    _bind =>
    _nestedSQL => 1
    _hasOCIFetchStatement => 1
    _getarray =>
    leftOuter => empty
    session_sharing_force_blob =>
    firstrows => 1
    selectOffsetAlg1 => 100
    NLS_DATE_FORMAT => YYYY-MM-DD
    dateformat => YYYY-MM-DD
    useDBDateFormatForTextInput =>
    datetime =>
    _refLOBs => Array (0)
    database => empty
    host => test92a.CSI.IT
    user => user
    password => pass
    debug =>
    maxblobsize => 262144
    substr => substr
    length => length
    upperCase => upper
    fmtDate => 'Y-m-d'
    fmtTimeStamp => 'Y-m-d, h:i:s A'
    true => 1
    false => 0
    nameQuote => "
    charSet =>
    uniqueOrderBy =>
    emptyDate =>  
    emptyTimeStamp =>  
    lastInsID =>
    hasInsertID =>
    hasTop =>
    hasLimit =>
    readOnly =>
    hasMoveFirst =>
    hasTransactions => 1
    genID => 0
    raiseErrorFn =>
    isoDates =>
    cacheSecs => 3600
    memCache =>
    memCacheHost => empty
    memCachePort => 11211
    memCacheCompress =>
    arrayClass => ADORecordSet_array
    numCacheHits => 0
    numCacheMisses => 0
    pageExecuteCountRows => 1
    uniqueSort =>
    rightOuter =>
    ansiOuter =>
    autoRollback =>
    poorAffectedRows =>
    fnExecute =>
    fnCacheExecute =>
    blobEncodeType =>
    rsPrefix => ADORecordSet_
    autoCommit => 1
    transOff => 0
    transCnt => 0
    fetchMode => 2
    null2null => null
    _oldRaiseFn =>
    _transOK => empty
    _connectionID => Resource id 0000031
    _errorMsg =>
    _errorCode =>
    _queryID =>
    _isPersistentConnection =>
    _evalAll =>
    _affected =>
    _logsql =>
    _transmode => empty
  queries_array => Array (0)
  is_connected => 1
  nQuery => 2
  overallDuration => 0.0066
bConnected => 1
----------------------{$g_bugInterfaceOn} 1 -----------------------------


THIS IS THE LOG
[<<][4a01482833ad1335404415][DEFAULT][/testlink182/lib/general/frmWorkArea.php][09/May/6 08:19:52][09/May/6 08:19:52][took 0.144562 secs]
[>>][4a014828575a4953493075][DEFAULT][/testlink182/lib/general/frmWorkArea.php][09/May/6 08:19:52]
[<<][4a014828575a4953493075][DEFAULT][/testlink182/lib/general/frmWorkArea.php][09/May/6 08:19:52][09/May/6 08:19:52][took 0.092758 secs]
[<<][4a0148289797f156131887][DEFAULT][/testlink182/lib/general/staticPage.php][09/May/6 08:19:52][09/May/6 08:19:52][took 0.222178 secs]
[>>][4a014828ce279874763237][DEFAULT][/testlink182/lib/general/staticPage.php][09/May/6 08:19:52]
[<<][4a014828ce279874763237][DEFAULT][/testlink182/lib/general/staticPage.php][09/May/6 08:19:52][09/May/6 08:19:52][took 0.082369 secs]
[<<][4a014828aa07a669779849][DEFAULT][/testlink182/lib/execute/execNavigator.php][09/May/6 08:19:52][09/May/6 08:19:53][took 0.31689 secs]
[>>][4a01482903953320233574][DEFAULT][/testlink182/lib/execute/execNavigator.php][09/May/6 08:19:53]
[<<][4a01482903953320233574][DEFAULT][/testlink182/lib/execute/execNavigator.php][09/May/6 08:19:53][09/May/6 08:19:53][took 0.968487 secs]
[<<][4a01482ccfe35754079609][DEFAULT][/testlink182/lib/execute/execSetResults.php][09/May/6 08:19:56][09/May/6 08:19:57][took 0.194624 secs]
[>>][4a01482d0b95c578884553][DEFAULT][/testlink182/lib/execute/execSetResults.php][09/May/6 08:19:57]
    [09/May/6 08:19:57][WARNING][h2d9iuq071o2pmcgkl7vutnnf6][GUI]
        String 'text_counter_feedback' is not localized for 'it_IT'
    [09/May/6 08:19:57][WARNING][h2d9iuq071o2pmcgkl7vutnnf6][GUI]
        E_NOTICE
Undefined offset: 0 - in D:\SSII\testlink182\third_party\adodb\adodb.inc.php - Line 3427
    [09/May/6 08:19:57][WARNING][h2d9iuq071o2pmcgkl7vutnnf6][GUI]
        E_NOTICE
Undefined offset: 0 - in D:\SSII\testlink182\third_party\adodb\adodb.inc.php - Line 3427
    [09/May/6 08:19:57][WARNING][h2d9iuq071o2pmcgkl7vutnnf6][GUI]
        E_NOTICE
Undefined index: tableClassName - in D:\SSII\testlink182\gui\templates_c\%%9C^9C2^9C2418FB%%inc_show_bug_table.tpl.php - Line 5
    [09/May/6 08:19:57][WARNING][h2d9iuq071o2pmcgkl7vutnnf6][GUI]
        E_NOTICE
Undefined index: tableStyles - in D:\SSII\testlink182\gui\templates_c\%%9C^9C2^9C2418FB%%inc_show_bug_table.tpl.php - Line 5
    [09/May/6 08:19:57][WARNING][h2d9iuq071o2pmcgkl7vutnnf6][GUI]
        E_WARNING
htmlspecialchars() expects parameter 1 to be string, resource given - in D:\SSII\testlink182\third_party\smarty\libs\plugins\modifier.debug_print_var.php - Line 48
[<<][4a01482d0b95c578884553][DEFAULT][/testlink182/lib/execute/execSetResults.php][09/May/6 08:19:57][09/May/6 08:19:57][took 0.198299 secs]
(0006766)
fman (administrator)
2009-05-06 15:32

TL is trying to do a query to JIRA DB or using another method to get info ?
(0006768)
freeride65 (reporter)
2009-05-06 15:59
edited on: 2009-05-06 16:05

TL is trying to do a query to JIRA DB. TL access to a view of the jira DB, but this was also before with the 1.7.4 version. This is how i modify the function getBugStatus($id) to debug it

function getBugStatus($id)
{
    if (!$this->isConnected())
    {
       print "DATABASE:not connected
";
           return false;
        }
       else
           print "DATABASE: connected ";
        
       $status = false;
        
    
    // $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";
    
    $result = $this->dbConnection->exec_query($query);
    if ($result)
    {
        $status = $this->dbConnection->fetch_array($result);
        if ($status)
        {
            $status = $status['issuestatus'];
        }
        else
            $status = null;
    }
        
    print "query:" . $query;
    print " status:" . $status;
    return $status;
        
    }

(0006772)
freeride65 (reporter)
2009-05-06 16:52
edited on: 2009-05-06 17:12

Ok, i try to print_r($results) and i verify that TL get the status value , but isn't able to fetch it. I think the problem is on the instruction fetch_array:
 $status = $this->dbConnection->fetch_array($result);


Infact, if before it we print_r($results) we can see that Array ( [ISSUESTATUS] => Resolved, so it is correct. Here the whole result of the print_r.

RESULTS:ADORecordSet_array Object ( [databaseType] => array [_array] => Array ( [0] => Array ( [ISSUESTATUS] => Resolved ) ) [_types] => [_colnames] => [_skiprow1] => [_fieldobjects] => Array ( [0] => ADOFieldObject Object ( [name] => ISSUESTATUS [max_length] => 60 [type] => VARCHAR2 ) ) [canSeek] => 1 [affectedrows] => [insertid] => [sql] => SELECT s.pname as issuestatus FROM issuestatus s, jiraissue i WHERE i.pkey='GESTPS-210' AND i.issuestatus = s.ID [compat] => [dataProvider] => oci8 [fields] => Array ( [ISSUESTATUS] => Resolved ) [blobSize] => 100 [EOF] => [emptyTimeStamp] => [emptyDate] => [debug] => [timeCreated] => 0 [bind] => [fetchMode] => 2 [connection] => ADODB_oci8 Object ( [databaseType] => oci8 [dataProvider] => oci8 [replaceQuote] => '' [concat_operator] => || [sysDate] => TRUNC(SYSDATE) [sysTimeStamp] => SYSDATE [metaDatabasesSQL] => SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1 [_stmt] => [_commit] => 32 [_initdate] => 1 [metaTablesSQL] => select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN$%' [metaColumnsSQL] => select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno [_bindInputArray] => 1 [hasGenID] => 1 [_genIDSQL] => SELECT (%s.nextval) FROM DUAL [_genSeqSQL] => CREATE SEQUENCE %s START WITH %s [_dropSeqSQL] => DROP SEQUENCE %s [hasAffectedRows] => 1 [random] => abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000) [noNullStrings] => [connectSID] => [_bind] => [_nestedSQL] => 1 [_hasOCIFetchStatement] => 1 [_getarray] => [leftOuter] => [session_sharing_force_blob] => [firstrows] => 1 [selectOffsetAlg1] => 100 [NLS_DATE_FORMAT] => YYYY-MM-DD [dateformat] => YYYY-MM-DD [useDBDateFormatForTextInput] => [datetime] => [_refLOBs] => Array ( ) [database] => [host] => test92a.CSI.IT [user] => user [password] => pass [debug] => [maxblobsize] => 262144 [substr] => substr [length] => length [upperCase] => upper [fmtDate] => 'Y-m-d' [fmtTimeStamp] => 'Y-m-d, h:i:s A' [true] => 1 [false] => 0 [nameQuote] => " [charSet] => [uniqueOrderBy] => [emptyDate] => [emptyTimeStamp] => [lastInsID] => [hasInsertID] => [hasTop] => [hasLimit] => [readOnly] => [hasMoveFirst] => [hasTransactions] => 1 [genID] => 0 [raiseErrorFn] => [isoDates] => [cacheSecs] => 3600 [memCache] => [memCacheHost] => [memCachePort] => 11211 [memCacheCompress] => [arrayClass] => ADORecordSet_array [numCacheHits] => 0 [numCacheMisses] => 0 [pageExecuteCountRows] => 1 [uniqueSort] => [rightOuter] => [ansiOuter] => [autoRollback] => [poorAffectedRows] => [fnExecute] => [fnCacheExecute] => [blobEncodeType] => [rsPrefix] => ADORecordSet_ [autoCommit] => 1 [transOff] => 0 [transCnt] => 0 [fetchMode] => 2 [null2null] => null [_oldRaiseFn] => [_transOK] => [_connectionID] => Resource id 0000031 [_errorMsg] => [_errorCode] => [_queryID] => Resource id 0000107 [_isPersistentConnection] => [_evalAll] => [_affected] => [_logsql] => [_transmode] => ) [_numOfRows] => 1 [_numOfFields] => 1 [_queryID] => Resource id 0000107 [_currentRow] => 0 [_closed] => [_inited] => 1 [_obj] => [_names] => [_currentPage] => -1 [_atFirstPage] => [_atLastPage] => [_lastPageNo] => -1 [_maxRecordCount] => 0 [datetime] => )

(0006773)
fman (administrator)
2009-05-06 20:05

1. may be for oracle DB name is not needed on config file
2. please do not paste large text, put it on text file and attacht it.
3. attention $status is an array, while $results not, try to print_r($status) with
 
as beautifer , an attache here
(0006843)
freeride65 (reporter)
2009-05-12 16:27

note about the doc files uploaded:

in the testlink0002481_status.doc the $status is printed but is empty.

in the testlink0002481.doc the $result is printed, maybe it is not so correct to print it by print_r but shows that the 'issuestatus' is filled vith the value "tested" that is what i get from oracle.

- Issue History
Date Modified Username Field Change
2009-05-05 23:22 freeride65 New Issue
2009-05-05 23:22 freeride65 Browser => internet explorer 6.0
2009-05-05 23:22 freeride65 PHP Version => 5.2.9.1
2009-05-06 15:08 freeride65 Note Added: 0006764
2009-05-06 15:22 freeride65 Note Added: 0006765
2009-05-06 15:32 fman Note Added: 0006766
2009-05-06 15:48 freeride65 File Added: jira0002481.jpg
2009-05-06 15:59 freeride65 Note Added: 0006768
2009-05-06 16:05 freeride65 Note Edited: 0006768
2009-05-06 16:52 freeride65 Note Added: 0006772
2009-05-06 17:12 freeride65 Note Edited: 0006772
2009-05-06 20:05 fman Note Added: 0006773
2009-05-12 16:13 freeride65 File Added: testlink0002481.doc
2009-05-12 16:21 freeride65 File Added: testlink0002481_status.doc
2009-05-12 16:27 freeride65 Note Added: 0006843
2012-11-25 18:09 fman Task Workflow Status => READY FOR TESTING
2012-11-25 18:09 fman Status new => closed
2012-11-25 18:09 fman Resolution open => fixed
2012-11-25 18:09 fman Fixed in Version => 1.9.5 (2012 Q4 - bug fixing)



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker