Package org.sonar.api.issue
Interface Issue
- 
- All Superinterfaces:
- java.io.Serializable
 
 public interface Issue extends java.io.Serializable- Since:
- 3.6
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intMESSAGE_MAX_SIZEMaximum number of characters in the message.static java.lang.StringRESOLUTION_ACKNOWLEDGEDSecurity Hotspot has been reviewed and acknowledged that it poses a risk.static java.lang.StringRESOLUTION_FALSE_POSITIVEDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringRESOLUTION_FIXEDstatic java.lang.StringRESOLUTION_REMOVEDDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringRESOLUTION_SAFESecurity Hotspot has been reviewed and resolved as safe.static java.lang.StringRESOLUTION_WONT_FIXDeprecated.since 10.4 in favor ofIssueStatusstatic java.util.List<java.lang.String>RESOLUTIONSDeprecated.since 10.4 in favor ofIssueStatusstatic java.util.List<java.lang.String>SECURITY_HOTSPOT_RESOLUTIONSstatic java.lang.StringSTATUS_CLOSEDDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringSTATUS_CONFIRMEDDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringSTATUS_IN_SANDBOXDeprecated.since 13.2 in favor ofIssueStatusstatic java.lang.StringSTATUS_OPENDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringSTATUS_REOPENEDDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringSTATUS_RESOLVEDDeprecated.since 10.4 in favor ofIssueStatusstatic java.lang.StringSTATUS_REVIEWEDstatic java.lang.StringSTATUS_TO_REVIEWstatic java.util.List<java.lang.String>STATUSESDeprecated.since 10.4 in favor ofIssueStatus
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Stringassignee()UUID of the user who is assigned to this issue.java.lang.StringauthorLogin()Login of the SCM account that introduced this issue.java.util.DatecloseDate()Date when status was set toSTATUS_CLOSED, else null.java.util.Collection<java.lang.String>codeVariants()java.lang.StringcomponentKey()Components are modules ("my_project"), directories ("my_project:my/dir") or files ("my_project:my/file.c").java.lang.StringcomponentUuid()java.util.DatecreationDate()Durationeffort()java.lang.Doublegap()Arbitrary distance to threshold for resolving the issue.booleanisCopied()During a scan returns true if the issue is copied from another branch.booleanisNew()During a scan return if the current issue is a new one.java.lang.Stringkey()Unique generated key.java.lang.Stringlanguage()java.lang.Integerline()Optional line number.java.lang.Stringmessage()java.lang.StringprojectKey()java.lang.StringprojectUuid()java.lang.Stringresolution()Deprecated.since 10.4 in favor ofIssueStatus.RuleKeyruleKey()java.lang.Stringseverity()See constants inSeverity.java.lang.Stringstatus()Deprecated.since 10.4 in favor ofIssueStatus.java.util.Collection<java.lang.String>tags()java.util.DateupdateDate()
 
- 
- 
- 
Field Detail- 
MESSAGE_MAX_SIZEstatic final int MESSAGE_MAX_SIZE Maximum number of characters in the message. In theory it should be 4_000 UTF-8 characters but unfortunately Oracle DB does not support more than 4_000 bytes, even if column issues.message is created with type VARCHAR2(4000 CHAR). In order to have the same behavior on all databases, message is truncated to 4_000 / 3 (maximum bytes per UTF-8 character) = 1_333 characters.- See Also:
- Constant Field Values
 
 - 
STATUS_OPEN@Deprecated(since="10.4") static final java.lang.String STATUS_OPEN Deprecated.since 10.4 in favor ofIssueStatusDefault status when creating an issue.- See Also:
- Constant Field Values
 
 - 
STATUS_CONFIRMED@Deprecated(since="10.4") static final java.lang.String STATUS_CONFIRMED Deprecated.since 10.4 in favor ofIssueStatus- See Also:
- Constant Field Values
 
 - 
STATUS_REOPENED@Deprecated(since="10.4") static final java.lang.String STATUS_REOPENED Deprecated.since 10.4 in favor ofIssueStatus- See Also:
- Constant Field Values
 
 - 
STATUS_RESOLVED@Deprecated(since="10.4") static final java.lang.String STATUS_RESOLVED Deprecated.since 10.4 in favor ofIssueStatus- See Also:
- Constant Field Values
 
 - 
STATUS_CLOSED@Deprecated(since="10.4") static final java.lang.String STATUS_CLOSED Deprecated.since 10.4 in favor ofIssueStatus- See Also:
- Constant Field Values
 
 - 
STATUS_IN_SANDBOX@Deprecated(since="13.2") static final java.lang.String STATUS_IN_SANDBOX Deprecated.since 13.2 in favor ofIssueStatus- See Also:
- Constant Field Values
 
 - 
RESOLUTION_FIXEDstatic final java.lang.String RESOLUTION_FIXED - See Also:
- Constant Field Values
 
 - 
RESOLUTION_FALSE_POSITIVE@Deprecated(since="10.4") static final java.lang.String RESOLUTION_FALSE_POSITIVE Deprecated.since 10.4 in favor ofIssueStatus- See Also:
- Constant Field Values
 
 - 
RESOLUTION_REMOVED@Deprecated(since="10.4") static final java.lang.String RESOLUTION_REMOVED Deprecated.since 10.4 in favor ofIssueStatusResolution when rule has been uninstalled or disabled in the Quality profile.- See Also:
- Constant Field Values
 
 - 
RESOLUTION_WONT_FIX@Deprecated(since="10.4") static final java.lang.String RESOLUTION_WONT_FIX Deprecated.since 10.4 in favor ofIssueStatusIssue is irrelevant in the context and was muted by user.- Since:
- 5.1
- See Also:
- Constant Field Values
 
 - 
RESOLUTION_SAFEstatic final java.lang.String RESOLUTION_SAFE Security Hotspot has been reviewed and resolved as safe.- Since:
- 8.1
- See Also:
- Constant Field Values
 
 - 
RESOLUTION_ACKNOWLEDGEDstatic final java.lang.String RESOLUTION_ACKNOWLEDGED Security Hotspot has been reviewed and acknowledged that it poses a risk.- Since:
- 9.4
- See Also:
- Constant Field Values
 
 - 
RESOLUTIONS@Deprecated(since="10.4") static final java.util.List<java.lang.String> RESOLUTIONS Deprecated.since 10.4 in favor ofIssueStatus
 - 
SECURITY_HOTSPOT_RESOLUTIONSstatic final java.util.List<java.lang.String> SECURITY_HOTSPOT_RESOLUTIONS 
 - 
STATUS_TO_REVIEWstatic final java.lang.String STATUS_TO_REVIEW - See Also:
- Constant Field Values
 
 - 
STATUS_REVIEWEDstatic final java.lang.String STATUS_REVIEWED - See Also:
- Constant Field Values
 
 - 
STATUSES@Deprecated(since="10.4") static final java.util.List<java.lang.String> STATUSES Deprecated.since 10.4 in favor ofIssueStatusReturn all available statuses- Since:
- 4.4
 
 
- 
 - 
Method Detail- 
keyjava.lang.String key() Unique generated key. It looks like "d2de809c-1512-4ae2-9f34-f5345c9f1a13".
 - 
componentKeyjava.lang.String componentKey() Components are modules ("my_project"), directories ("my_project:my/dir") or files ("my_project:my/file.c"). Keys of Java packages and classes are currently in a special format: "my_project:com.company" and "my_project:com.company.Foo".
 - 
ruleKeyRuleKey ruleKey() 
 - 
languagejava.lang.String language() 
 - 
severity@CheckForNull java.lang.String severity() See constants inSeverity.
 - 
message@CheckForNull java.lang.String message() 
 - 
line@CheckForNull java.lang.Integer line() Optional line number. If set, then it's greater than or equal 1.
 - 
gap@CheckForNull java.lang.Double gap() Arbitrary distance to threshold for resolving the issue.
 For examples:- for the rule "Avoid too complex methods" : current complexity - max allowed complexity
- for the rule "Avoid Duplications" : number of duplicated blocks
- for the rule "Insufficient Line Coverage" : number of lines to cover to reach the accepted threshold
 - Since:
- 5.5
 
 - 
status@Deprecated(since="10.4") java.lang.String status() Deprecated.since 10.4 in favor ofIssueStatus. Not deprecated for hotspotsSee constant values inIssue.
 - 
resolution@CheckForNull @Deprecated(since="10.4") java.lang.String resolution() Deprecated.since 10.4 in favor ofIssueStatus. Not deprecated for hotspotsThe type of resolution, or null if the issue is not resolved. See constant values inIssue.
 - 
assignee@CheckForNull java.lang.String assignee() UUID of the user who is assigned to this issue. Null if the issue is not assigned.
 - 
creationDatejava.util.Date creationDate() 
 - 
updateDatejava.util.Date updateDate() 
 - 
closeDate@CheckForNull java.util.Date closeDate() Date when status was set toSTATUS_CLOSED, else null.
 - 
authorLogin@CheckForNull java.lang.String authorLogin() Login of the SCM account that introduced this issue. Requires the Developer Cockpit Plugin to be installed.
 - 
isNewboolean isNew() During a scan return if the current issue is a new one.- Returns:
- always false on server side
- Since:
- 4.0
 
 - 
isCopiedboolean isCopied() During a scan returns true if the issue is copied from another branch.- Since:
- 6.6
 
 - 
effort@CheckForNull Duration effort() - Since:
- 5.5
 
 - 
projectKeyjava.lang.String projectKey() - Since:
- 5.0
 
 - 
projectUuidjava.lang.String projectUuid() - Since:
- 5.0
 
 - 
componentUuidjava.lang.String componentUuid() - Since:
- 5.0
 
 - 
tagsjava.util.Collection<java.lang.String> tags() - Since:
- 5.1
 
 - 
codeVariants@CheckForNull java.util.Collection<java.lang.String> codeVariants() - Since:
- 9.17
 
 
- 
 
-