Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008432TestLinkBug Tracking Systems Integrationpublic2018-10-26 06:272018-10-26 12:29
Reporterlakshmipathi 
Assigned Tofman 
PrioritynormalSeveritymajorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version1.9.17 (2018 Q1) 
Fixed in Version 
Summary0008432: TestLink Gitlab Create issue failure - generateIssueText() addIssue() missing default value
DescriptionFirst of all, thanks for the tool.

I'm using bitnami docker image. Integrated TestLink and Gitlab. Redirected here when I found one possible bug and reported on their Github [1]

Issue is: I can't create gitlab-issue from TestLink 'Create issue' icon from Test Execution.

apache error logs said

"Error log:
[Wed Oct 24 07:41:08.900551 2018] [php7:error] [pid 110] [client 1.215.168.1:4455]
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function generateIssueText(), 3 passed in /opt/bitnami/testlink/lib/execute/bugAdd.php on line 26 and exactly 4 expected in /opt/bitnami/testlink/lib/functions/exec.inc.php:694\nStack trace:\n#0 /opt/bitnami/testlink/lib/execute/bugAdd.php(26): generateIssueText(Object(database), Object(stdClass), Object(gitlabrestInterface))\n#1 {main}\n thrown in /opt/bitnami/testlink/lib/functions/exec.inc.php on line 694, referer: http://1.59.15.116/lib/execute/execSetResults.php?version_id=399&level=testcase&id=398&form_token=1345611977&setting_build=39 [^]

[Wed Oct 24 07:53:51.718964 2018] [php7:error] [pid 109] [client 1.215.168.1:4669] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function addIssue(), 3 passed in /opt/bitnami/testlink/lib/execute/bugAdd.php on line 36 and
exactly 4 expected in /opt/bitnami/testlink/lib/functions/exec.inc.php:583\nStack trace:\n#0 /opt/bitnami/testlink/lib/execute/bugAdd.php(36): addIssue(Object(database), Object(stdClass), Object(gitlabrestInterface))\n#1 {main}\n thrown in /opt/bitnami/testlink/lib/functions/exec.inc.php on line 583, referer: http://1.59.15.116/lib/execute/bugAdd.php?user_action=create&tcversion_id=399&tproject_id=395&tplan_id=396&exec_id=29&tcstep_id=0" [^]

After setting (addLinkToTL=false) default value to generateIssueText(), addIssue(). It seem to be working.

[1]: https://github.com/bitnami/bitnami-docker-testlink/issues/76 [^]
Steps To Reproduce1) After Integrating TestLink to Gitlab, Go to Test Execution page
2) Select a Testcase and click Create issue icon.
Now Pop-window appears as blank.
Additional InformationThough not 100% sure, possible fix may be:
After making below changes on generateIssueText - now I can create issue on gitlab via testlink:

    /opt/bitnami/testlink/lib/functions/exec.inc.php: 694 needs to be changed

from:

    function generateIssueText($dbHandler,$argsObj,$itsObj,$addLinkToTL) {

to

    function generateIssueText($dbHandler,$argsObj,$itsObj,$addLinkToTL=false) {`

Similarly addIssue() needs to be changed from

    function addIssue($dbHandler,$argsObj,$itsObj,$addLinkToTL)
    to
    function addIssue($dbHandler,$argsObj,$itsObj,$addLinkToTL=false)
TagsNo tags attached.
Database (MySQL,Postgres,etc)mysql
Browser
PHP Version
TestCaseID
QA Team - Task Workflow Status
Attached Files

- Relationships

-  Notes
(0028096)
fman (administrator)
2018-10-26 08:11

1) have you checked all available fixes for 1.9.17 ?
2) have you searched similar issues on our mantis? (remove status filter)
3) please get latest code from github, do fresh install and retest.
(0028097)
lakshmipathi (reporter)
2018-10-26 11:03

Looks like bitnami containers didn't update these two fixes.
1) missing default value for generateIssueText() and this got fixed with
following commit.
 
git show 8086879cbd
commit 8086879cbd46e25936f9c608c4250e06903ab99f
Author: fmancardi <francisco.mancardi@gmail.com>
Date: Tue Sep 25 17:27:36 2018 +0200

    0008385: Cannot create a new bug in Jira from testlink: 500 error

diff --git a/lib/functions/exec.inc.php b/lib/functions/exec.inc.php
index c70f1c6c6..3eccf2f89 100644
--- a/lib/functions/exec.inc.php
+++ b/lib/functions/exec.inc.php
@@ -691,7 +691,7 @@ function copyIssues(&$dbHandler,$source,$dest)
 /**
  *
  */
-function generateIssueText($dbHandler,$argsObj,$itsObj,$addLinkToTL) {
+function generateIssueText($dbHandler,$argsObj,$itsObj,$addLinkToTL=false) {
   $ret = new stdClass();
 
   $opOK = false;

2) The missing value for addIssue() is fixed with .

22cde2fbd59a4d184d
Author: Francisco Mancardi <francisco.mancardi@gmail.com>
Date: Sun Jun 3 09:37:26 2018 +0200

    0008260: "Add Link in Issue Tracker" checkbox doesn't work anymore
    minor refactoring


I'll check with Bitnami dev please close this issue.
(0028102)
fman (administrator)
2018-10-26 12:29

thanks for your collaboration

- Issue History
Date Modified Username Field Change
2018-10-26 06:27 lakshmipathi New Issue
2018-10-26 08:11 fman Note Added: 0028096
2018-10-26 08:11 fman Assigned To => fman
2018-10-26 08:11 fman Status new => feedback
2018-10-26 11:03 lakshmipathi Note Added: 0028097
2018-10-26 11:03 lakshmipathi Status feedback => assigned
2018-10-26 12:29 fman Note Added: 0028102



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker