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

How to hide/unhide system field "Component/s" using behaviour

WindHub Support October 24, 2022

I've been searching through the questions but couldn't find a working way to hide the m field "Component/s"

I've been using this formula for custom fields:

def CountryField = getFieldByName("P-Country")
CountryField.setHidden(true);
what would be the equivalent way for "Component/s"?

2 answers

2 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 24, 2022

Hi,

You can try something like this:

import static com.atlassian.jira.issue.IssueFieldConstants.COMPONENTS
def components = getFieldById(COMPONENTS)



1 vote
Answer accepted
WindHub Support October 24, 2022

I think I've found the answer myself:

def ComponentsField = getFieldById("components")
ComponentsField.setRequired(false); ComponentsField.setHidden(true); ComponentsField.setFormValue(null);
TAGS
AUG Leaders

Atlassian Community Events