com.atlassian.jira.rest.client.api.domain
Class Issue

java.lang.Object
  extended by com.atlassian.jira.rest.client.api.domain.BasicIssue
      extended by com.atlassian.jira.rest.client.api.domain.Issue
All Implemented Interfaces:
AddressableEntity, ExpandableResource, IdentifiableEntity<Long>

public class Issue
extends BasicIssue
implements ExpandableResource

Single JIRA issue

Since:
v0.1

Constructor Summary
Issue(String summary, URI self, String key, Long id, BasicProject project, BasicIssueType issueType, Status status, String description, BasicPriority priority, Resolution resolution, Collection<Attachment> attachments, User reporter, User assignee, org.joda.time.DateTime creationDate, org.joda.time.DateTime updateDate, org.joda.time.DateTime dueDate, Collection<Version> affectedVersions, Collection<Version> fixVersions, Collection<BasicComponent> components, TimeTracking timeTracking, Collection<IssueField> issueFields, Collection<Comment> comments, URI transitionsUri, Collection<IssueLink> issueLinks, BasicVotes votes, Collection<Worklog> worklogs, BasicWatchers watchers, Iterable<String> expandos, Collection<Subtask> subtasks, Collection<ChangelogGroup> changelog, Operations operations, Set<String> labels)
           
 
Method Summary
 Iterable<Version> getAffectedVersions()
           
 User getAssignee()
           
 Iterable<Attachment> getAttachments()
           
 URI getAttachmentsUri()
           
 Iterable<ChangelogGroup> getChangelog()
          Returns changelog available for issues retrieved with CHANGELOG expanded.
 Iterable<Comment> getComments()
           
 URI getCommentsUri()
           
 Iterable<BasicComponent> getComponents()
           
 org.joda.time.DateTime getCreationDate()
           
 String getDescription()
           
 org.joda.time.DateTime getDueDate()
           
 Iterable<String> getExpandos()
           
 IssueField getField(String id)
           
 IssueField getFieldByName(String name)
          This method returns the first field with specified name.
 Iterable<IssueField> getFields()
           
 Iterable<Version> getFixVersions()
           
 Iterable<IssueLink> getIssueLinks()
           
 BasicIssueType getIssueType()
           
 Set<String> getLabels()
           
 Operations getOperations()
          Returns operations available/allowed for issues retrieved with IssueRestClient.Expandos.OPERATIONS expanded.
 BasicPriority getPriority()
           
 BasicProject getProject()
           
 User getReporter()
           
 Resolution getResolution()
           
 Status getStatus()
           
 Iterable<Subtask> getSubtasks()
           
 String getSummary()
           
 TimeTracking getTimeTracking()
           
protected  com.google.common.base.Objects.ToStringHelper getToStringHelper()
           
 URI getTransitionsUri()
           
 org.joda.time.DateTime getUpdateDate()
           
 BasicVotes getVotes()
           
 URI getVotesUri()
           
 BasicWatchers getWatchers()
           
 Iterable<Worklog> getWorklogs()
           
 URI getWorklogUri()
           
 
Methods inherited from class com.atlassian.jira.rest.client.api.domain.BasicIssue
equals, getId, getKey, getSelf, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Issue

public Issue(String summary,
             URI self,
             String key,
             Long id,
             BasicProject project,
             BasicIssueType issueType,
             Status status,
             String description,
             @Nullable
             BasicPriority priority,
             @Nullable
             Resolution resolution,
             Collection<Attachment> attachments,
             @Nullable
             User reporter,
             @Nullable
             User assignee,
             org.joda.time.DateTime creationDate,
             org.joda.time.DateTime updateDate,
             org.joda.time.DateTime dueDate,
             Collection<Version> affectedVersions,
             Collection<Version> fixVersions,
             Collection<BasicComponent> components,
             @Nullable
             TimeTracking timeTracking,
             Collection<IssueField> issueFields,
             Collection<Comment> comments,
             @Nullable
             URI transitionsUri,
             @Nullable
             Collection<IssueLink> issueLinks,
             BasicVotes votes,
             Collection<Worklog> worklogs,
             BasicWatchers watchers,
             Iterable<String> expandos,
             @Nullable
             Collection<Subtask> subtasks,
             @Nullable
             Collection<ChangelogGroup> changelog,
             @Nullable
             Operations operations,
             Set<String> labels)
Method Detail

getStatus

public Status getStatus()

getReporter

@Nullable
public User getReporter()
Returns:
reporter of this issue or null if this issue has no reporter

getAssignee

@Nullable
public User getAssignee()
Returns:
assignee of this issue or null if this issue is unassigned.

getSummary

public String getSummary()

getPriority

@Nullable
public BasicPriority getPriority()
Returns:
priority of this issue

getIssueLinks

@Nullable
public Iterable<IssueLink> getIssueLinks()
Returns:
issue links for this issue (possibly nothing) or null when issue links are deactivated for this JIRA instance

getSubtasks

@Nullable
public Iterable<Subtask> getSubtasks()

getFields

public Iterable<IssueField> getFields()
Returns:
fields inaccessible by concrete getter methods (e.g. all custom issueFields)

getField

@Nullable
public IssueField getField(String id)
Parameters:
id - identifier of the field (inaccessible by concrete getter method)
Returns:
field with given id, or null when no field with given id exists for this issue

getFieldByName

@Nullable
public IssueField getFieldByName(String name)
This method returns the first field with specified name. Names of fields in JIRA do not need to be unique. Therefore this method does not guarantee that you will get what you really want. It's added just for convenience. For identify fields you should use id rather than name.

Parameters:
name - name of the field.
Returns:
the first field matching selected name or null when no field with given name exists for this issue

getExpandos

public Iterable<String> getExpandos()
Specified by:
getExpandos in interface ExpandableResource

getIssueType

public BasicIssueType getIssueType()
Returns:
issue type

getAttachments

public Iterable<Attachment> getAttachments()
Returns:
attachments of this issue

getAttachmentsUri

public URI getAttachmentsUri()

getWorklogUri

public URI getWorklogUri()

getComments

public Iterable<Comment> getComments()
Returns:
comments for this issue

getCommentsUri

public URI getCommentsUri()

getProject

public BasicProject getProject()
Returns:
project this issue belongs to

getVotes

@Nullable
public BasicVotes getVotes()
Returns:
null

getWorklogs

public Iterable<Worklog> getWorklogs()

getWatchers

@Nullable
public BasicWatchers getWatchers()
Returns:
null when watching is disabled in JIRA

getFixVersions

@Nullable
public Iterable<Version> getFixVersions()

getTransitionsUri

@Nullable
public URI getTransitionsUri()

getAffectedVersions

@Nullable
public Iterable<Version> getAffectedVersions()

getComponents

public Iterable<BasicComponent> getComponents()

getLabels

public Set<String> getLabels()

getChangelog

@Nullable
public Iterable<ChangelogGroup> getChangelog()
Returns changelog available for issues retrieved with CHANGELOG expanded.

Returns:
issue changelog or null if CHANGELOG has not been expanded or REST API on the server side does not serve this information (pre-5.0)
Since:
com.atlassian.jira.rest.client.api 0.6, server 5.0
See Also:
IssueRestClient.getIssue(String, Iterable)

getOperations

@Nullable
public Operations getOperations()
Returns operations available/allowed for issues retrieved with IssueRestClient.Expandos.OPERATIONS expanded.

Returns:
issue operations or null if IssueRestClient.Expandos.OPERATIONS has not been expanded or REST API on the server side does not serve this information (pre-5.0)
Since:
com.atlassian.jira.rest.client.api 2.0, server 5.0
See Also:
IssueRestClient.getIssue(String, Iterable)

getVotesUri

public URI getVotesUri()

getResolution

@Nullable
public Resolution getResolution()

getCreationDate

public org.joda.time.DateTime getCreationDate()

getUpdateDate

public org.joda.time.DateTime getUpdateDate()

getDueDate

public org.joda.time.DateTime getDueDate()

getTimeTracking

@Nullable
public TimeTracking getTimeTracking()

getDescription

@Nullable
public String getDescription()

getToStringHelper

protected com.google.common.base.Objects.ToStringHelper getToStringHelper()
Overrides:
getToStringHelper in class BasicIssue


Copyright © 2014 Atlassian. All Rights Reserved.