Page 1 of 1

Jira Integration Reporter Error

PostPosted: Mon Oct 05, 2015 3:01 am
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/CreateIssue!default.jspa</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.

Re: Jira Integration Reporter Error

PostPosted: Mon Oct 05, 2015 9:17 am
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.

Re: Jira Integration Reporter Error

PostPosted: Mon Oct 12, 2015 7:40 am
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.

Re: Jira Integration Reporter Error

PostPosted: Mon Oct 12, 2015 8:38 am
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?

Re: Jira Integration Reporter Error

PostPosted: Tue Nov 10, 2015 1:03 pm
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

Re: Jira Integration Reporter Error

PostPosted: Tue Nov 10, 2015 1:17 pm
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);
        }
*/

Re: Jira Integration Reporter Error

PostPosted: Wed Nov 11, 2015 5:36 am
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

Re: Jira Integration Reporter Error

PostPosted: Wed Nov 11, 2015 7:52 am
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

Re: Jira Integration Reporter Error

PostPosted: Wed Nov 11, 2015 10:20 am
by fman
image is broken

but on your previous screen where you create an issue REPORTER FIELD IS NOT PRESENT

Re: Jira Integration Reporter Error

PostPosted: Wed Nov 11, 2015 11:44 am
by richinek
Image fixed.

Yes, you are correct, Reporter field is not visible on my creation window. Probably some glitch in the Jira API..

Re: Jira Integration Reporter Error

PostPosted: Thu Dec 22, 2016 6:23 am
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

Re: Jira Integration Reporter Error

PostPosted: Sun Dec 25, 2016 8:40 am
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)

Re: Jira Integration Reporter Error

PostPosted: Sun Dec 25, 2016 6:18 pm
by fman

Re: Jira Integration Reporter Error

PostPosted: Mon Jan 16, 2017 2:56 pm
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?