@com.adaptavist.hapi.platform.analytics.Tracked class Issues extends java.lang.Object
| Constructor and description |
|---|
Issues() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static long |
count(java.lang.String jql)Returns the number of matching issues. |
|
static long |
count(com.atlassian.query.Query query)Returns the number of matching issues. |
|
static long |
count(com.atlassian.jira.issue.search.SearchRequest searchRequest)Returns the number of matching issues. |
|
static long |
count(com.atlassian.jira.issue.search.SearchQuery searchQuery)Returns the number of matching issues. |
|
static long |
countOverrideSecurity(java.lang.String jql)Returns the number of matching issues, overriding security |
|
static long |
countOverrideSecurity(com.atlassian.query.Query query)Returns the number of matching issues, overriding security |
|
static long |
countOverrideSecurity(com.atlassian.jira.issue.search.SearchRequest searchRequest)Executes a filter and returns a count of the matching issues, overriding security |
|
static com.atlassian.jira.issue.Issue |
create(java.lang.String projectKey, java.lang.String issueType, groovy.lang.Closure<?> specification)Creates an issue of a given type in a project found by project key, example usage:
Issues.create('SR', 'Task') {
summary = 'Hello world'
} |
|
static com.atlassian.jira.issue.Issue |
create(java.lang.String projectKey, int issueTypeId, groovy.lang.Closure<?> specification)Creates an issue of a given type in a project found by project key, example usage:
Issues.create('SR', 1001) {
summary = 'Hello world'
} |
|
static com.atlassian.jira.issue.Issue |
create(com.atlassian.jira.project.Project project, com.atlassian.jira.issue.issuetype.IssueType issueType, groovy.lang.Closure<?> specification)Creates an issue of a given type in a project, example usage:
Issues.create(Projects.getByKey('SR'), IssueTypes.getByName('Task')) {
summary = 'Hello world'
} |
|
static com.atlassian.jira.issue.Issue |
getByKey(java.lang.String issueKey)Gets an issue by its current key |
|
static IssueIterator |
search(java.lang.String jql)Executes the jql and returns matching issues. |
|
static IssueIterator |
search(com.atlassian.query.Query query)Executes a Query and returns matching issues. |
|
static IssueIterator |
search(com.atlassian.jira.issue.search.SearchQuery searchQuery)Executes a SearchQuery and returns matching issues. |
|
static IssueIterator |
search(com.atlassian.jira.issue.search.SearchRequest searchRequest)Executes a filter and returns the matching issues. |
|
static IssueIterator |
searchOverrideSecurity(java.lang.String jql)Executes the jql and returns matching issues, overriding security. |
|
static IssueIterator |
searchOverrideSecurity(com.atlassian.query.Query query)Executes the Query and returns matching issues, overriding security. |
|
static IssueIterator |
searchOverrideSecurity(com.atlassian.jira.issue.search.SearchRequest searchRequest)Executes a filter and returns matching issues, overriding security. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Returns the number of matching issues.
jql - A jql queryReturns the number of matching issues.
query - query to find issues that will be countedReturns the number of matching issues.
searchRequest - the SearchRequest object representing the filter See: Filters.getByIdReturns the number of matching issues.
searchQuery - searchQuery to find issues that will be countedReturns the number of matching issues, overriding security
jql - A jql queryReturns the number of matching issues, overriding security
query - query to find issues that will be countedExecutes a filter and returns a count of the matching issues, overriding security
searchRequest - the SearchRequest object representing the filter See: Filters.getByIdCreates an issue of a given type in a project found by project key, example usage:
Issues.create('SR', 'Task') {
summary = 'Hello world'
}projectKey - project key of the project to create the issue inissueType - issue type for the issuespecification - closure containing parameters to set on the created issueCreates an issue of a given type in a project found by project key, example usage:
Issues.create('SR', 1001) {
summary = 'Hello world'
}projectKey - project key of the project to create the issue inissueTypeId - issue type ID for the issuespecification - closure containing parameters to set on the created issueCreates an issue of a given type in a project, example usage:
Issues.create(Projects.getByKey('SR'), IssueTypes.getByName('Task')) {
summary = 'Hello world'
}project - project to create the issue inissueType - issue type for the issuespecification - closure containing parameters to set on the created issueGets an issue by its current key
issueKey - issue keyExecutes the jql and returns matching issues. You can iterate over the issues in the response, for example to edit or transition each one:
Issues.search('project = FOO').each {
// do something with it
}
Or filter them further:
Issues.search('project = FOO').findAll {
// condition
}
If you only need the top N:
Issues.search('project = FOO').take(10)
DO NOT attempt to convert a potentially unlimited set to a List, e.g.:
Issues.search('project = FOO').toList()
as this could potentially consume a large amount of memory.
If you need a list then limit it to the top N:
Issues.search('project = FOO').take(100).toList()
jql - A jql queryExecutes a Query and returns matching issues.
query - query to find issuesExecutes a SearchQuery and returns matching issues.
searchQuery - searchQuery to find issuesExecutes a filter and returns the matching issues.
searchRequest - the SearchRequest object representing the filter See: Filters.getByIdExecutes the jql and returns matching issues, overriding security.
jql - A jql queryExecutes the Query and returns matching issues, overriding security.
query - query to find issuesExecutes a filter and returns matching issues, overriding security.
searchRequest - the SearchRequest object representing the filter See: Filters.getById