Get only value from a text field

albertogarci86 June 25, 2018

Hi all,

 

Do you know any way to get the text plain from a custom text field? 

Or do I have to do it formatting the json output?

I am trying using the rest api with curl, but I only want to receive the value.

 

Thanks in advance

1 answer

1 accepted

1 vote
Answer accepted
Alexey Matveev
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.
June 25, 2018

Hello,

You can not receive a plain text. There will be always a json string. You need to work with the json to get the value.

albertogarci86 June 25, 2018

Ok @Alexey Matveev. Thank you for confirm that

Regards!

albertogarci86 June 25, 2018

One last thing @Alexey Matveev

I get the field value executing:

 

curl -k -D- -u "user:pass" -X GET -H "Content-Type: application/json" https://jira.com/rest/api/2/issue/KEY-0?fields=customfield_111111

 

Is the best way to get only the value?

 

Regards

Alexey Matveev
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.
June 25, 2018

Yes, that is the best way

Suggest an answer

Log in or Sign up to answer