Forums

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

Can i get issue key based on Customized field value?

venkat January 8, 2018

Hi 

Wanna  retrieve the Issue key based on input as Customized field value.

Am executing in POSTMAN.

 

Any leads please help me

2 answers

1 vote
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.
January 8, 2018

I'm afraid "issue key based on input as customised field value" does not make any sense.

The use of Postman suggests you're using the REST API, but it's not clear what you actually want to do.  Please explain?

venkat January 8, 2018

Hi Brough,

I have an requirement where all issue keys has been  with unique customized field values.

 

But I need the issue key number based on the unique customized filed value as input.

Am using REST API thru post man to get the issue key value.

 

Thanks

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.
January 8, 2018

I'm afraid you have simply repeated the question in much the same way, and it is not clear from that what you are looking for.

Let us forget REST for a second, could you explain what you would do as a user in Jira to do this?  What would you go to and enter?

venkat January 8, 2018

I have list of 10  issue Keys Lets say from 1-10

Each issue key is having one  customized field contains unique number.

 

My Question is 

I know the Unique number but not the  corresponding issue key

 

How can i get the issue key based on Customized field unique number through REST API   

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.
January 8, 2018

Ah, I see, thank you!

Use the search - https://developers.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-query-issues

You should be able to build a query for "customfield_x ~ your key"

venkat January 8, 2018

Hi,

 

I tried with 

 

https://xxxxxxxxx/rest/api/2/search?jql=customfield_14830=xxxxxxx

 

But got response as 

 

{
"errorMessages": [
"Field 'customfield_14803' does not exist or you do not have permission to view it."
],
"errors": {}
}

 

But customfield_14803 is exists

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.
January 8, 2018

Your error message does not match what you're posting - check the custom field number again!

Also check you are logging in ok - try to fetch a whole issue and see if that says you can see it.

venkat January 9, 2018

customfield_14803 is available ,And also its logged.

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.
January 9, 2018

What about using the right REST call? 

venkat January 9, 2018

Above error  is  getting through with REST call 

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.
January 9, 2018

I am sorry, but you are missing the point.  Please re-read the numbers in the url and the error message you gave earlier.  They are different, so it looks like you are giving us an edited response from an incorrect url, or an edited url with a different response.

Try the right url and give us the actual error.

venkat January 10, 2018

Sorry in url custom field number was wrong but i tried with proper numbers but facing same error

 

https://xxxxxxxxx/rest/api/2/search?jql=customfield_14803=xxxxxxx

{
"errorMessages": [
"Field 'customfield_14803' does not exist or you do not have permission to view it."
],
"errors": {}
}

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.
January 10, 2018

Hmm.  Could you try replacing customfield_14803 with cf[14803] ?

venkat January 10, 2018

Hi Brough

Great. 

Its working ... :)

Thanks for the help...

 

Appreciate your support...

 

Its worked for below

 

https://xxxxxxxxxxx/rest/api/2/search?jql=cf[14803]="xxxxxxxxxx"&maxResults=2&fields=id,key'

venkat January 24, 2018

Hi Bough,

Am not facing any issue in version 

  • v7.2.8#72010-sha1:dc33de3:node2

But  its throwing below  error for the version 

  • (v7.2.8#72010-sha1:dc33de3

 

 "The operator '=' is not supported by the 'cf[14803]' field."

0 votes
Jessica Gutierrez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 4, 2021

Does this solution still work with the latest version? I get a 400 response code for the customize field url 

https://dpmain.com/rest/api/2/search?maxResults=500&jql=cf[10025]='xxxxxxxxx'&fields=id,key,issuetype,status,customfield_10025 

Suggest an answer

Log in or Sign up to answer