MantisBT - TestLink
View Issue Details
0008064TestLinkBug Tracking System - JIRA Integrationpublic2017-08-28 11:462017-09-19 07:11
1.9.16 (2016 Q4) 
to be confirmed
Chrome 60 (32 bit & 64 bit); Firefox 55 (64 bit); Internet Explorer 11;
0008064: Error creating issue with custom field (rest api)
Error appears when trying to create an issue using custom fields.

Error text received from JIRA:
"Create issue feedback addIssue:Failure:JIRA Message: _empty_ => Field '' cannot be set. It is not on the appropriate screen, or unknown."

Followed the set-up of the custom field in the issue tracker like stated in [^]
And also tried changing the inner <customfield> tag to <customfieldID> (like seen in other templates).

So our configuration is:

<uribase>https://ourURL/browse/ourProjectKey</uribase> [^]
<uriapi>https://ourURL/rest/api/latest/</uriapi> [^]
<uriview>https://ourURL/browse/</uriview> [^]



The customfield is configured this way:
Name: customfield_10800
Label: Countries
Available for: Test Case
Type: multiselection list
Possible values: ES|FR|DE
Enable on: Test Execution
Display on test execution: Yes

On Jira, there is a custom field with possible values "ES, FR and DE" created, with ID "customfield_10800". Using different software to send json to the url including the customfield, the issue creates successfull.

Extracting the logs from JIRA, the json sent by TestLink is like follows:
    "summary":"Message to locate test in log",
    "description":"First test\n\nLink to TestLink Execution: https:\/\/ourURL\/ltx.php?item=exec&feature_id=264&build_id=4",

The json sent by the other software is like follows:
    {"project":{"key": "ourProjectKey"},
    "summary": "Prueba log",
    "description": "Creating an issue with custom fields from JIRA API REST",
    "issuetype": {"name": "Test Postman"},
        "originalEstimate": "1d 2h",
        "remainingEstimate": "3h 25m"
    "customfield_10800": "ES"}

Tried out different combinations in TestLink:
-Define and assign the custom field to the project, but not the issue tracker
-Define the custom field in the issue tracker but not assigning it to the project
-Define the custom field for both
-Define a custom field with a single text value (and first 3 combinations)
-Define a numerical field (and first 3 combinations)
-Start from scratch and create project, custom field and test case again
-Test execution without selecting any value from custom field
-Test execution selecting one value from custom field

In order to reproduce the issue, use our above stated configuration, create a test in a project which has the custom field assigned, and run a test trying to create an issue in Jira with the bug report box checked.
JIRA version: v6.1.4#6159
No tags attached.
Issue History
2017-08-28 11:46prgtnsNew Issue
2017-08-28 15:34fmanQA Team - Task Workflow Status => TBD
2017-08-28 15:34fmanView Statusprivate => public
2017-08-30 19:56fmanNote Added: 0026807
2017-08-30 19:58fmanNote View State: 0026807: public
2017-08-30 20:00fmanNote Edited: 0026807bug_revision_view_page.php?bugnote_id=26807#r5340
2017-08-30 20:00fmanAssigned To => fman
2017-08-30 20:00fmanStatusnew => feedback
2017-09-04 10:46prgtnsNote Added: 0026819
2017-09-04 10:46prgtnsStatusfeedback => assigned
2017-09-19 07:11prgtnsNote Added: 0026850

2017-08-30 19:56   
(edited on: 2017-08-30 20:00)
I think that information provided on our Issue Tracking Configuration template is wrong.
For selectlist fields, you will not have chance to do any choice on GUI on testlink, then you need to put on XML config a FIXED value you want to be set on ALL issues.

Do not think if in an future some effort will be done to get Custom Field structure from JIRA and display it as control on TestLink GUI

see [^]

2017-09-04 10:46   
So, if I understood correctly, you cannot choose a value at executing the test, so you have to define a Custom Field with a fixed value for the test cases.

I created a custom field which type is TextField (String), set a fixed value on the XML configuration, assigned it to the project, assigned it to a TestCase, ran the test case with the custom field and bug report set, but the problem persists.

Tried following 3 templates (header same as before, only changes at customfield definition tags:


2017-09-19 07:11   
The error does not appear now, but the request sent from TestLink to Jira (with previous stated issue tracker configurations) shows this info:

Request Data (total 148 bytes) :

      "summary":"\/Prub.\/PruebaTestlinkJira3 2017-09-18UTC11:21",
      "description":"PRUEBA LOG 3",

So there is neither customfield_10800, nor like when error happened, field ,'':null}