public class EarliestUnreleasedVersionFunction extends AbstractVersionsFunction
Projects are resolved by project key first, then name, then id. Only Versions from Projects which the current user can browse will be returned.
Modifier and Type | Field and Description |
---|---|
static String |
FUNCTION_EARLIEST_UNRELEASED_VERSION |
permissionManager, projectIndexInfoResolver
Constructor and Description |
---|
EarliestUnreleasedVersionFunction(VersionManager versionManager,
ProjectResolver projectResolver,
PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
protected Collection<Version> |
getAllVersions(ApplicationUser user) |
List<QueryLiteral> |
getValues(QueryCreationContext queryCreationContext,
FunctionOperand operand,
TerminalClause terminalClause)
Gets the unexpanded values provided by the user on input.
|
protected Collection<Version> |
getVersionsForProject(Long projectId) |
createIndexInfoResolver, getDataType, getMinimumNumberOfExpectedArguments, sanitiseOperand, validate
getFunctionName, getI18n, getModuleDescriptor, init, isList, validateNumberOfArgs
public static final String FUNCTION_EARLIEST_UNRELEASED_VERSION
public EarliestUnreleasedVersionFunction(VersionManager versionManager, ProjectResolver projectResolver, PermissionManager permissionManager)
@Nonnull public List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause)
JqlFunction
Gets the unexpanded values provided by the user on input. This is the output values that will later be transformed into index values.
For example, a function who returns all the released versions of a specified project should return QueryLiteral
s representing the ids of those versions. For correctness, always opt
to return the most specific identifier for the object; if you can return either the id (which is stored in the
index) or a string name (that would require resolving to get the index value), choose the id.
getValues
in interface JqlFunction
getValues
in class AbstractVersionsFunction
queryCreationContext
- the context of query creationoperand
- the operand to get values fromterminalClause
- the terminal clause that contains the operandprotected Collection<Version> getAllVersions(ApplicationUser user)
getAllVersions
in class AbstractVersionsFunction
protected Collection<Version> getVersionsForProject(Long projectId)
getVersionsForProject
in class AbstractVersionsFunction
projectId
- the id of the Project
which the versions belong toCopyright © 2002-2021 Atlassian. All Rights Reserved.