Can i get issue key based on Customized field value? Edited

Hi 

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

Am executing in POSTMAN.

 

Any leads please help me

1 answer

1 vote

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?

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

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?

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   

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"

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

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.

customfield_14803 is available ,And also its logged.

What about using the right REST call? 

Above error  is  getting through with REST call 

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.

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": {}
}

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

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'

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."

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

218 views 2 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you