Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Making Jira custom field required by using java atlassian sdk

Vivek Chauhan April 22, 2025

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!

2 answers

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2025

Hi @Vivek Chauhan 

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

0 votes
Tinker Fadoua
Community Champion
April 22, 2025

@Vivek Chauhan 

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

Vivek Chauhan April 23, 2025

@Tinker Fadoua 

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.

Tinker Fadoua
Community Champion
April 23, 2025

Unfortunately I am only familiar with ScriptRunner. Let me request Atlassian's help.

Best of luck!

Fadoua

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events