-
-
Save starryknight64/f2bd93db2ca28d0eed8b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.onresolve.jira.groovy.jql | |
import com.atlassian.crowd.embedded.api.User | |
import com.atlassian.jira.jql.query.QueryCreationContext | |
import com.atlassian.jira.util.MessageSet | |
import com.atlassian.jira.util.MessageSetImpl | |
import com.atlassian.query.clause.TerminalClause | |
import com.atlassian.query.operand.FunctionOperand | |
import org.apache.lucene.search.Query | |
class ABC extends AbstractScriptedJqlFunction implements JqlQueryFunction { | |
def String subquery | |
@Override | |
String getDescription() { | |
"gets issues with ABC in the summary" | |
} | |
@Override | |
List<Map> getArguments() { | |
[ | |
[ | |
"description": "Subquery", | |
"optional": false, | |
] | |
] | |
} | |
@Override | |
String getFunctionName() { | |
"abcFunction" | |
} | |
@Override | |
MessageSet validate(User user, FunctionOperand operand, TerminalClause terminalClause) { | |
def messageSet = new MessageSetImpl() | |
if( operand.args.size() > 0 ) { | |
subquery = operand.args[0] | |
messageSet.addMessageSet(subQueryMessageSet) | |
} | |
messageSet | |
} | |
@Override | |
Query getQuery(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment