Jira Integration Reporter Error

Moderators: Amaradana, TurboPT, TL Developers

georgdl
TestLink user
Posts: 4
Joined: Sat Oct 03, 2015 10:15 am

Jira Integration Reporter Error

Post by georgdl »

We have testlink 1.9.14, JIRA v7.0.0-OD-07-011

We can link Jira bugs to a test case in testlink.
But when we try to create a Jira bug from a failed test case in testlink we get the following error once the Jira Bug form has been filled in

"addIssue:Failure:JIRA Message: reporter => Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."

Is there a way for force testlink to set the Reporter field in Jira.

Here is our Jira Rest config

<issuetracker>
<username>username</username>
<password>xxxxxx</password>
<uribase>https://ourdomain.atlassian.net/</uribase>
<uriapi>https://ourdomain.atlassian.net/rest/api/2/</uriapi>
<uriview>https://ourdomain.atlassian.net/browse/</uriview>
<uricreate>https://ourdomain.atlassian.net/secure/ ... /uricreate>
<userinteraction>1</userinteraction>
<projectkey>CP</projectkey>
<issuetype>Bug</issuetype>
<issuepriority>3</issuepriority>
</issuetracker>

Is there something in this config we can add for force the reporter. Tried adding <reporter>username</reporter> but had no effect.

Let me know if you need more info.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Jira Integration Reporter Error

Post by fman »

please do not do blind tries are useless.
What is important to understand if reporter is an standard field (I'm not JIRA Expert) or a custom field or what.
georgdl
TestLink user
Posts: 4
Joined: Sat Oct 03, 2015 10:15 am

Re: Jira Integration Reporter Error

Post by georgdl »

As far as I can tell it is a standard field in Jira, but is set to required on our project.
This is a required field and we dont want to be remove this as a required field.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Jira Integration Reporter Error

Post by fman »

I'm using ondemand JIRA (testlink.atlassian.net) with std configuration and do not have the reporter field.
Would you mind to provide screenshots of your jira screens?
richinek
Advanced user
Posts: 19
Joined: Thu Jan 13, 2011 8:39 am

Re: Jira Integration Reporter Error

Post by richinek »

Hello guys,

is there any solution on this 'reporter' issue? I have the same problem after upgrading to Testlink 1.9.14. We are using JIRA v6.3.8.

Testlink:
Image


Jira - create issue screen:
Image
Image
richinek
Advanced user
Posts: 19
Joined: Thu Jan 13, 2011 8:39 am

Re: Jira Integration Reporter Error

Post by richinek »

Temporary workaroud:

In \testlink\lib\issuetrackerintegration\jirarestInterface.class.php comment following code using /* and */:

Code: Select all

/*
        if(property_exists($opt, 'reporter'))
        {
          $issue['fields']['reporter'] = array('name' => (string)$opt->reporter);
        }
*/
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Jira Integration Reporter Error

Post by fman »

Thanks for analisys, going to check IMHO is something strange because REPORTER surelly was something some user have requested to do set it to the USER LOGGED on TESTLINK.
Important will be to check why this field is missing on JIRA 6.8.x

it will be great if you being a JIRA USER can get help from Atlassian people

I can do test only on JIRA ON DEMAND and version is JIRA v7.0.0-OD-08-005

JUST CHECKED => REPORTER FIELD IS PRESENT AND ENABLED in my JIRA VERSION
please let me know
richinek
Advanced user
Posts: 19
Joined: Thu Jan 13, 2011 8:39 am

Re: Jira Integration Reporter Error

Post by richinek »

My Reporter's field in Jira is set correctly with testlink user even if it's commented in the php code, see screenshot:

Image
Last edited by richinek on Wed Nov 11, 2015 11:41 am, edited 2 times in total.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Jira Integration Reporter Error

Post by fman »

image is broken

but on your previous screen where you create an issue REPORTER FIELD IS NOT PRESENT
richinek
Advanced user
Posts: 19
Joined: Thu Jan 13, 2011 8:39 am

Re: Jira Integration Reporter Error

Post by richinek »

Image fixed.

Yes, you are correct, Reporter field is not visible on my creation window. Probably some glitch in the Jira API..
vossqa
TestLink user
Posts: 9
Joined: Sat Aug 02, 2014 4:32 pm

Re: Jira Integration Reporter Error

Post by vossqa »

Experienced the same issue on Atlassian JIRA Project Management Software (v7.2.4#72006-sha1:91606a8) and TestLink 1.9.15 (Tauriel)

"addIssue:Failure:JIRA Message: reporter => The reporter specified is not a user."

The workaround as per richinek, did the trick for me and now I can log bugs directly in JIRA via Testlink
new path is : testlink/lib/issuetrackerintegration/jirarestInterface.class.php
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Jira Integration Reporter Error

Post by fman »

Here the explanation:

https://answers.atlassian.com/questions ... not-be-set

In short:
Does the user you are logging in as have the right to "modify reporter"?
Is the reporter on the "create issue" screen at all?

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.

Then may be an implemantation change on testlink at config level is required (i.e. set reporter), or the checking (IMHO this introduce more delay in communication) for create issue metadata (https://developer.atlassian.com/jiradev ... ing-issues)
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Jira Integration Reporter Error

Post by fman »

lburczak
TestLink user
Posts: 1
Joined: Sun Jan 15, 2017 6:00 pm

Re: Jira Integration Reporter Error

Post by lburczak »

Hi all,
My current setup is as follows:
TestLink 1.9.16 (with updates http://mantis.testlink.org/view.php?id=7666) and JIRA Server 7.2.6

I have a problem with the field "reporter," because the current configuration does not update field "reporter" for the user who performs the test.
I have a user with the same login and password in TestLink and JIRA.

I have created two issue trackers

1) JIRA_RESTAPI - my JIRA

Code: Select all

<Issuetracker>
<Username> TestLink </ username>
<Password> pass </ password>
<Uribase> https://xxx.xxx.com.pl:8443/ </ uribase>
<Uriapi> https://xxx.xxx.com.pl:8443/rest/api/latest/ </ uriapi>
<Projectkey> PT </ projectkey>
<Issuetype> 10006 </ issuetype>
</ Issuetracker>
2) JIRA_RESTAPI_testlink - JIRA TestLink

Code: Select all

<Issuetracker>
<Username> testlink.forum </ username>
<Password> index </ password>
<Uribase> https://testlink.atlassian.net/ </ uribase>
<Uriapi> https://testlink.atlassian.net/rest/api/latest/ </ uriapi>
<Projectkey> Zoff </ projectkey>
<Issuetype> 1 </ issuetype>
</ Issuetracker>
When I set the function var_dump () in the file exec.inc.php

Code: Select all

if (method_exists ($ itsObj, 'getCreateIssueFields'))
  {
    $ IssueFields = $ itsObj-> getCreateIssueFields ();
    [b]var_dump ($ issueFields);
    exit;[/b]
    if (! is_null ($ issueFields))
    {
      $ IssueFields = current ($ issueFields);
    }
    $ SetReporter = isset ($ issueFields [$ issueType] [ 'reporter']);
    
  }
  else
  {
     $ SetReporter = true;
  }
When set to IssueTracker JIRA TestLink (JIRA_RESTAPI_testlink)
I get such information:

and when I set my issue tracker JIRA ( JIRA_RESTAPI):
I currently have commented out code and everything works well.

Code: Select all

 /* if(method_exists($itsObj,'getCreateIssueFields'))
  {
    $issueFields = $itsObj->getCreateIssueFields(); 
    var_dump($issueFields);
    exit;
    if(!is_null($issueFields))
    {
      $issueFields = current($issueFields); 
    }
    $setReporter = isset($issueFields[$issueType]['reporter']);
    
  }  
  else
  {
*/
     $setReporter = true;
  //}  
 

Is JIRA 7.2.6 should somehow be specifically set?
delcroip
TestLink user
Posts: 1
Joined: Mon Sep 21, 2020 5:55 pm

Re: Jira Integration Reporter Error

Post by delcroip »

Dear I Faced the same issue

I found the reason there: https://community.atlassian.com/t5/Jira ... -p/1304128

it seems that instead of "name" => "username" you should pu "id"=> "userid", userid is on the url of your Jira/confluence profile page

Because my users are not all on Jira, I added <reporter>JIRAID</reporter> in the config and added that l381 of /lib/issuetrackerintegration/jirarestInterface.class.php :

Code: Select all

 
if (property_exists($this->cfg, 'reporter')) {
          $issue['fields']['reporter'] = array('id' => (string)$this->cfg->reporter);
      }
it works
Post Reply