MantisBT - TestLink
View Issue Details
0007929TestLinkBug Tracking System - JIRA Integrationpublic2017-04-26 09:372018-04-14 09:04
apronwq 
fman 
highmajoralways
closedfixed 
1.9.16 (2016 Q4) 
1.9.17 (2018 Q1) 
mysql
READY FOR TESTING
0007929: Create issue from testlink use wrong username: integration user instead current user
We upgrade testlink from 1.9.4 to 1.9.16.
And find this issue:
When create a bug from testlink, reporter/note added user is not the current user.
I checked the changelog and find an issue discussed before:

0007757

We got the same problem now.
Create issue or add note from the test exec page ---- snap1.png

Actual Result:
snap2.png

Expect Result:
Use current user to report bug/add note.
No tags attached.
related to 0007757closed fman Jira issues updated with Jira integration user instead of the actual testlink user 
related to 0006513closed fman Create Issue via REST API - reporter will be set to TestLink Logged user 
has duplicate 0007950closed fman The Jira issues updated with Jira integration User name instead of the actual testlink user name 
png snap1.png (17,040) 2017-04-26 09:37
http://mantis.testlink.org/file_download.php?file_id=4706&type=bug
png

png snap2.png (57,388) 2017-04-26 09:37
http://mantis.testlink.org/file_download.php?file_id=4707&type=bug
png

png snap3.png (20,739) 2017-04-27 01:40
http://mantis.testlink.org/file_download.php?file_id=4710&type=bug
png

png snap4.png (23,946) 2017-04-27 02:46
http://mantis.testlink.org/file_download.php?file_id=4711&type=bug
png
Issue History
2017-04-26 09:37apronwqNew Issue
2017-04-26 09:37apronwqFile Added: snap1.png
2017-04-26 09:37apronwqFile Added: snap2.png
2017-04-26 12:14fmanNote Added: 0026310
2017-04-26 18:53fmanAssigned To => fman
2017-04-26 18:53fmanStatusnew => feedback
2017-04-27 01:40apronwqNote Added: 0026319
2017-04-27 01:40apronwqStatusfeedback => assigned
2017-04-27 01:40apronwqFile Added: snap3.png
2017-04-27 01:42apronwqNote Added: 0026320
2017-04-27 02:46apronwqNote Added: 0026321
2017-04-27 02:46apronwqFile Added: snap4.png
2017-04-27 04:50fmanNote Added: 0026322
2017-04-27 04:51fmanNote Edited: 0026322bug_revision_view_page.php?bugnote_id=26322#r5257
2017-04-27 04:53fmanNote Edited: 0026322bug_revision_view_page.php?bugnote_id=26322#r5258
2017-04-27 05:00fmanNote Edited: 0026322bug_revision_view_page.php?bugnote_id=26322#r5259
2017-04-27 05:01fmanStatusassigned => feedback
2017-05-01 07:36apronwqNote Added: 0026330
2017-05-01 07:36apronwqStatusfeedback => assigned
2017-05-01 09:22fmanRelationship addedrelated to 0007757
2017-05-01 09:26fmanNote Added: 0026331
2017-05-01 09:26fmanStatusassigned => feedback
2017-05-01 09:32fmanRelationship addedrelated to 0006513
2017-05-01 09:39fmanNote Added: 0026332
2017-05-10 14:09apronwqNote Added: 0026343
2017-05-10 14:09apronwqStatusfeedback => assigned
2017-05-10 14:26fmanNote Added: 0026344
2017-05-16 13:48apronwqNote Added: 0026367
2017-05-16 13:50apronwqNote Added: 0026368
2017-05-16 13:55apronwqNote Edited: 0026367bug_revision_view_page.php?bugnote_id=26367#r5275
2017-05-16 13:56apronwqNote Edited: 0026367bug_revision_view_page.php?bugnote_id=26367#r5276
2017-05-16 14:20fmanNote Added: 0026369
2017-05-16 18:31fmanNote Added: 0026372
2017-05-16 18:34fmanQA Team - Task Workflow Status => READY FOR TESTING
2017-05-16 18:34fmanStatusassigned => resolved
2017-05-16 18:34fmanFixed in Version => 1.9.17 (2018 Q1)
2017-05-16 18:34fmanResolutionopen => fixed
2017-05-16 18:39fmanNote Added: 0026373
2017-05-29 18:45fmanRelationship addedhas duplicate 0007950
2018-04-14 09:04fmanNote Added: 0027329
2018-04-14 09:04fmanStatusresolved => closed

Notes
(0026310)
fman   
2017-04-26 12:14   
details about user config on JIRA and testlink are needed.
Have you tried with our test installation of JIRA on Cloud?
(0026319)
apronwq   
2017-04-27 01:40   
Add snap3.png to provide testlink config.
For jira config, I am not sure which info should provide. Would you describe more clear?
Jira version: Atlassian JIRA Project Management Software (v7.1.9#71013-sha1:1aa0586)
(0026320)
apronwq   
2017-04-27 01:42   
I will tried the cloud JIRA and get back soon.
(0026321)
apronwq   
2017-04-27 02:46   
I tried to use my own atlassian ID to log in to testlink.atlassian.net.
Receive hint showed in snap4.png.
(0026322)
fman   
2017-04-27 04:50   
(edited on: 2017-04-27 05:00)
you can not use your atlassian login because is not configured.
I'm going to add it

>> For jira config, I am not sure which info should provide. Would you describe more clear?
excuse me, if you do not understand how to configure, how you are testing this ?

Please provide minimum detail of how users have been configured on testlink and on jira

(0026330)
apronwq   
2017-05-01 07:36   
We use a third sso system to do all the system(testlink, mantis, jira, svn, etc.) authoration. So I may not try your cloud jira.

I am not the administrator of Jira. So I don't know the exact config.
And I don't think there's anything special.
It just work fine before we upgrade from 1.9.4 to 1.9.16.
(0026331)
fman   
2017-05-01 09:26   
I'm sorry but this
>>So I may not try your cloud jira.
This is not really true, because if you set a testlink sandbox you can do the test I've indicated


Regarding this
>> I am not the administrator of Jira. So I don't know the exact config.
>> And I don't think there's anything special.
IMHO you need to really check how things are configured.

>> It just work fine before we upgrade from 1.9.4 to 1.9.16.
As explained I can only do tests on my cloud installation, if they are ok, and you are not able to provide detailed information, I'm not able to help.

on related ticket there are several pointers to information, try to give a look to understand if they can provide you help.

Unfortunately I can not do anything else for you.
(0026332)
fman   
2017-05-01 09:39   
https://community.atlassian.com/t5/Answers-Developer-Questions/Assigning-a-reporter-when-creating-an-issue-with-rest/qaq-p/475644 [^]
(0026343)
apronwq   
2017-05-10 14:09   
Hi, we did a lot test today, and here's the result:
1. test jira api, to confirm it could be properly receive and set reporter. --- test pass.
2. check the jira permission config, to confirm tuser(used to connect to jira from testlink) could modify Reporter. ---- test pass
3. modify jirarestinterface.class.php, set reporter to a static value, to confirm if jira issue reporter could be changed by testlink --- test pass

Still working on more test to confirm where is wrong......
(0026344)
fman   
2017-05-10 14:26   
Thanks for your update. it seems there is a little glitch when jirarestinterface.class.php receive this info.
hope you will find it

regards
(0026367)
apronwq   
2017-05-16 13:48   
(edited on: 2017-05-16 13:56)
More test:
4. test jira api, to confirm createMeta worked fine --- test pass
5. check if testlink receive json data of createMeta from jira --- test pass

So we guess something wrong when parsing the json data.

third_party\fayp-jira-rest\jira.php
Line 464
$ret[$ele->key][$it->id]['fields'][$field->key] = $field->key;

$field->key should be $field->name


exec.inc.php
line 632
$setReporter = isset($issueFields[$issueType]['reporter']

should be
$setReporter = isset($issueFields[$issueType]['fields']['Reporter']



We changed this and it worked fine now.

(0026368)
apronwq   
2017-05-16 13:50   
We still have another problem:
When add a comment, author could not change to the proper user.
Have not check and analyze yet.
(0026369)
fman   
2017-05-16 14:20   
Thanks for your help
(0026372)
fman   
2017-05-16 18:31   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/a281fec0d3e7c161d752560121af5eaa0efb47ed [^]
(0026373)
fman   
2017-05-16 18:39   
regarding:

>> When add a comment, author could not change to the proper user.

https://community.atlassian.com/t5/Answers-Developer-Questions/Possible-to-set-comment-author-through-REST-API/qaq-p/504216 [^]
(0027329)
fman   
2018-04-14 09:04   
release 1.9.17