@groovy.transform.Trait trait WorkItem extends java.lang.Object implements Issue
An updated terminology interface for Jira issues.
WorkItem extends the Issue interface and provides alias methods using
updated terminology. For example, getWorkType() delegates to getIssueType().
This interface is fully backward-compatible with Issue. Any instance of Issue
that implements WorkItem can be used interchangeably with both interfaces.
Existing code using Issue continues to work unchanged, while new code can adopt
the updated terminology provided by WorkItem.
def workItem = WorkItems.getByKey("TEST-123")
// Updated terminology
println "Work Type: ${workItem.workType.name"
// Legacy terminology still works
println "Issue Type: ${workItem.issueType.name}"
println "Summary: ${workItem.summary}"
println "Assignee: ${workItem.assignee}"
}
| Type Params | Return Type | Name and description |
|---|---|---|
|
java.lang.Long |
getSpaceId()Gets the ID of the space associated with the work item. |
|
com.atlassian.jira.rest.clientv2.model.Project |
getSpaceObject()Gets the space object associated with the work item. |
|
com.atlassian.jira.rest.clientv2.model.IssueTypeDetails |
getWorkType()Gets the work type of the work item. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Gets the ID of the space associated with the work item.
This is an alias for Issue.getProjectId.
Gets the space object associated with the work item.
This is an alias for Issue.getProjectObject.
Gets the work type of the work item.
This is an alias for Issue.getIssueType.