Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get mandatory fields list via API

Andrey Kuzmin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2015

Greetings.

Is there any way to list all mandatory fields for Issue Type in the Project via Java API?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Andrey Kuzmin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 22, 2015

Found out myself:

List<FieldLayoutItem> fieldLayoutItems = ComponentAccessor.getFieldLayoutManager().getFieldLayout(project, issueTypeId).getFieldLayoutItems();
for (FieldLayoutItem fieldLayoutItem : fieldLayoutItems) {
    if (fieldLayoutItem.isRequired()) {
        ...
    }
}
1 vote
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2015
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2015

(See the second section, "Discovering issue field data", and note that the fields specify whether or not they are "required".)

Like Amal_Kader likes this
Andrey Kuzmin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 14, 2015

Thanks, Chris! But I was really looking for some Java API, not REST. Do you by any chance have this kind of information?

Like Amal_Kader likes this
crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 22, 2015

Oh, sorry... I hadn't seen your response until now. Glad you found the answer you needed.

TAGS
AUG Leaders

Atlassian Community Events