MantisBT - TestLink
View Issue Details
0007757TestLinkBug Tracking System - JIRA Integrationpublic2016-11-24 03:452017-05-01 09:22
vinu.vincent 
fman 
highmajorhave not tried
closedfixed 
1.9.15 (2015 Q4) 
1.9.16 (2016 Q4) 
Mysql
5.6
TBD
0007757: Jira issues updated with Jira integration user instead of the actual testlink user
We are using REST API for integrate Jira with Jira username and password. When we update any Jira issue from Testlink, its updating with Jira integration user(admin) instead of the actual Jira user. How can we change this to Jira actual user instead of integrated user.
Integrate Jira using REST API with jira username and password.
Update Jira issue from Testlink.
No tags attached.
related to 0007761closed fman Issue add failure versions FIELD 
related to 0007929closed fman Create issue from testlink use wrong username: integration user instead current user 
Issue History
2016-11-24 03:45vinu.vincentNew Issue
2016-11-24 10:51fmanNote Added: 0025632
2016-11-24 10:51fmanAssigned To => fman
2016-11-24 10:51fmanStatusnew => feedback
2016-11-24 11:27vinu.vincentNote Added: 0025633
2016-11-24 11:27vinu.vincentStatusfeedback => assigned
2016-11-25 08:54fmanNote Added: 0025635
2016-11-25 08:55fmanStatusassigned => feedback
2016-12-01 08:40vinu.vincentNote Added: 0025652
2016-12-01 08:40vinu.vincentStatusfeedback => assigned
2016-12-05 09:35vinu.vincentNote Added: 0025654
2016-12-06 23:09fmanNote Added: 0025656
2016-12-06 23:10fmanStatusassigned => feedback
2016-12-20 07:06vinu.vincentNote Added: 0025749
2016-12-20 07:06vinu.vincentStatusfeedback => assigned
2016-12-21 09:10vinu.vincentNote Added: 0025757
2016-12-21 14:41fmanNote Added: 0025759
2016-12-21 14:41fmanStatusassigned => feedback
2016-12-22 11:28vinu.vincentNote Added: 0025766
2016-12-22 11:28vinu.vincentStatusfeedback => assigned
2016-12-22 14:21fmanNote Added: 0025769
2016-12-24 14:09fmanNote Added: 0025778
2016-12-24 14:11fmanNote Added: 0025779
2016-12-24 14:46fmanNote Added: 0025780
2016-12-24 14:47fmanNote Edited: 0025780bug_revision_view_page.php?bugnote_id=25780#r5102
2016-12-24 14:47fmanStatusassigned => feedback
2016-12-24 14:49fmanRelationship addedrelated to 0007761
2016-12-25 18:19fmanNote Added: 0025786
2017-01-14 18:04fmanQA Team - Task Workflow Status => TBD
2017-01-14 18:04fmanFixed in Version => 1.9.16 (2016 Q4)
2017-01-14 18:05fmanNote Added: 0025840
2017-01-14 18:05fmanStatusfeedback => resolved
2017-01-14 18:05fmanResolutionopen => fixed
2017-01-22 07:57fmanNote Added: 0025865
2017-01-22 07:57fmanStatusresolved => closed
2017-05-01 09:22fmanRelationship addedrelated to 0007929

Notes
(0025632)
fman   
2016-11-24 10:51   
if TestLink login name = JIra Login name, API call send to JIRA this loginname using filed reporter
(you can see this on exec.inc.php line 603
jirarestinterface.class.php line 389


please test and provide feedback
(0025633)
vinu.vincent   
2016-11-24 11:27   
You mean the following lines in jiraresrinterface.class.php ?

 if(property_exists($opt, 'reporter'))
        {
          $issue['fields']['reporter'] = array('name' => (string)$opt->reporter);
        }

And the following lines in exec.inc.php ?

 $issueText = generateIssueText($dbHandler,$argsObj,$itsObj);

Let me know what changes i need to made on these?
(0025635)
fman   
2016-11-25 08:54   
what you need is to configure TestLink login name = JIra Login name, then things has to work.
just to be sure you can put some dump on code to see if property has a value and value is ok
(0025652)
vinu.vincent   
2016-12-01 08:40   
I have kept my jira username and testlink username as same. But still when i update issue from Testlink, it is showing the integration username instead of my name. Do we need to keep the password also same? Do we need any code change for taht?
(0025654)
vinu.vincent   
2016-12-05 09:35   
I have kept both username and password same as Jira in testlink. But still my issue update showing my integrated username instead of the actual username. Do i need to change any code or any other config to make it working?
(0025656)
fman   
2016-12-06 23:09   
IMHO this depends of rights that user you are using to integrate with JIRA has.
this user need to have the power to change reporter
(0025749)
vinu.vincent   
2016-12-20 07:06   
We have integrated with Jira by administrator user. So the user have full privileges to Jira system. I have kept the same username in Testlink but still the modified jira tickets showing updated by integrated user instead of actual user.
(0025757)
vinu.vincent   
2016-12-21 09:10   
Hi fman - To be a little more clear on this issue, let me put down the steps to repr0duce:-

1. I create a JIRA account for myself as an admin, and also to my colleague with the same admin credentials.

2. The UN/PW are different, but made sure the Testlink(TL) and JIRA UN's are in sync for my colleague and mine.

3. Now later when my colleague creates an issue from the TL, the Reporter Name displays his name (which is correct), but in the Activity Log of JIRA, just below the Bug details page it displays:-
***Created Issue with my name instead of my colleague's Name
***Also any comments that are put for the Bug on TL gets reflected on the JIRA agai with my name
***If the comments are directly entered in JIRA, it then shows my colleague's name.

So how could I handle this scenario of displaying the Reporter's name instead of my name every time an issue is created and commented...
(0025759)
fman   
2016-12-21 14:41   
Requirement
UserID in TESTLINK has to be EQUAL to UserID on JIRA, for all users that use TestLink and Jira
(0025766)
vinu.vincent   
2016-12-22 11:28   
True! Both the username's in JIRA and TESTLINK are created same and equal!
(0025769)
fman   
2016-12-22 14:21   
meanwhile give a look to http://forum.testlink.org/viewtopic.php?f=43&t=7898 [^]
(0025778)
fman   
2016-12-24 14:09   
Doing some searches I've got this info:
https://answers.atlassian.com/questions/265902/create-issue-getting-error-on-reporter-field-reporter-cannot-be-set [^]


The REST API respects the way Jira works on the front-end, so if the user can't do something in the UI, REST won't let them either.
(0025779)
fman   
2016-12-24 14:11   
https://support.zendesk.com/hc/en-us/community/posts/203694378-Error-during-Jira-Ticket-Sharing-Field-reporter-cannot-be-set-It-is-not-on-the-appropriate-screen-or-unknown- [^]
(0025780)
fman   
2016-12-24 14:46   
(edited on: 2016-12-24 14:47)
I'using latest code from github.
using testlink.atlassian.net
configuration


users:
testlink.forum
testlink.jira => exists on testlink and jira

<issuetracker>
<username>testlink.forum</username>
<password>forum</password>
<uribase>https://testlink.atlassian.net/</uribase> [^]
<uriapi>https://testlink.atlassian.net/rest/api/latest/</uriapi> [^]
<projectkey>ZOFF</projectkey>
<issuetype>1</issuetype>
</issuetracker>

testlink.jira@gmail.com => user on JIRA with password jira.fm5n

see
https://testlink.atlassian.net/browse/ZOFF-2161 [^]
https://testlink.atlassian.net/browse/ZOFF-2162 [^]

everything worked as expected

(0025786)
fman   
2016-12-25 18:19   
This

https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/996b5b57ee0ef880364124066fa6090e53f19b6e [^]

regards JIRA projects where reporter field is not present on CREATE ISSUE SCREEN
(0025840)
fman   
2017-01-14 18:05   
no more user feedback
(0025865)
fman   
2017-01-22 07:57   
1.9.16 released