Class EarliestUnreleasedVersionFunction
java.lang.Object
com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
com.atlassian.jira.plugin.jql.function.AbstractVersionsFunction
com.atlassian.jira.plugin.jql.function.EarliestUnreleasedVersionFunction
- All Implemented Interfaces:
ClauseSanitisingJqlFunction,JqlFunction
Function that produces the last released version for any specified projects.
The versions are sequenced in the the user specified order (not the release date).
Projects are resolved by project key first, then name, then id. Only Versions from Projects which the current user can browse will be returned.
- Since:
- v4.3
-
Field Summary
FieldsFields inherited from class com.atlassian.jira.plugin.jql.function.AbstractVersionsFunction
permissionManager, projectIndexInfoResolver -
Constructor Summary
ConstructorsConstructorDescriptionEarliestUnreleasedVersionFunction(VersionManager versionManager, ProjectResolver projectResolver, PermissionManager permissionManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<Version>getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause) Gets the unexpanded values provided by the user on input.protected Collection<Version>getVersionsForProject(Long projectId) Methods inherited from class com.atlassian.jira.plugin.jql.function.AbstractVersionsFunction
createIndexInfoResolver, getDataType, getMinimumNumberOfExpectedArguments, sanitiseOperand, validateMethods inherited from class com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
getFunctionName, getI18n, getModuleDescriptor, init, isList, validateNumberOfArgs
-
Field Details
-
FUNCTION_EARLIEST_UNRELEASED_VERSION
- See Also:
-
-
Constructor Details
-
EarliestUnreleasedVersionFunction
public EarliestUnreleasedVersionFunction(VersionManager versionManager, ProjectResolver projectResolver, PermissionManager permissionManager)
-
-
Method Details
-
getValues
@Nonnull public List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause) Description copied from interface:JqlFunctionGets 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
QueryLiterals 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.- Specified by:
getValuesin interfaceJqlFunction- Overrides:
getValuesin classAbstractVersionsFunction- Parameters:
queryCreationContext- the context of query creationoperand- the operand to get values fromterminalClause- the terminal clause that contains the operand- Returns:
- a List of objects that represent this Operands raw values. Cannot be null.
-
getAllVersions
- Specified by:
getAllVersionsin classAbstractVersionsFunction- Returns:
- all the versions relevant to this function.
-
getVersionsForProject
- Specified by:
getVersionsForProjectin classAbstractVersionsFunction- Parameters:
projectId- the id of theProjectwhich the versions belong to- Returns:
- all the versions relevant to this function and the specified project
-