Class ProjectsLeadByUserFunction
java.lang.Object
com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
com.atlassian.jira.plugin.jql.function.ProjectsLeadByUserFunction
- All Implemented Interfaces:
JqlFunction
This function returns a list of projects lead by a user.
This function expects zero or one argument. If zero arguments are supplied the current logged in user will be used as project lead.
- Since:
- v4.2
-
Field Summary
FieldsFields inherited from class com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
globalPermissionManager, userManager -
Constructor Summary
ConstructorsConstructorDescriptionProjectsLeadByUserFunction(PermissionManager permissionManager, ProjectManager projectManager, UserManager userManager, GlobalPermissionManager globalPermissionManager) -
Method Summary
Modifier and TypeMethodDescriptionProvides theJiraDataTypethat this function handles and creates values for.protected List<QueryLiteral>getFunctionValuesList(QueryCreationContext queryCreationContext, FunctionOperand functionOperand, ApplicationUser user) Get the function return values based on the actual user.protected StringGet the I18n message key for the error when the passed in user does not exist.Methods inherited from class com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
getMessageForDisallowedAnonymousAccess, getMinimumNumberOfExpectedArguments, getValues, isAnonymousAccessAllowed, validate, validateQueryMethods inherited from class com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
getFunctionName, getI18n, getModuleDescriptor, init, isList, validateNumberOfArgs
-
Field Details
-
FUNCTION_PROJECTS_LEAD_BY_USER
- See Also:
-
-
Constructor Details
-
ProjectsLeadByUserFunction
public ProjectsLeadByUserFunction(PermissionManager permissionManager, ProjectManager projectManager, UserManager userManager, GlobalPermissionManager globalPermissionManager)
-
-
Method Details
-
getDataType
Description copied from interface:JqlFunctionProvides theJiraDataTypethat this function handles and creates values for. This allows us to infer some information about how it will interact with other elements in the system.For example, if this returns
JiraDataTypes.DATEthen we know that we can provide values for any clauses that also specify a data type of DATE.- Returns:
- the JiraDataType that this function produces values for. Cannot be null.
- See Also:
-
getFunctionValuesList
protected List<QueryLiteral> getFunctionValuesList(QueryCreationContext queryCreationContext, FunctionOperand functionOperand, ApplicationUser user) Description copied from class:AbstractUserBasedFunctionGet the function return values based on the actual user. transformed into index values.- Specified by:
getFunctionValuesListin classAbstractUserBasedFunction- Parameters:
queryCreationContext- the context of query creationfunctionOperand- the operand to get values fromuser- the user- Returns:
- a List of objects that represent this Operands raw values. Cannot be null.
-
getUserNotFoundMessageKey
Description copied from class:AbstractUserBasedFunctionGet the I18n message key for the error when the passed in user does not exist.- Specified by:
getUserNotFoundMessageKeyin classAbstractUserBasedFunction- Returns:
- message key.
-