Devang
Devang

Reputation: 385

Create issue : Test link integration with jira

I've integrated Testlink with Jira using below xml

<issuetracker>
    <username>xyz</username>
    <password>#123</password>
    <uribase>abc.net/projects/KEY/</uribase>
    <uriapi>abc.net/rest/api/latest/</uriapi>
    <uriview>abc.net/browse/</uriview>
    <projectkey>KEY</projectkey>
    <issuetype>1</issuetype>
</issuetracker>

I am able to link existing jira issue in to test link.

But create issue window contains Version field which would not alow me to enter any value or not giving any suggestion as displayed in below image.

Create issue

I've tried to create version in jira but it doesn't work.

So,

  1. What value i should enter/configure for version field ?

  2. What is use of <issuetype>1</issuetype> ? can we provide any other value?

  3. How to link new field on create Issue window?

4.Version is mismatched with jira field Versions.

Upvotes: 7

Views: 2326

Answers (2)

Tanzeel Ur Rahman
Tanzeel Ur Rahman

Reputation: 61

This version field is empty because you have not specified any version for your project in JIRA. In my case it was Fix version in JIRA. Currently the rest API is getting an empty list of versions. You can try

curl -X GET http://example.com/rest/api/2/project/KEY/versions -H 'authorization: Basic dtgzkisVlbyhsuYWhtYijdsdidjjsidDkw'

This will give you an empty list. Once you set FixVersion in for your project in JIRA, this API will return the list of available versions for your project and the Version field will be populated with those versions.

PS: use your own authorization headers. You can use [Postman][1] for this purpose.

Upvotes: 0

Lukas Hajdu
Lukas Hajdu

Reputation: 804

I'm not sure which version of JIRA REST API you are using but the tutorial for the v2 says:

Just like everyone else in the real world, we're faced with time and resource constraints. Supporting two serialisation formats requires more time than just a single one. Hence, for our initial release of the JIRA REST API, we decided to provide "more stuff in JSON" rather than "less stuff in JSON and XML".

So I'm not sure about the XML support. I have no experience with Testlink, but I guess it's using some kind of serialiser at the back end.

  1. If you check the Create issue endpoint, there is no version field. I guess it will be the versions field instead. In JIRA projects can have multiple versions. You can get a list of versions from the Get project eversions endpoint.
  2. Issue type is an ID of issue type you want to use for your issue. You can get a list of project specific issue types from the Get issue all types endpoint. Issue types
  3. I'm not sure about this
  4. Check the first point

Upvotes: 2

Related Questions