When i access custom field value i'm getting integer value instead of String value.How can i get String value of custom field?
When i access following url i got the below response
Request url:
https://xxxxxxxxxxxxxxx.atlassian.net/rest/agile/1.0/issue/xxxx-2583?fields=customfield_10001
Response:
{
"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations",
"id": "37163",
"self": "https://xxxxxxxxxxxx.atlassian.net/rest/agile/1.0/issue/37163",
"key": "xxxx-2583",
"fields": {
"customfield_10001": "6"
}
}
I want to get string value of custom field.
Hi, Sneha.
From what it looks, based on the JSON response, the value of the custom field should already be a string because of the double quotes.
Can you tell how are you handling this response? Are you doing this within a script or program, if so, which programming language are you using?
Also, can you tell which type of field is your custom field, e.g. select list, text field, number field, etc? I would like to test this on my end.
Kind regards,
Maurício Karas
Hi Mauricio,
My Custom Field is Portfolio team. I am using accessing it via Jira api using Java programming language.
Thanks,
Sneha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this case, isn't it possible for you to cast the value from int to string after receiving the response from Jira? I mean, within Java.
Are you getting any errors or unexpected behavior?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.