Hello Atlassian Community,
I'm developing a plugin for Jira Data Center using the Atlassian SDK and Java. I need to create a custom field and ensure it's marked as required during issue creation. While I can create the custom field using the CustomFieldManager, I haven't found a method to set it as required programmatically.
Could someone guide me on how to enforce a custom field as required through code? Is there an API or approach to achieve this, or is it only possible via field configurations in the UI? I want to do it by java code itself, and not by running any scripts.
Any insights or examples would be greatly appreciated!
I understand you are using the SDK to try to create a required field in Jira Data Center. I would recommend creating an Ecosystem support ticket over in https://ecosystem.atlassian.net/servicedesk/customer/portal/34/group/3534/create/4180 or reaching out in the developer community https://community.developer.atlassian.com/
Regards,
Andy
Why giving yourself extra work when it is a native functionality of Jira? Yo can use Custom Field Configuration as long as the scheme is not being shared with other projects where if you make the field required it could be a problem.
Do you have any Atlassian Marketplace App?
Best,
Fadoua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right that Jira natively supports setting fields as required through Field Configuration, and for many use cases that works well. However, in this case, I'm developing a custom plugin where all project configuration, including custom field creation and behavior needs to be handled programmatically as part of the app setup.
The goal is to automate the setup completely without relying on any manual UI configuration.
To clarify, I'm not using any Marketplace app this is a custom-built solution tailored for specific Jira Data Center environments.
If there's any way to mark a custom field as required via Java code perhaps by interacting with Field Configuration objects or related APIs, I’d love to know more.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately I am only familiar with ScriptRunner. Let me request Atlassian's help.
Best of luck!
Fadoua
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.