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 Service-img-1

Atlassian migration

To Server. To Cloud. To Data Center. Server to Server. Cloud to Cloud. To Atlassian.
go to page
Services
Atlassian Products Configuration Service-img-1

Atlassian configuration

Jira Software. Confluence. Jira Service Desk. Atlassian addons. Custom scripting.
go to page
Services
Agile Training-img-1

Training

Fast start. Agile. ITSM. Atlassian.
go to page
Services
Atlassian Support Service-img-1

Support

Technical support 24/7. Health check. Upgrade. Data protection. Managed Services.
go to page
Services
Atlassian Installation Service-img-1

Installation

Choosing Atlassian products. Atlassian product at your service. Installing Atlassian in the cloud or server...
go to page
Services
Agile Consulting Service-img-1

Consulting

Audit. Jira Add-ons. Agile. ITIL/ITSM. User management. Team collaboration. Asset management...
go to page
Services
Cloud Migration Service-img-1

Hosting

Migration to Atlassian Cloud. Private cloud. Public cloud.
go to page
Services
Agile Portfolio Management Service-img-1

Portfolio management

Audit. Design. Launch. Support.
go to page
Services
Atlassian Products Licensing Services-img-1

Licensing

Buying. Renewal. Managed licenses.
go to page
Services
CI/CD Devops-img-1

CI/CD + DevOps

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

Use form to contact us