Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the status of an issue without statusCategory?

albertogarci86 October 2, 2018

Hi,

Is it possible to get the status name of an issue with no statusCategory?

I need it to grep just for the status name. 

I am using now: 

curl -k -u user:pass -X GET -H "Content-Type: application/json" https://jirainstance.com/rest/api/2/issue/TICKET-1?fields=status

That gives me the following output:

{"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id":"880473","self":"https://jirainstance.com/rest/api/2/issue/880473","key":"TICKET-1","fields":{"status":{"self":"https://jirainstance.com/rest/api/2/status/10017","description":"","iconUrl":"https://jirainstance.com/images/icons/statuses/generic.png","name":"Integrated","id":"10017","statusCategory":{"self":"https://jirainstance.com/rest/api/2/statuscategory/4","id":4,"key":"indeterminate","colorName":"yellow","name":"In Progress"}}}}


That can cause a confusion for me if I try to grep for the status because there are two different possible status: "INTEGRATED" and "IN PROGRESS"

 

Thanks and Regards

1 answer

0 votes
Nic Brough -Adaptavist-
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.
October 2, 2018

I'm afraid not, it's returning all the status detail you might need, including the status category.  There's no way to drop bits of the status response.

albertogarci86 October 3, 2018

Thanks Nic,

I will try to perform a better grep then.

 

Regards

mb
Contributor
April 6, 2022

Hello, according to https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/ there is {{issue.status.name}} now. I used it in Jira Automation and it's working.

Suggest an answer

Log in or Sign up to answer