Can anyone help me to find any classes or methods in java to update field configuration by setting custom field as required.
I have found following method but I am not able to implement updateFieldLayoutItem method.
public void makeRequired(FieldLayoutItem fieldLayoutItem){ if (!getFieldManager().isRequirableField(fieldLayoutItem.getOrderableField())) { throw new IllegalArgumentException("Trying to require a field that is not requireable."); } // When requiring a field make it not hidden final FieldLayoutItem modified = new FieldLayoutItemImpl.Builder(fieldLayoutItem) .setHidden(false) .setRequired(true) .build(); updateFieldLayoutItem(fieldLayoutItem, modified);}
Community moderators have prevented the ability to post new answers.
A good point to start could be the documentation for Jira Sever (aimed to developers) which you can find here: https://docs.atlassian.com/software/jira/docs/api/8.22.6/
Please also find the start page which could be of further help:
https://developer.atlassian.com/server/
Please note that there are finally some Apps which probably cater the need. So it might make sense to have a look into Atlassian Marketplace in case you do not want to create the code from scratch by yourself.
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.