public class DefaultJqlQueryTransformer extends Object implements JqlQueryTransformer
Constructor and Description |
---|
DefaultJqlQueryTransformer(CustomFieldManager customFieldManager,
ConstantsManager constantsManager,
JqlQueryParser jqlQueryParser,
FieldManager fieldManager) |
Modifier and Type | Method and Description |
---|---|
Query |
transformIdsToNames(Query query)
Returns a Query object whose fields ids are replaced by fields names.
|
Query |
transformIdsToNames(String query)
Returns a Query object whose fields ids are replaced by fields names.
|
Query |
transformNamesToIds(Query query)
Returns a Query object whose fields names are replaced by fields ids.
|
Query |
transformNamesToIds(String query)
Returns a Query object whose fields names are replaced by fields ids.
|
public DefaultJqlQueryTransformer(CustomFieldManager customFieldManager, ConstantsManager constantsManager, JqlQueryParser jqlQueryParser, FieldManager fieldManager)
public Query transformNamesToIds(Query query)
JqlQueryTransformer
JqlStringSupport.generateJqlString(Query query)
instead of
Query.getQueryString()
.
If the field's name in the query corresponds to more than one field, it will be replaced by all the corresponding IDs connected by an OR clause. For example, for the name 'Version' which is shared by custom fields {'cf[10000]', 'cf[10001]'}, the input query 'Version = 8.15' will result in the following output query: 'cf[10000] = 8.15 OR cf[10001] = 8.15'
transformNamesToIds
in interface JqlQueryTransformer
query
- a query to be transformedpublic Query transformNamesToIds(String query) throws JqlParseException
JqlQueryTransformer
JqlStringSupport.generateJqlString(Query query)
instead of
Query.getQueryString()
.
If the field's name in the query corresponds to more than one field, it will be replaced by all the corresponding IDs connected by an OR clause. For example, for the name 'Version' which is shared by custom fields {'cf[10000]', 'cf[10001]'}, the input query 'Version = 8.15' will result in the following output query: 'cf[10000] = 8.15 OR cf[10001] = 8.15'
transformNamesToIds
in interface JqlQueryTransformer
query
- a string query to be transformedJqlParseException
- if an error occurs while parsing the query.public Query transformIdsToNames(Query query)
JqlQueryTransformer
A name is ambiguous when two or more fields have the same name but different ids, for example, for fields whose name is 'Version' and ids are {'cf[10020]', 'cf[10030]'}, the input query 'cf[10020] = 8.13 OR cf[10030] = 8.16' will result in the same output query.
Fields which will be transformed are Custom Fields and Issue Types.
To generate a JQL string representation, use JqlStringSupport.generateJqlString(Query query)
instead of
Query.getQueryString()
.
transformIdsToNames
in interface JqlQueryTransformer
query
- a query to be transformedpublic Query transformIdsToNames(String query) throws JqlParseException
JqlQueryTransformer
A name is ambiguous when two or more fields have the same name but different ids, for example, for fields whose name is 'Version' and ids are {'cf[10020]', 'cf[10030]'}, the input query 'cf[10020] = 8.13 OR cf[10030] = 8.16' will result in the same output query.
Fields which will be transformed are Custom Fields and Issue Types.
To generate a JQL string representation, use JqlStringSupport.generateJqlString(Query query)
instead of
Query.getQueryString()
.
transformIdsToNames
in interface JqlQueryTransformer
query
- a string query to be transformedJqlParseException
- if an error occurs while parsing the query.Copyright © 2002-2024 Atlassian. All Rights Reserved.