org.sonar.api.issue
Interface RubyIssueService
- All Superinterfaces:
- ServerComponent
public interface RubyIssueService
- extends ServerComponent
Facade for JRuby on Rails extensions to request issues.
Reference from Ruby code : Api.issues
- Since:
- 3.6
find
IssueQueryResult find(String issueKey)
- Search for an issue by its key.
Ruby example:
result = Api.issues.find('ABCDE-12345')
find
IssueQueryResult find(Map<String,Object> parameters)
- Search for issues.
Ruby example:
Api.issues.find({'statuses' => ['OPEN', 'RESOLVED'], 'assignees' => 'john,carla')}
Keys of parameters must be Ruby strings but not symbols. Multi-value parameters can be arrays (['OPEN', 'RESOLVED']
) or
comma-separated list of strings ('OPEN,RESOLVED'
).
Optional parameters are:
- 'issues': list of issue keys
- 'severities': list of severity to match. See constants in
Severity
- 'statuses': list of status to match. See constants in
Issue
- 'resolutions': list of resolutions to match. See constants in
Issue
- 'resolved': true to match only resolved issues, false to match only unresolved issues. By default no filtering is done.
- 'components': list of component keys to match, for example 'org.apache.struts:struts:org.apache.struts.Action'
- 'componentRoots': list of keys of root components. All the issues related to descendants of these roots are returned.
- 'rules': list of keys of rules to match. Format is <repository>:<rule>, for example 'squid:AvoidCycles'
- 'actionPlans': list of keys of the action plans to match. Note that plan names are not accepted.
- 'planned': true to get only issues associated to an action plan, false to get only non associated issues. By default no filtering is done.
- 'reporters': list of reporter logins. Note that reporters are defined only on "manual" issues.
- 'assignees': list of assignee logins.
- 'assigned': true to get only assigned issues, false to get only unassigned issues. By default no filtering is done.
- 'createdAfter': match all the issues created after the given date (inclusive).
Both date and datetime ISO formats are supported: 2013-05-18 or 2010-05-18T15:50:45+0100
- 'createdBefore': match all the issues created before the given date (exclusive).
Both date and datetime ISO formats are supported: 2013-05-18 or 2010-05-18T15:50:45+0100
- 'pageSize': maximum number of results per page. Default is
IssueQuery.DEFAULT_PAGE_SIZE
,
except when the parameter 'components' is set. In this case there's no limit by default (all results in the same page).
- 'pageIndex': index of the selected page. Default is 1.
- 'sort': field to sort on. See supported values in
IssueQuery
- 'asc': ascending or descending sort? Value can be a boolean or strings 'true'/'false'
Copyright © 2009-2013 SonarSource. All Rights Reserved.