Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005517TestLinkBug Tracking System - JIRA Integrationpublic2013-02-04 14:562013-05-22 20:59
Reporterkoenzie 
Assigned Tofman 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformApacheOSWindows ServerOS Version
Product Version1.9.5 (2012 Q4 - bug fixing) 
Fixed in Version1.9.6 (2013 Q1 - bug fixing) 
Summary0005517: Create Issue (SOAP) fails due to required attributes (not managed yet on TestLink)
DescriptionI get a weird error while adding a bug. I searched for a solution, added the projectkey and issuetype, but this will not solve the issue.

The error message is:
Create JIRA Ticket FAILURE => com.atlassian.jira.rpc.exception.RemoteValidationException: {priority=Priority is required., components=Component/s is required.} : [] - serialized issue:a:4:{s:7:"project";s:5:"AFIVE";s:4:"type";i:1;s:7:"summary";s:138:"/Testproject/Enhancement/TEST-2:The camera shall provide backlight compensation (BLC) [1] - Executed ON (ISO FORMAT): 2013-02-04 13:23:39";s:11:"description";s:174:"Execution ID: 1987 Tester: admin Test Plan: TEST TESTPLAN Build: build_2012-08-31_11-38-33 Executed ON (ISO FORMAT): 2013-02-04 13:23:39 Execution Status: failed ";}

Steps To ReproduceAdd a new bug via the GUI
TagsTO BE FIXED on 2.0
Database (MySQL,Postgres,etc)MySQL
BrowserIE
PHP Version
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filespng file icon jira-issue-screen.png [^] (48,175 bytes) 2013-02-04 16:54

- Relationships
related to 0005610closedfman Redmine Create issue from Testlink - blocked due to Redmine MANDATORY Fields 

-  Notes
(0018272)
fman (administrator)
2013-02-04 16:14
edited on: 2013-02-04 16:16

Depending on each JIRA configuration some fields are mandatory
Give a look to this piece of message
{priority=Priority is required., components=Component/s is required.}

I've seen this kind of behavior with Bugzilla XML-RPC, and find a way to fix it using a property issueDefaults
I suggest you to copy the code and adapt it to jirasoap implementation.
We have tested on a simple installation without any kind of customization, that's why we have not faced the issue.
We will try to solve this in future.

(0018273)
koenzie (reporter)
2013-02-04 16:15

Could you give me some steps to follow on how to do this?
(0018274)
fman (administrator)
2013-02-04 16:19
edited on: 2013-02-04 16:20

Can provide just a brute force solution
Change on jirasoapInterface.class.php, this
public function addIssue($summary,$description)
{
    try
    {

          $issue = array('project' => (string)$this->cfg->projectkey,
                     'type' => (int)$this->cfg->issuetype,
                     'summary' => $summary,
                     'description' => $description);


ON this (you will have to go by trial and error

          $issue = array('project' => (string)$this->cfg->projectkey,
                     'type' => (int)$this->cfg->issuetype,
                     'summary' => $summary,
                     'description' => $description,
                     'priority' => YOUR FIXED DEFAULT VALUE,
                     'components' => YOUR FIXED DEFAULT VALUE);


let me know if worked ok

(0018275)
koenzie (reporter)
2013-02-04 16:27

I tried this :

          $issue = array('project' => (string)$this->cfg->projectkey,
                     'type' => (int)$this->cfg->issuetype,
                     'summary' => $summary,
                     'description' => $description,
             'priority' => 1,
                     'components' => 12701);

It works for priority, but i can't figure out how to format components, I also tryed the complete component text (as seen in the error below).

The Error:
Create JIRA Ticket FAILURE => com.atlassian.jira.rpc.exception.RemoteValidationException: {components=Component/s is required.} : [] - serialized issue:a:6:{s:7:"project";s:5:"AFIVE";s:4:"type";i:1;s:7:"summary";s:138:"/Testproject/Enhancement/TEST-2:The camera shall provide backlight compensation (BLC) [1] - Executed ON (ISO FORMAT): 2013-02-04 13:23:39";s:11:"description";s:174:"Execution ID: 1987 Tester: admin Test Plan: TEST TESTPLAN Build: build_2012-08-31_11-38-33 Executed ON (ISO FORMAT): 2013-02-04 13:23:39 Execution Status: failed ";s:8:"priority";i:1;s:10:"components";s:19:"Software IP backend";}
(0018276)
koenzie (reporter)
2013-02-04 16:28

This is the Error with the number:

Create JIRA Ticket FAILURE => com.atlassian.jira.rpc.exception.RemoteValidationException: {components=Component/s is required.} : [] - serialized issue:a:6:{s:7:"project";s:5:"AFIVE";s:4:"type";i:1;s:7:"summary";s:138:"/Testproject/Enhancement/TEST-2:The camera shall provide backlight compensation (BLC) [1] - Executed ON (ISO FORMAT): 2013-02-04 13:23:39";s:11:"description";s:174:"Execution ID: 1987 Tester: admin Test Plan: TEST TESTPLAN Build: build_2012-08-31_11-38-33 Executed ON (ISO FORMAT): 2013-02-04 13:23:39 Execution Status: failed ";s:8:"priority";i:1;s:10:"components";i:12701;}
(0018277)
fman (administrator)
2013-02-04 16:50

Unfortunately I can not help with this, because I do not use Jira.
components is some sort of custom field?
what is definition of components ?
can you change definition (is just a workaround) to make it OPTIONAL, or to have a default value ?
(0018278)
fman (administrator)
2013-02-04 16:53

just connected to https://testlink.atlassian.net/, [^]
found that components seems to be standard jira field.
(see image)
(0018279)
fman (administrator)
2013-02-04 17:12

Just defined two components, created issue FROM JIRA GUI, and get info from TL
Creating INTERFACE
Connection OK?
bool(true) Get Issue Summary
object(stdClass)0000086 (27) { ["id"]=> string(5) "10800" ["affectsVersions"]=> array(0) { } ["assignee"]=> string(5) "admin" ["attachmentNames"]=> array(0) { }["components"]=> array(1) { [0]=> object(stdClass)0000085 (2) { ["id"]=> string(5) "10100" ["name"]=> string(8) "Database" } } ["created"]=> string(24) "2013-02-04T17:09:22.483Z" ["customFieldValues"]=> array(3) { [0]=> object(stdClass)0000084 (3) { ["customfieldId"]=> string(17) "customfield_10000" ["key"]=> NULL ["values"]=> array(1) { [0]=> string(2) "23" } } [1]=> object(stdClass)0000082 (3) { ["customfieldId"]=> string(17) "customfield_10200" ["key"]=> NULL ["values"]=> array(1) { [0]=> string(2) "23" } } [2]=> object(stdClass)0000083 (3) { ["customfieldId"]=> string(17) "customfield_10607" ["key"]=> NULL ["values"]=> array(1) { [0]=> NULL } } } ["description"]=> NULL ["duedate"]=> NULL ["environment"]=> NULL ["fixVersions"]=> array(0) { } ["key"]=> string(7) "ZOFF-20" ["priority"]=> string(1) "3" ["project"]=> string(4) "ZOFF" ["reporter"]=> string(5) "admin" ["resolution"]=> NULL ["status"]=> string(1) "1" ["summary"]=> string(12) "qqqqqqqqqqqq" ["type"]=> string(1) "1" ["updated"]=> string(24) "2013-02-04T17:10:00.410Z" ["votes"]=> int(0) ["IDHTMLString"]=> string(17) "ZOFF-20 : " ["statusCode"]=> string(1) "1" ["statusVerbose"]=> string(4) "Open" ["statusHTMLString"]=> string(7) "[Open] " ["summaryHTMLString"]=> string(12) "qqqqqqqqqqqq" ["isResolved"]=> bool(false) }
Get Issue Summary
This is an issue to allow people to test integration
(0018280)
fman (administrator)
2013-02-04 17:34
edited on: 2013-02-04 17:35

Solved!
$issue = array('project' => 'ZOFF','summary' => 'My Firts ISSUE VIA API',
                 'description' => 'Do Androids Dream of Electric Sheep?',
                 'type' => 1, 'components' => array( array('id' => '10100')));

1. components has to be an array of arrays
This is what we get when asking data about an issue (see note 18279)

2. if component has not be configured to be assigned to some role, issue creating fails with this error:

array(3) { ["status_ok"]=> bool(false) ["id"]=> int(-1) ["msg"]=> string(428) "Create JIRA Ticket FAILURE => com.atlassian.jira.rpc.exception.RemoteValidationException: {} : [Assignee: The default assignee does NOT have ASSIGNABLE permission OR Unassigned issues are turned off.] - serialized issue:a:5:{s:7:"project";s:4:"ZOFF";s:7:"summary";s:22:"My Firts ISSUE VIA API";s:11:"description";s:36:"Do Androids Dream of Electric Sheep?";s:4:"type";i:1;s:10:"components";a:1:{i:0;a:1:{s:2:"id";s:5:"10102";}}}" }

(0018281)
fman (administrator)
2013-02-04 20:11

http://gitorious.org/testlink-ga/testlink-code/commit/b431cf43cd767a69edd854993e09d4be819e08bf [^]
(0018282)
fman (administrator)
2013-02-04 20:13
edited on: 2013-02-04 20:15

<issuetracker>
<username>JIRA LOGIN NAME</username>
<password>JIRA PASSWORD</password>
<uribase>http://testlink.atlassian.net/</uribase> [^]
<uriwsdl>http://testlink.atlassian.net/rpc/soap/jirasoapservice-v2?wsdl</uriwsdl> [^]
<uriview>testlink.atlassian.net/browse/</uriview>
<uricreate>testlink.atlassian.net/secure/CreateIssue!default.jspa</uricreate>
<!-- Configure This if you want be able TO CREATE ISSUES -->
<projectkey>JIRA PROJECT KEY</projectkey>\n" .
<issuetype>JIRA ISSUE TYPE</issuetype>
<!-- Configure This if you need to provide other attributes AND REMOVE COMMENTS -->
<!-- <attributes><components><id>10100</id><id>10101</id></components></attributes> -->

<!-- Configure This if you want NON STANDARD BEHAIVOUR for considered issue resolved -->
<resolvedstatus>
<status><code>5</code><verbose>Resolved</verbose></status>
<status><code>6</code><verbose>Closed</verbose></status>
</resolvedstatus>
</issuetracker>

(0018283)
koenzie (reporter)
2013-02-05 08:38

:) cool, tnx!
(0018284)
koenzie (reporter)
2013-02-05 08:55

The only thing not included in your code is the "priority" variable :)
(0018285)
fman (administrator)
2013-02-05 10:51

the idea is that you can add in the xml
inside the <attributes></attributes>
this => <priority>4</priority>

and have to work.
same has to apply to other standard JIRA fields (that are string or int),
for attributes that expect an array (like components) you need to understand
what are the keys to be used.
You can do this investigation, same way I did, using our examples provided in the code testing folder inside issuetrakerintegration folder
Please test it and provide feedback
(0018286)
koenzie (reporter)
2013-02-05 11:36

OK, i have some other problems installing 1.9.6 but i'll try to test it and come back with some results.

I hacked in the array sollution to our current 1.9.5 using:
 
'priority' => 1,
'components' => array( array('id' => '12701')));

and it is working for priority and components, i can add a issue. It's to much hacking for me at the moment to get in the configurable solution you provided into our 1.9.5 install.
(0018287)
fman (administrator)
2013-02-05 12:39
edited on: 2013-02-05 12:39

You can give a try without using ALL THE latest code from gitoriuos,
you only have to get latest vesion of
lib/issuetrackerintegration/jirasoapInterface.class.php

(0018288)
koenzie (reporter)
2013-02-05 12:41

I tryed using only that file, but i get a lot of errors while entering the test execution page for a single testcase.
(0018289)
fman (administrator)
2013-02-05 12:45

ok, let's say that is better you use your hack till we release latest version.
Only other thing you can do (it will be good) is to have a parallel installation with latest still to be released version.
Let's consider this closed
(0018290)
koenzie (reporter)
2013-02-05 12:47

I have a testserver with the latest 1.9.6 and a productionserver with 1.9.5 stable.

When is the next release planned?

OK on closing this issue when it will be fixed in the next version, thanks for the great support!

- Issue History
Date Modified Username Field Change
2013-02-04 14:56 koenzie New Issue
2013-02-04 16:14 fman Note Added: 0018272
2013-02-04 16:15 fman Summary Weird error when adding new bug => Create Issue (SOAP) fails due to required attributes (not managed yet on TestLink)
2013-02-04 16:15 koenzie Note Added: 0018273
2013-02-04 16:16 fman Note Edited: 0018272 View Revisions
2013-02-04 16:19 fman Note Added: 0018274
2013-02-04 16:20 fman Note Edited: 0018274 View Revisions
2013-02-04 16:20 fman Assigned To => fman
2013-02-04 16:20 fman Status new => assigned
2013-02-04 16:27 koenzie Note Added: 0018275
2013-02-04 16:28 koenzie Note Added: 0018276
2013-02-04 16:50 fman Note Added: 0018277
2013-02-04 16:53 fman Note Added: 0018278
2013-02-04 16:54 fman File Added: jira-issue-screen.png
2013-02-04 17:12 fman Note Added: 0018279
2013-02-04 17:34 fman Note Added: 0018280
2013-02-04 17:35 fman Note Edited: 0018280 View Revisions
2013-02-04 17:43 fman Status assigned => feedback
2013-02-04 20:11 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2013-02-04 20:11 fman Fixed in Version => 1.9.6 (2013 Q1 - bug fixing)
2013-02-04 20:11 fman Tag Attached: TO BE FIXED on 2.0
2013-02-04 20:11 fman Note Added: 0018281
2013-02-04 20:13 fman Note Added: 0018282
2013-02-04 20:15 fman Note Edited: 0018282 View Revisions
2013-02-04 20:15 fman Note Edited: 0018282 View Revisions
2013-02-05 08:38 koenzie Note Added: 0018283
2013-02-05 08:38 koenzie Status feedback => assigned
2013-02-05 08:55 koenzie Note Added: 0018284
2013-02-05 10:51 fman Note Added: 0018285
2013-02-05 10:51 fman Status assigned => resolved
2013-02-05 10:51 fman Resolution open => fixed
2013-02-05 11:36 koenzie Note Added: 0018286
2013-02-05 12:39 fman Note Added: 0018287
2013-02-05 12:39 fman Note Edited: 0018287 View Revisions
2013-02-05 12:41 koenzie Note Added: 0018288
2013-02-05 12:45 fman Note Added: 0018289
2013-02-05 12:47 koenzie Note Added: 0018290
2013-04-06 09:56 fman Relationship added related to 0005610
2013-05-22 20:59 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker