MantisBT - TestLink
View Issue Details
0008260TestLinkBug Tracking System - JIRA Integrationpublic2018-05-10 19:252018-10-06 12:17
tjosephine 
fman 
normalminoralways
closedfixed 
PCWindows7
1.9.17 (2018 Q1) 
1.9.18 (2018 Q3) 
MySQL
Chrome v.58
5.6.14
READY FOR TESTING
0008260: "Add Link in Issue Tracker" checkbox doesn't work anymore
When creating a new Jira issue (option "Create Issue") from a failed test case in TestLink 1.9.17, there is the possibility to add a link to the test case execution feature by selecting "Add Link in Issue to Test Case Execution Feature".
After checking the new bug created in Jira, just the Notes were added in the Description field, the link/URL to testLink is missing.

Environment:
latest TestLink release 1.9.17 from github
JIRA REST interface to connect to a Jira project
-Add Issue Tracker (JIRA REST)
-Associate the project with the Jira issue tracker
-Select a failed test case
-Create Issue and make sure to select "Add Link in Issue Tracker to Test case Execution Feature"
-Save
-Open Jira and search for the new bug
-Verify in Description field of the bug that the link to TestLink is not added
Same issue when selecting an existing Jira issue.
If we select "Add Link in Issue...", the link in not created in Jira.
No tags attached.
child of 0008241closed fman Availables hot-fixes for 1.9.17 & How To get full fixed package from GitHub 
png Add_Link_in_Issue.png (16,754) 2018-05-10 19:25
http://mantis.testlink.org/file_download.php?file_id=4921&type=bug
png
Issue History
2018-05-10 19:25tjosephineNew Issue
2018-05-10 19:25tjosephineFile Added: Add_Link_in_Issue.png
2018-05-12 08:18fmanAssigned To => fman
2018-05-12 08:18fmanStatusnew => feedback
2018-05-12 08:20fmanNote Added: 0027456
2018-05-12 08:40fmanQA Team - Task Workflow Status => TBD
2018-05-12 08:40fmanSummary"Add Link in Issue Tracker" checkbox doesn't work anymore with TestLink 1.9.17 => "Add Link in Issue Tracker" checkbox doesn't work anymore
2018-05-12 08:42fmanNote Added: 0027457
2018-05-12 08:42fmanQA Team - Task Workflow StatusTBD => READY FOR TESTING
2018-05-12 08:42fmanStatusfeedback => resolved
2018-05-12 08:42fmanFixed in Version => 1.9.18 (2018 Q3)
2018-05-12 08:42fmanResolutionopen => fixed
2018-05-12 08:42fmanProduct Version => 1.9.17 (2018 Q1)
2018-05-12 08:42fmanRelationship addedchild of 0008241
2018-05-14 19:18tjosephineNote Added: 0027459
2018-05-15 19:34tjosephineNote Added: 0027469
2018-05-15 20:00fmanNote Added: 0027470
2018-05-15 20:40fmanNote Added: 0027472
2018-05-15 20:42fmanNote Added: 0027473
2018-05-15 20:49tjosephineNote Added: 0027474
2018-05-16 05:42fmanNote Added: 0027480
2018-06-03 07:39fmanNote Added: 0027513
2018-10-06 12:17fmanNote Added: 0027949
2018-10-06 12:17fmanStatusresolved => closed

Notes
(0027456)
fman   
2018-05-12 08:20   
issue verified when you add an issue on existent execution.
Will check and provide feedback
(0027457)
fman   
2018-05-12 08:42   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/0684c9dae4c092421692c65693fb8d64281a8fd0 [^]
(0027459)
tjosephine   
2018-05-14 19:18   
still not working when creating a new bug in JIRA.
If we select "Add Link in Issue Tracker...", the new bug in JIRA doesn't contain the link to the test case in TestLink.

Your change has just fixed the issue when we link an existing bug from JIRA.
(0027469)
tjosephine   
2018-05-15 19:34   
I was able to fix it by updating bugAdd.php at line 31 (added code between << >>)

    case 'doCreate':
     $args->direct_link = getDirectLinkToExec($db,$args->exec_id);
     <<
     if($args->addLinkToTL) {
       $dummy = generateIssueText($db,$args,$its,$args->addLinkToTL);
       $gui->bug_notes = $dummy->description;
       $args->bug_notes = $gui->bug_notes;
     }
     else {
    $dummy = generateIssueText($db,$args,$its);
     } >>
     $gui->bug_summary = $args->bug_summary;
  
     $ret = addIssue($db,$args,$its);
     $gui->issueTrackerCfg->tlCanCreateIssue = $ret['status_ok'];
     $gui->msg = $ret['msg'];
    break;
(0027470)
fman   
2018-05-15 20:00   
thanks
(0027472)
fman   
2018-05-15 20:40   
The right solution is

case 'doCreate':
     $args->direct_link = getDirectLinkToExec($db,$args->exec_id);
     $dummy = generateIssueText($db,$args,$its);
     $gui->bug_summary = $dummy->bug_summary;
     $ret = addIssue($db,$args,$its,$args->addLinkToTL);
break;
(0027473)
fman   
2018-05-15 20:42   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/595ffb1fa5319e7af322a4f4da098fa78476e3d8 [^]
(0027474)
tjosephine   
2018-05-15 20:49   
Tested successfully. Thanks a lot!
(0027480)
fman   
2018-05-16 05:42   
Great!!
(0027513)
fman   
2018-06-03 07:39   
minor refactoring
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/fc3cae30638b6cf0b7281f22cde2fbd59a4d184d [^]
(0027949)
fman   
2018-10-06 12:17   
1.9.18 released