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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,558,804
Community Members
 
Community Events
184
Community Groups

how to display customfield options(dropdown values) if it does not have any context associated

customfield_15000 does not have any context associated and I want to display all dropdowns present for the same custom field but as I do not have context id I am not able to use below rest api.

GET /rest/api/3/customField/{fieldId}/context/{contextId}/option

 

and when tried to get the custom fields options using below link I am getting 405 as method not allowed

/rest/api/latest/customFieldOption?fieldId=customfield_15000

1 answer

0 votes
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

Hi @Tushar Wagh 

WHat do you mean by there is no context associated with the custom field? If you have deleted the context, then you can't have any values on that CF. Can you post a screenshot of your custom field? Cog wheel > issues > custom fields > find you custom field and click "context and default value"

I guess that custom field will be having a global context assigned but I want that context id so that I can use the below API to display the values for customfield.

 

GET /rest/api/3/customField/customfield_15000/context/{contextId}/option

 

Just to let you know that I do not have UI access and just have the programmatic access.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

Try this then 

GET /rest/api/3/field/{fieldId}/context

and see all available contexts. Then get the corresponding ID:

context id.png

Yes tried the same but getting the same error as below

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
<status-code>404</status-code>
</status>
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

Are you on cloud or on premise? From the request you sent it seems to me that you are on premise and not on cloud.

I am using my local pc.

Working fine when displaying the tickets using below URL but just not working for context.

/rest/api/latest/issue/MCC-1023940

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

The api you are using, and the one I provided, are for the cloud version of jira, and not for on premise.

then for on premise which one I can use ?

Is there any API document available on the same ?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

Here you'll find the rest api for server https://docs.atlassian.com/software/jira/docs/api/REST/9.7.0/

Thanks for the help @Alex Koxaras _Relational_ 

I am using below API from above document and it is giving me 404 not found error.

GET /rest/api/2/customFields/{customFieldId}/options

 

Error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
<status-code>404</status-code>
</status>
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 10, 2023

What is your server version @Tushar Wagh ? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events