How REST API get field "Requirement Status"?

Viktor Procházka July 9, 2018

I want to ask by REST API for requirement status field, which is visible on JIRA search dashboard. I know, that I can put it to limiter "fields=status" but this is status of issue, no "requirement Status"

For example on my JIRA is this field known like this:

"customfield_10815": {
"required": false,
"schema": {
"type": "any",
"custom": "com.xpandit.plugins.xray:requirement-version-test-status-custom-field",
"customId": 10815
},
"name": "Requirement Status",
"hasDefaultValue": false,
"operations": ["set"]
}

 I want to use something like this:

https://jira.mydomain.abc/rest/api/2/search?jql=project=%22RND%22+AND+issuetype+in+(Story,+Task,+Epic,+Improvement)&fields=id,key,issuetype,summary,status,Requirement Status&maxResults=9999

But I am not able get this data in response. No matter, if I replace "fields=Requirement Status" by  "fields=RequirementStatus" or by "fields=customfield_10815". I newer gets this.

 

Please exists some list of parameters for "fields=" somewhere? Or exists this on REST?

Thank you in advance for your advice.

"

2 answers

1 accepted

1 vote
Answer accepted
Viktor Procházka July 12, 2018

Thank to this nice simple help:

https://community.atlassian.com/t5/Answers-Developer-Questions/Getting-complete-list-of-all-fields-using-JIRA-REST-Java-Client/qaq-p/509008

I get list of "fields" form JIRA server and then I can use them. 

0 votes
Kirubel Tesfaye
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2018

Hi @Viktor Procházka,

Instead of trying to access the custom fields by customfield_10815 you should access it like cf[10815],

so instead of using this 

https://jira.mydomain.abc/rest/api/2/search?jql=project=%22RND%22+AND+issuetype+in+(Story,+Task,+Epic,+Improvement)&fields=id,key,issuetype,summary,status,Requirement Status&maxResults=9999

try this url

https://jira.mydomain.abc/rest/api/2/search?jql=project=%22RND%22+AND+issuetype+in+(Story,+Task,+Epic,+Improvement)&fields=id,key,issuetype,summary,status,cf[10815]&maxResults=9999

 Hope this helps.

Viktor Procházka July 11, 2018

This not works. I tried with:

https://server.url/rest/api/2/search?jql=affectedVersion+in+(EVA_1.0,+EVA_0.10,+EVA_1.0.1)&fields=id,key,issuetype,summary,status,cf%5B10815%5D&maxResults=9999

and with:

https://server.url/rest/api/2/search?jql=affectedVersion+in+(EVA_1.0,+EVA_0.10,+EVA_1.0.1)&fields=id,key,issuetype,summary,status,cf[10815]&maxResults=9999

Viktor Procházka July 11, 2018

There is no specification of usage? On JIRA is visible requirement status "NOK" I really need get this value by using API.

Thanks in advance for your advice

Suggest an answer

Log in or Sign up to answer