Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006363TestLinkBug Tracking System - JIRA Integrationpublic2014-06-05 04:382015-04-02 04:48
Reporterankkitpal 
Assigned Tofman 
PriorityhighSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSWIN 7OS Version
Product Version1.9.10 (2014 Q1 - bug fixing) 
Fixed in Version1.9.13 (2015 #1) 
Summary0006363: Testlink 1.9.10 cannot connect to JIRA 5.2 using jiradbinterface
DescriptionI tried to integrate JIRA with Testlink1.9.10 using the jiradbinterface. After all the configuration settings(like php sqlsrv driver installation, SQL server 2012 native client installation) i was not able to integrate the JIRA & testlink.
when i click the spanner it shows indicator of connection problem and tooltip says "connection is KO. detailed messages on testlink event log". Further checked in the testlink logs : it shows the error:
Connect to Bug Tracker database fails: (interface: - Host:
->dbhost - DBName:
->dbname - User:
->dbuser) -33 - SQLState: IMSSP
Error Code: -33
Message: Invalid value type for option Database was specified. String type was expected.
SQLState: IMSSP
Error Code: -33
Message: Invalid value type for option Database was specified. String type was expected.

From the very start i was feeling like its a typecasting problem in the code so i searched over the net for any promising solution but no luck. After all i tried to debug the code myself and found the problem.

Root Cause: The configurations(host,user etc) are passed as the xml object while these are expected to be of type string.
when i var_dump the object of cfg in the adodb.inc.php all the configs were passed as xml object. So to resolve this i typecasted the values into string and passed them to the calling function connect in the issueTrackerInterface class. And guess what - "BINGO" that was it.
you can refer to my post over testlink forum here: http://forum.testlink.org/viewtopic.php?f=1&t=7595 [^]
Steps To Reproduce- Set the configurations in Issue tracker management section.
- click on the wrench icon to test the connection.
- it shows "connection is KO. detailed messages on testlink event log"
- check the userlog it says:
Connect to Bug Tracker database fails: (interface: - Host:
->dbhost - DBName:
->dbname - User:
->dbuser) -33 - SQLState: IMSSP
Error Code: -33
Message: Invalid value type for option Database was specified. String type was expected.
SQLState: IMSSP
Error Code: -33
Message: Invalid value type for option Database was specified. String type was expected.
Additional Informationi was able to set a workaround for it. so i can lead you to the exact point of the problem :
The workaround i have used is:
1. Open file issueTrackerInterface.class.php (<testlinkDir>\lib\issuetrackerintegration\)
2. Goto the line 178 (in function Connect):
$result = $this->dbConnection->connect(false, $this->cfg->dbhost,$this->cfg->dbuser,
$this->cfg->dbpassword, $this->cfg->dbname);
3. comment this line(in step 2).
4. paste these lines instead:
$mydbhost = (string)($this->cfg->dbhost);
$mydbuser = (string)($this->cfg->dbuser);
$mydbpassword = (string)($this->cfg->dbpassword);
$mydbname = (string)($this->cfg->dbname);

$result = $this->dbConnection->connect(false, $mydbhost,$mydbuser,$mydbpassword, $mydbname);
5. Save your file. And its done. ; )

Being a QA and very new to PHP this may not be the best solution to the problem but it worked for me. So, hoping you guys can fix this as per your standard code base in the next release.

You can refer the attached doc for screenshots.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MSSQL SERVER 2012
BrowserChrome
PHP Version5.5.12
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filesdocx file icon JiraIssue.docx [^] (106,260 bytes) 2014-06-05 04:38
log file icon Loguserlog1.log [^] (820 bytes) 2014-09-09 05:50

- Relationships

-  Notes
(0021041)
ankkitpal (reporter)
2014-06-06 05:23

Did the changes working fine on your end. Coz i tried with the new Issuetrackerintegration file and it dint work at my side. Please check.

Thanks,
Ankit Pal
(0021045)
fman (administrator)
2014-06-06 05:55

Please provide more info that ... dint work at my side ...
I will try to check why thi overwrite did not work
(0021048)
ankkitpal (reporter)
2014-06-06 06:09

Hi fman,
I mean it still produces the same error(mentioned in the description of original issue) in the userlog1 "Invalid value type for option Database was specified. String type was expected."
And i guess the typecasting to string dint work(i am not sure why, dont really have much idea about PHP).
You can check if you are able to connect to MSSQL.
Let me know if you need any more info about that.

a question for curiosity: is it not a good practice like i have handled it(mentioned in additional info section), i mean using different variables? (just for my knowledge i am asking this)
(0021050)
fman (administrator)
2014-06-06 09:43

>> a question for curiosity: is it not a good practice like i have handled
>> it(mentioned in additional info section), i mean using different variables? >> (just for my knowledge i am asking this)
No without a good reason and IMHO there is no in this situation.( you polute the function ecosystem)

I'm going to test next week on a MSSQL 2012 and provide feedback
(0021051)
ankkitpal (reporter)
2014-06-06 09:47
edited on: 2014-06-06 09:50

:-P Thanks for answering Fman. Please Test and share your experience.

(0021587)
ankkitpal (reporter)
2014-09-09 05:49
edited on: 2014-09-09 05:50

Hi Fman,

I just installed 1.9.11 build but still seeing the connectivity issue. and getting the same error as mentioned in the "Steps To Reproduce" section of this issue. attached is the logs

(0023021)
Mr.Bricodage (updater)
2015-04-01 21:07

fixed in version 1.9.11 ?
To be closed?

- Issue History
Date Modified Username Field Change
2014-06-05 04:38 ankkitpal New Issue
2014-06-05 04:38 ankkitpal File Added: JiraIssue.docx
2014-06-05 16:35 fman QA Team - Task Workflow Status => READY FOR TESTING
2014-06-05 16:35 fman Status new => resolved
2014-06-05 16:35 fman Fixed in Version => 1.9.11 (2014 Q2 - bug fixing)
2014-06-05 16:35 fman Resolution open => fixed
2014-06-05 16:35 fman Assigned To => fman
2014-06-06 05:23 ankkitpal Note Added: 0021041
2014-06-06 05:55 fman Note Added: 0021045
2014-06-06 06:09 ankkitpal Note Added: 0021048
2014-06-06 09:43 fman Note Added: 0021050
2014-06-06 09:47 ankkitpal Note Added: 0021051
2014-06-06 09:50 ankkitpal Note Edited: 0021051 View Revisions
2014-07-28 20:33 fman Status resolved => closed
2014-09-09 05:49 ankkitpal Note Added: 0021587
2014-09-09 05:49 ankkitpal Status closed => assigned
2014-09-09 05:49 ankkitpal Resolution fixed => reopened
2014-09-09 05:50 ankkitpal File Added: Loguserlog1.log
2014-09-09 05:50 ankkitpal Note Edited: 0021587 View Revisions
2015-04-01 21:07 Mr.Bricodage Note Added: 0023021
2015-04-02 04:48 fman Status assigned => closed
2015-04-02 04:48 fman Resolution reopened => fixed
2015-04-02 04:48 fman Fixed in Version 1.9.11 (2014 Q2 - bug fixing) => 1.9.13 (2015 #1)



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker