Trying to get the following custom JQL Function working in data center.
To compare a custom field and check if its group value is in the list of groups that the current user is a member of.
package com.onresolve.jira.groovy.jql
import com.atlassian.jira.JiraDataType
import com.atlassian.jira.JiraDataTypes
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.jql.operand.QueryLiteral
import com.atlassian.jira.jql.query.QueryCreationContext
import com.atlassian.jira.permission.ProjectPermissions
import com.atlassian.jira.project.version.VersionManager
import com.atlassian.query.clause.TerminalClause
import com.atlassian.query.operand.FunctionOperand
class AssignedToMyGroups extends AbstractScriptedJqlFunction implements JqlFunction {
def versionManager = ComponentAccessor.getComponent(VersionManager)
def permissionManager = ComponentAccessor.getPermissionManager()
@Override
String getDescription() {
"Issues where Group field is one of My Groups"
}
@Override
List<Map> getArguments() {
Collections.EMPTY_LIST // <1>
}
@Override
String getFunctionName() {
"AssignedToMyGroups"
}
@Override
JiraDataType getDataType() {
JiraDataTypes.VERSION // <2>
}
def groupManager = ComponentAccessor.groupManager
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
final username = loggedInUser.username
@Override
List<QueryLiteral> getValues(
groupManager.getGroupNamesForUser(username)
)
}
Yes, your old licences will be taken into account.
John,
All info about your license can be found below.
https://www.atlassian.com/licensing/jira-core#serverlicenses-8
Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.