Blog post

Tip of the Week: How to Сheck The Custom Field Visibility on The Screen

Home    —    Blog    —    Tip of the Week: How to Сheck The Custom Field Visibility on The Screen
Aleks Zuevich
Posted by Aleks Zuevich
January 19, 2017

If you need to check if the custom field is visible on the screen you need to:

  • Get issue type screen scheme for the issue project;
  • Get effective field screen scheme for the issue type;
  • Get field screen for the issue operation;
  • Check if the field screen contains the custom field.
public boolean isVisible(Issue issue, CustomField progressField) {

  IssueTypeScreenScheme issueTypeScreenScheme = issueTypeScreenSchemeManager.
          getIssueTypeScreenScheme(issue.getProjectObject());

  FieldScreenScheme fieldScreenScheme = issueTypeScreenScheme.
          getEffectiveFieldScreenScheme(issue.getIssueTypeObject());

  FieldScreen fieldScreen = fieldScreenScheme.
          getFieldScreen(IssueOperations.VIEW_ISSUE_OPERATION);

  return fieldScreen.containsField(progressField.getId());

}

This method could be useful, for example when you create a web panel to be displayed if the custom field is visible on the issue view screen.

Other services by Polontech

Services

Atlassian migration

To Server. To Cloud. To Data Center. Server to Server. Cloud to Cloud. To Atlassian.
go to page
Services

Atlassian configuration

Jira Software. Confluence. Jira Service Desk. Atlassian addons. Custom scripting.
go to page
Services

Training

Fast start. Agile. ITSM. Atlassian.
go to page
Services

Support

Technical support 24/7. Health check. Upgrade. Data protection. Managed Services.
go to page
Services

Installation

Choosing Atlassian products. Atlassian product at your service. Installing Atlassian in the cloud or server...
go to page
Services

Consulting

Audit. Jira Add-ons. Agile. ITIL/ITSM. User management. Team collaboration. Asset management...
go to page
Services

Hosting

Migration to Atlassian Cloud. Private cloud. Public cloud.
go to page
Services

Portfolio management

Audit. Design. Launch. Support.
go to page
Services

Licensing

Buying. Renewal. Managed licenses.
go to page
Services

CI/CD + DevOps

DevOps strategy. Commit. Build. Test. Deploy.
go to page

Use form to contact us