public interface

ProjectFieldLayoutSchemeHelper

com.atlassian.jira.issue.fields.ProjectFieldLayoutSchemeHelper
Known Indirect Subclasses

Class Overview

A number of useful field layout scheme methods, particularly to do with "active" field layouts.

A field layout is only considered "active" if it is currently actually being used by a project. This means it is active if:

  1. The field layout is mapped to an issue type in the project's scheme and the project has that issue type.
  2. The field layout is a default for the project's scheme and there are some unmapped issue types.

Internal helper class for Project Configuration.

Summary

Public Methods
List<Project> getProjectsForFieldLayout(FieldLayout fieldLayout)
Returns a list of the projects are currently using the passed field layout, and the field layout is active.
Multimap<FieldLayoutProject> getProjectsForFieldLayouts(Set<FieldLayout> fieldLayouts)
Like getProjectsForFieldLayout(com.atlassian.jira.issue.fields.layout.field.FieldLayout), but takes a set of fieldLayouts and returns a multimap of FieldLayouts -> Active projects
List<Project> getProjectsForScheme(Long schemeId)
Return a list of projects that use the field layout scheme with the passed query.

Public Methods

public List<Project> getProjectsForFieldLayout (FieldLayout fieldLayout)

Returns a list of the projects are currently using the passed field layout, and the field layout is active.

Only projects that the current user can change the configuration for will be returned.

Parameters
fieldLayout the name of the field layout the check.
Returns
  • a list of active projects. The list is sorted by project name. The list is mutable and can be changed by the caller safely.

public Multimap<FieldLayoutProject> getProjectsForFieldLayouts (Set<FieldLayout> fieldLayouts)

Like getProjectsForFieldLayout(com.atlassian.jira.issue.fields.layout.field.FieldLayout), but takes a set of fieldLayouts and returns a multimap of FieldLayouts -> Active projects

Parameters
fieldLayouts Field layouts to get projects for
Returns

public List<Project> getProjectsForScheme (Long schemeId)

Return a list of projects that use the field layout scheme with the passed query. Only projects that the passed user can change the configuration for will be returned.

Parameters
schemeId the scheme id query. Null can be passed to search for the magical system default field layout scheme.
Returns
  • a list of projects that use the scheme. The list is sorted by project name. The list is mutable and can be changed by the caller safely.