Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to pass a custom filed in jql to JIRA search API

mparida002
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!
Sep 27, 2023

Hi,

 

I have a custom fields to get the Sprint name and below is the response of that field.

 

"customfield_10871": [
"com.atlassian.greenhopper.service.sprint.Sprint@6ae1a392[id=70070,rapidViewId=14762,state=CLOSED,name=14 ABCXXXDDD4.1,startDate=2023-01-25T18:17:00.000-05:00,endDate=2023-02-07T23:17:00.000-05:00,completeDate=2023-02-07T11:28:50.010-05:00,activatedDate=2023-01-25T18:17:44.213-05:00,sequence=70070,goal=<null>,autoStartStop=false]"
]

Field description as below

 

{
"id": "customfield_10871",
"name": "Sprint",
"custom": true,
"orderable": true,
"navigable": true,
"searchable": true,
"clauseNames": [
"cf[10871]",
"Sprint"
],
"schema": {
"type": "array",
"items": "string",
"custom": "com.pyxis.greenhopper.jira:gh-sprint",
"customId": 10871
}
},

 

 

Now I want to pass the Sprint name as "14 ABCXXXDDD4.1" while doing search. How to do it? Can some on give an idea and help me? I am using like below but it fetches all issues in the JIRA and null in customfield_10871

 

https://enpoint.com/search?fields=id,key,description,summary,status,assignee,project,fixVersions,customfield_10871

request Body:

{
"jql": "customfield_10871 ~ \"14 SABCXXXDDD4.1\""
}

 

or curl as 

 

curl --location --request GET 'endpoint.com/search' \
--header 'client_id: xx' \
--header 'client_secret: xx' \
--header 'idp-trace-id: xx' \
--header 'x-transaction-id: xx' \
--header 'Cookie: ixp=xx; ixp=xx; ixp=xx; ixp=xx' \
--header 'Content-Type: application/json' \
--data '{
"jql": "customfield_10871 ~ \"14 SABCXXXDDD4.1\""
}'

 

0 answers

Suggest an answer

Log in or Sign up to answer