Hi ,
I’ve created custom field which is a dropdown. So, for that I am adding the options dynamically using the below APIs
API URL'S
1. /rest/api/3/field/${fieldId}/context
2. /rest/api/3/field/${fieldId}/context/${globalContext.id}/option
The options are added successfully, but it is not project specific. The options are visible under all the projects under my account. So i need a way to apply project scope for each option I create.
Any guidance or insights from the community on how to proceed functionality it would be greatly appreciated.
I’ve attached the relevant code snippet below.
Thanks in advance for your help!
Good Morning Vitheya!
I can see in this code snipet
const globalContext = contextData.values.find(ctx => ctx.isGlobalContext);
that you chose the global context of the field, which is the reason why it shows up in all projects.
You would need to define a new context for each set of projects you want your field to have different options in.
const targetContext = contextData.values.find(ctx => ctx.name === "specific Context");
You can read more about contexts here:
https://support.atlassian.com/jira-cloud-administration/docs/configure-custom-field-context/
Hope that was helpful. Let me know if you need more help!
Regards,
Jaime Escribano
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.