Interface IWorkItem
- All Superinterfaces:
IAdaptable
,IChangeListener
,IHasCustomValues
,IHasValues
,IPObject
,IUniqueObject
,IWithAttachments<IAttachment>
,IWithLinkedOslcResources
,IWorkflowObject
- Author:
- POLARION SOFTWARE
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String[]
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Deprecated.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface com.polarion.alm.projects.model.IUniqueObject
KEY_ID, KEY_PROJECT
Fields inherited from interface com.polarion.alm.tracker.model.IWithAttachments
KEY_ATTACHMENTS
Fields inherited from interface com.polarion.alm.tracker.model.IWorkflowObject
KEY_STATUS, KEY_TYPE, KEY_WORKFLOW_SIGNATURES
-
Method Summary
Modifier and TypeMethodDescriptionaddApprovalFor
(IUser approvee) Returns a builder that allows for the addition of a user to the collection of approvals, with a status selected byIApprovalBuilder.withStatus(String)
.void
addAprovee
(IUser approvee) Adds the user to the approval collection with the default status.boolean
addAssignee
(IUser participant) Adds a user to the list of assignees.boolean
addCategory
(ICategory category) boolean
addExternallyLinkedItem
(URI workItemURI, IEnumOption role) Adds a given link.boolean
addHyperlink
(String url, IEnumOption role) boolean
addLinkedItem
(IWorkItem item, ILinkRoleOpt role, String revision, boolean suspect) Adds the link.boolean
addLinkedRevision
(IRevision revision) Adds the revision to revisions that are directly linked.boolean
addLinkedRevision
(String repositoryName, String revision) Adds the given revision to revisions that are directly linked.boolean
addPlanningConstraint
(Date date, IPlanningConstraintOpt constraint) Adds the new planning constraint.can()
createAttachment
(String fileName, String title, InputStream data) Creates a (temporary) attachment object, that can be manipulated by the client.createComment
(Text text) Creates a (temporary) comment object, that can be manipulated by the client.createComment
(Text text, String title, List visibleTo) Creates a (temporary) comment object, that can be manipulated by the client.createPriorityOpt
(float value) Creates a new Priority Option for the given value.createWorkRecord
(IUser user, DateOnly date, IWorkRecordTypeOpt type, DurationTime timeSpent, String comment) Creates a (temporary) work record object, that can be manipulated by the client.createWorkRecord
(IUser user, DateOnly date, DurationTime timeSpent) Creates a (temporary) work record object, that can be manipulated by the client.void
delete()
Deletes this Work Item (including comments, work records and attachments) and removes all its files from the repository.void
deleteWorkRecord
(IWorkRecord workRecord) Removes and deletes the work record from this Work Item.void
Performs the auto-assignment of this item, based on the relevant configuration.void
Performs an autosuspect of this item.void
Set suspect=true to links from derived items.Returns all attachments that are referenced by the description; this includes images and diagram data attachments.Allowed approvers.Allowed assignees.getAttachment
(String id) Returns the attachment with the given Id for this Work Item.getAttachmentByFileName
(String fileName) Returns all attachments of this object.Returns the attachments of this Work Item that are referenced by the description; this includes images and diagram data attachments.getAttachmentsContainedByText
(Text text, boolean includeDocumentAttachments) Returns the attachments of this Work Item that are referenced by a certain field; this includes images and diagram data attachments.Returns this Work Item author.getClosestStandardOpt
(IPriorityOpt option) Returns the closest standard option for the given option.Shortcut forgetComments(true)
.getComments
(boolean includeResolved) Optionally also includes resolved comments.getComments
(boolean includeResolved, ICommentBase.SortBy sortBy) Optionally also includes resolved comments.Returns the due date of this Work Item.Returns the list of Documents that this Work Item is referenced in.All external links.All direct external links.getId()
Returns the initial estimate of this Work Item.default String
getLabel()
Return a string with the format 'ID - Title' or only the ID if the Title is null or empty.Returns all Work Items linked with and that link this Work Item.Returns the collection ofILinkedWorkItemStruct
structures that reference this item.The same asgetLinkedWorkItemsStructsBack()
but with possibility to have the links sorted by Work Item a sort string.Returns the collection ofILinkedWorkItemStruct
structures contained in this item.The same asgetLinkedWorkItemsStructsDirect()
but with possibility to have the links sorted by a Work Item sort string.getLocalizedDescription
(String language) Returns the localized description or the normal description if the localized description is not defined or empty.getLocalizedTitle
(String language) Returns the localized title or the normal title if the localized title is not defined or empty.Returns the location of this Work Item in the repository.getPlaningConstraintDate
(String constraintId) Returns the Date of a planning constraint.Deprecated.The previous status is not used internally anymore and should not be used.Shortcut forgetRootComments(true)
.getRootComments
(boolean includeResolved) Returns the root comments of this Work Item.Returns The test case specific view of this Work Item.getTitle()
getVotes()
Shortcut forIVotingManager.getVotes(IWorkItem)
int
Shortcut forIVotingManager.getVotesCount(IWorkItem)
Returns the list of work records for this Work Item.boolean
boolean
Returns true, if modifications of this item should, by default, result in setting the suspect flag.boolean
Shortcut forIVotingManager.isVotingEnabled(IWorkItem)
void
removeApprovee
(IUser approvee) Removes the user from the approvees collection.boolean
removeAssignee
(IUser participant) Removes a user from the list of assignees.boolean
removeCategory
(ICategory category) boolean
removeExternallyLinkedItem
(URI workItemURI, IEnumOption role) Removes a given link.boolean
removeHyperlink
(String url) boolean
removeLinkedItem
(IWorkItem item, IEnumOption role) Removes the link.boolean
removeLinkedRevision
(IRevision revision) Removes the given revision from the link set.boolean
removeLinkedRevision
(String repositoryName, String revision) Removes the given revision from the link set.boolean
removePlanningConstraint
(Date date, IPlanningConstraintOpt constraint) Removes the given planning constraint.renderDescription
(Text description, IWorkItem.RenderingOptions options) Deprecated.use e.g.void
setApprovalStatus
(IUser approvee, IApprovalStatusOpt status) Sets the approval status for the given user.void
setDescription
(Text description) void
setDueDate
(DateOnly dueDate) Sets the due data for this Work Item.void
setInitialEstimate
(DurationTime initialEstimate) Sets the initial estimate for this Work Item.void
setLocalizedDescription
(String language, Text description) Sets the localized description.void
setLocalizedTitle
(String language, String title) Sets the localized title.void
setPlannedEnd
(Date plannedEnd) Sets the date of the planned end of an activity for this Work Item.void
setPlannedStart
(Date plannedStart) Sets the date of the planned start of an activity for this Work Item.void
setPriority
(IPriorityOpt option) void
setRemainingEstimate
(DurationTime remainingEstimate) Sets the new estimate to complete this Work Itemvoid
setResolution
(IResolutionOpt newResolution) void
setSeverity
(ISeverityOpt option) void
setTimePoint
(ITimePoint newTimePoint) void
setTimeSpent
(DurationTime timeSpent) Sets The time spent on this Work Item.void
transformDescriptionForUI
(Text description) Deprecated.use e.g.boolean
traverseLinkedWorkitems
(Set treeLinked, Set linkTypes, Set backLinkTypes, IWorkItem.ITerminalCondition condition) Traverses, depth first, the tree of items linked (both backward and forward) with this item then adds all touched items to thetreeLinked
return parameter and terminates either by traversing all of them or on a given condition.Methods inherited from interface com.polarion.platform.persistence.model.IAdaptable
adapt
Methods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChanged
Methods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomField
Methods inherited from interface com.polarion.platform.persistence.model.IPObject
copyTo, createStructureForKey, forget, getContextId, getDataRevision, getDataSvc, getEnumerationOptionForField, getEnumerationTypeForField, getFieldLabel, getFieldType, getIncompatibleCustomField, getIncompatibleCustomFieldPrototype, getIncompatibleCustomFieldsList, getLastRevision, getLocalId, getObjectId, getPrototype, getRevision, getUri, getValue, isModified, isPersisted, isReadOnly, isResolved, isUnresolvable, resolve, save, setEnumerationValue, setValue, update
Methods inherited from interface com.polarion.alm.tracker.model.IWithAttachments
deleteAttachment
Methods inherited from interface com.polarion.alm.tracker.model.IWithLinkedOslcResources
addLinkedOslcResource, getLinkedOslcResourcesStructs, getLinkedOslcResourceStruct, removeLinkedOslcResource
Methods inherited from interface com.polarion.alm.tracker.model.IWorkflowObject
getAvailableActions, getInitialAction, getProject, getStatus, getTrackerService, getType, getUnavailableActions, getWorkflowSignatures, getWorkflowSignaturesManager, performAction, resetWorkflow, setType
-
Field Details
-
PROTO
- See Also:
-
KEY_TITLE
- See Also:
-
KEY_DESCRIPTION
- See Also:
-
KEY_RESOLUTION
- See Also:
-
KEY_CATEGORIES
- See Also:
-
KEY_TIME_POINT
- See Also:
-
KEY_APPROVALS
- See Also:
-
KEY_LINKED_REVISIONS
- See Also:
-
KEY_LINKED_REVISIONS_DERIVED
- Since:
- 3.2.2
- See Also:
-
KEY_ASSIGNEE
- See Also:
-
KEY_AUTHOR
- See Also:
-
KEY_COMMENTS
- See Also:
-
KEY_LINKED_WORK_ITEMS
- See Also:
-
KEY_LINKED_WORK_ITEMS_DERIVED
- Since:
- 3.5.2
- See Also:
-
KEY_EXTERNALLY_LINKED_WORK_ITEMS
- Since:
- 3.5.0
- See Also:
-
KEY_HYPERLINKS
- See Also:
-
KEY_PLANNING_CONSTRAINTS
- See Also:
-
KEY_SEVERITY
- See Also:
-
KEY_PRIORITY
- See Also:
-
KEY_WORK_RECORDS
- See Also:
-
KEY_LOCATION
- See Also:
-
KEY_LOCATION_TOKENIZED
- See Also:
-
KEY_LOCATION_TREE
- See Also:
-
KEY_MODULE
- Since:
- 3.2
- See Also:
-
KEY_OUTLINE_NUMBER
- Since:
- 3.4
- See Also:
-
KEY_DUE_DATE
- See Also:
-
KEY_INITIAL_ESTIMATE
- See Also:
-
KEY_TIME_SPENT
- See Also:
-
KEY_REMAINING_ESTIMATE
- See Also:
-
KEY_CREATED
- See Also:
-
KEY_UPDATED
- See Also:
-
KEY_PLANNED_START
- See Also:
-
KEY_PLANNED_END
- See Also:
-
KEY_LINKED_OSLC_RESOURCES
Deprecated.- Since:
- 3.10.1
- See Also:
-
KEY_PREVIOUS_STATUS
Deprecated.- See Also:
-
KEY_PLANNED_IN
- Since:
- 3.8.0
- See Also:
-
KEY_RESOLVED_ON
- See Also:
-
ENUM_ID_TYPE
- See Also:
-
ENUM_ID_STATUS
- See Also:
-
ENUM_ID_SEVERITY
- See Also:
-
ENUM_ID_PRIORITY
- See Also:
-
ENUM_ID_LINK_ROLE
- Since:
- 3.8.1
- See Also:
-
TYPE_STRUCT_APPROVAL
- See Also:
-
TYPE_STRUCT_LINKED_WORK_ITEM
- See Also:
-
TYPE_STRUCT_LINKED_REVISION
- See Also:
-
TYPE_STRUCT_HYPERLINK
- See Also:
-
TYPE_STRUCT_PLANNING_CONSTRAINT
- See Also:
-
ATTACHMENT_IMG_PREFIX
- Since:
- 3.1.2
- See Also:
-
ATTACHMENT_REVISION
- Since:
- 3.2
- See Also:
-
ATTACHMENT_NAME
- Since:
- 3.2
- See Also:
-
FIELD_ORDER
-
DIFF_IGNORED_FIELDS
-
-
Method Details
-
getProjectId
String getProjectId()- Specified by:
getProjectId
in interfaceIUniqueObject
- Returns:
- The project id without resolving the Work Item.
- Since:
- 3.5.3
-
getModule
IModule getModule()- Since:
- 3.2
-
getExternalLinkingModules
IPObjectList getExternalLinkingModules()Returns the list of Documents that this Work Item is referenced in. The list of results is sorted by modification time. (The most recently modified is first.)- Since:
- 3.5.3
-
getOutlineNumber
String getOutlineNumber()- Since:
- 3.4
-
getId
String getId()- Specified by:
getId
in interfaceIUniqueObject
-
getTitle
String getTitle() -
setTitle
-
getDescription
Text getDescription() -
renderDescription
Deprecated.use e.g.WorkItemFields.description()
. It is not rendered the same way. Use other functionality from the Rendering API to render as required.Renders Text as the Description. Doesn't convert\n
characters to<br>
- Parameters:
description
-options
- ornull
to use defaults.- Returns:
- Rendered Description content.
- Since:
- 3.5.0
-
transformDescriptionForUI
Deprecated.use e.g.WorkItemFields.description()
. It is not rendered the same way. Use other functionality from the Rendering API to render as required.- Since:
- 3.2
-
setDescription
-
getResolution
IResolutionOpt getResolution() -
setResolution
-
getCategories
IPObjectList getCategories() -
addCategory
- Parameters:
category
-- Returns:
true
, if the categories were changed (false
if it already had this category).
-
removeCategory
- Parameters:
category
-- Returns:
true
if category was removed,false
if did not contain this category.
-
getTimePoint
ITimePoint getTimePoint() -
setTimePoint
-
getApprovals
Collection getApprovals()- Returns:
- A Collection of
IApprovalStruct
, containing all approvals.
-
removeApprovee
Removes the user from the approvees collection. It has no effect if the user is not there.- Parameters:
approvee
-
-
addAprovee
Adds the user to the approval collection with the default status. Has no effect, if the user is already there.- Parameters:
approvee
-
-
addApprovalFor
Returns a builder that allows for the addition of a user to the collection of approvals, with a status selected byIApprovalBuilder.withStatus(String)
.- Parameters:
approvee
-- Since:
- 3.18.2
-
setApprovalStatus
Sets the approval status for the given user. The user is added if they are not yet in the approvees collection.- Parameters:
approvee
-status
-
-
getLinkedRevisions
- Returns:
- The immutable IRevision collection that are either
referenced by this item or reference this item.
The resulting collection is the union of the results of
getLinkedRevisionsDirect()
andgetLinkedRevisionsDerived()
.
-
getLinkedRevisionsDirect
- Returns:
- The immutable IRevision collection linked from this Work Item. No querying is required. Use addLinkedRevision
-
getLinkedRevisionsDerived
- Returns:
- The immutable IRevision collection that reference this work item. Obtained using a query.
-
addLinkedRevision
Adds the given revision to revisions that are directly linked. Does nothing if the revision is already in the linked revisions set.- Parameters:
repositoryName
- ifnull
then the default repository will be used.revision
-- Returns:
true
if the revision was added,false
if it was already there.- Since:
- 3.5.1
-
removeLinkedRevision
Removes the given revision from the link set. Does nothing if the revision is not in the set.- Parameters:
repositoryName
- ifnull
then the default repository will be used.revision
-- Returns:
true
if the revision was removed,false
if not present in the set.- Since:
- 3.5.1
-
addLinkedRevision
Adds the revision to revisions that are directly linked. Does nothing if the revision is already in the linked revisions set.- Parameters:
revision
-- Returns:
true
if the revision was added,false
if it was already there.
-
removeLinkedRevision
Removes the given revision from the link set. Does nothing if the revision is not in the set.- Parameters:
revision
-- Returns:
true
if the revision was removed,false
if not present in the set.
-
getAssignees
- Returns:
- The list of users, that are assignees of this Work Item.
-
addAssignee
Adds a user to the list of assignees.- Parameters:
participant
- theIUser
to add to the list of assignees.- Returns:
true
, if the assignee was added (false
if Work Item already has an assignee).
-
removeAssignee
Removes a user from the list of assignees.- Parameters:
participant
- theIUser
to remove from the list of assignees- Returns:
true
if assignee was removed,false
if Work Item doesn't contain a participant.
-
getAllowedAssignees
Allowed assignees.Allowed assignee is a user with the global "assignable" role or the context "project_assignable" role .
- Returns:
IPObjectList
ofIUser
s sorted according toIUser.getName()
(notnull
)
-
getAllowedApprovers
Allowed approvers.Allowed approver is a user with the global "approver" role or the context "project_approver" role .
- Returns:
IPObjectList
ofIUser
s sorted according toIUser.getName()
(notnull
)- Since:
- 3.5.3
-
doAutoAssign
void doAutoAssign()Performs the auto-assignment of this item, based on the relevant configuration. The changes are not automatically saved. -
doAutoSuspect
void doAutoSuspect()Performs an autosuspect of this item. -
doSuspectDerivedItems
void doSuspectDerivedItems()Set suspect=true to links from derived items.- Since:
- 3.3
-
getAuthor
Returns this Work Item author. The author field can not be changed, therefore there is no set method for this field. -
getComments
Shortcut forgetComments(true)
. -
getComments
Optionally also includes resolved comments. Sorts comments by creation time.- Since:
- 3.7.1
- See Also:
-
getComments
@NotNull IPObjectList<IComment> getComments(boolean includeResolved, @NotNull ICommentBase.SortBy sortBy) Optionally also includes resolved comments. Sorts comments according to a parameter.- Since:
- 3.7.3
- See Also:
-
getRootComments
Shortcut forgetRootComments(true)
.- Since:
- 3.1.1
- See Also:
-
getRootComments
Returns the root comments of this Work Item. Optionally includes resolved comments.- Returns:
- root
IComment
s (notnull
) - Since:
- 3.7.1
- See Also:
-
createComment
Creates a (temporary) comment object, that can be manipulated by the client. However, the comment is not persisted until it's explicitly saved.The fields
workItem, project, author, date
are pre-filled with their values.- Parameters:
text
- The text, can not benull
.- Returns:
- The Comment object with the necessary fields filled in.
-
createComment
@NotNull IComment createComment(@NotNull Text text, @Nullable String title, @Nullable List visibleTo) Creates a (temporary) comment object, that can be manipulated by the client. However, the comment is not persisted until it's explicitly saved.The fields
workItem, project, author, date
are pre-filled with their values.- Parameters:
text
- Text, can not benull
.title
- Title, can benull
.visibleTo
- VisibleTo, can benull
.- Returns:
- the Comment object, with the necessary fields filled in.
- Since:
- 3.1.1
-
createWorkRecord
Creates a (temporary) work record object, that can be manipulated by the client. However, the work record is not persisted until it's explicitly saved.The fields
workItem
andproject
are pre-filled.- Returns:
- The temporary
IWorkRecode
created.
-
createWorkRecord
IWorkRecord createWorkRecord(IUser user, DateOnly date, IWorkRecordTypeOpt type, DurationTime timeSpent, String comment) Creates a (temporary) work record object, that can be manipulated by the client. However, the work record is not persisted until it's explicitly saved.The fields
workItem
andproject
are pre-filled.- Returns:
- The temporary
IWorkRecode
created. - Since:
- 3.3
-
deleteWorkRecord
Removes and deletes the work record from this Work Item.- Parameters:
workRecord
-
-
getAttachments
Description copied from interface:IWithAttachments
Returns all attachments of this object.- Specified by:
getAttachments
in interfaceIWithAttachments<IAttachment>
- Returns:
- attachments (never
null
)
-
createAttachment
@NotNull IAttachment createAttachment(@NotNull String fileName, @Nullable String title, @Nullable InputStream data) Creates a (temporary) attachment object, that can be manipulated by the client. However, the attachment is not persisted until it's explicitly saved.The author field is automatically pre-filled with the current user.
- Specified by:
createAttachment
in interfaceIWithAttachments<IAttachment>
- Parameters:
fileName
- The file name, can not benull
.title
- The title can benull
. If so, the file name is used instead.data
- The content input stream, can not benull
- Returns:
- The temporary
IAttachement
created.
-
getAttachment
Returns the attachment with the given Id for this Work Item.- Specified by:
getAttachment
in interfaceIWithAttachments<IAttachment>
- Parameters:
Id
- The Id of the attachment to get.- Returns:
- The
IAttachement
with the specified Id.
-
getAttachmentByFileName
-
getAttachmentsContainedByDescription
Returns the attachments of this Work Item that are referenced by the description; this includes images and diagram data attachments.- Returns:
- list of
IAttachmentBase
- Since:
- 3.3.1
- See Also:
-
getAttachmentsContainedByText
@NotNull IPObjectList<IAttachmentBase> getAttachmentsContainedByText(@Nullable Text text, boolean includeDocumentAttachments) Returns the attachments of this Work Item that are referenced by a certain field; this includes images and diagram data attachments.- Since:
- 3.7.2
-
getAllAttachmentsContainedByDescription
Returns all attachments that are referenced by the description; this includes images and diagram data attachments. These attachments can be owned by the containing document.- Returns:
- list of
IAttachmentBase
- Since:
- 3.7.0
- See Also:
-
getLinkedWorkItemsStructsDirect
Returns the collection ofILinkedWorkItemStruct
structures contained in this item. -
getLinkedWorkItemsStructsBack
Returns the collection ofILinkedWorkItemStruct
structures that reference this item. The result is obtained by querying and involves resolving all items that link to this item. -
getLinkedWorkItemsStructsDirect
The same asgetLinkedWorkItemsStructsDirect()
but with possibility to have the links sorted by a Work Item sort string. If a sort string is specified, the result is obtained by querying.- Parameters:
sort
- the format is same as forIIndexSearch.sort(String)
-
getLinkedWorkItemsStructsBack
The same asgetLinkedWorkItemsStructsBack()
but with possibility to have the links sorted by Work Item a sort string.- Parameters:
sort
- the format is same as forIIndexSearch.sort(String)
-
getExternallyLinkedWorkItemsStructs
List<IExternallyLinkedWorkItemStruct> getExternallyLinkedWorkItemsStructs()All external links.Returns data even if
ITrackerService.isExternalLinkingEnabled(com.polarion.subterra.base.data.identification.IContextId)
isfalse
.- Returns:
- Externally linked Work Items (not
null
). - Since:
- 3.5.0
- See Also:
-
getExternallyLinkedWorkItemsStructsDirect
List<IExternallyLinkedWorkItemStruct> getExternallyLinkedWorkItemsStructsDirect()All direct external links.Returns data even if
ITrackerService.isExternalLinkingEnabled(com.polarion.subterra.base.data.identification.IContextId)
isfalse
.- Returns:
- Externally linked Work Items (not
null
). - Since:
- 3.5.0
-
addExternallyLinkedItem
Adds a given link. Does nothing if such a link already exists.- Parameters:
workItemURI
- The external link (notnull
).role
- The link's role (notnull
).- Returns:
true
if a link was added.- Since:
- 3.5.0
-
removeExternallyLinkedItem
Removes a given link. Does nothing if such a link does not exist.- Parameters:
workItemURI
- The external link (notnull
).role
- The link's role (notnull
).- Returns:
true
if a link was removed.- Since:
- 3.5.0
-
isAutoSuspectOn
boolean isAutoSuspectOn()Returns true, if modifications of this item should, by default, result in setting the suspect flag. This is a hint for the UI, that renders the default value. -
hasSuspectLinks
boolean hasSuspectLinks() -
addLinkedItem
Adds the link. If the link already exists, it will NOT add another one. Links are the same, when target item and link role are equal. The link is also not created when the given item is same as this item.- Parameters:
item
- target of the link; the eventual revision of the object will be ignored.role
-revision
-null
to point to the HEAD.suspect
-- Returns:
true
if a link was added.
-
removeLinkedItem
Removes the link. Does nothing, if there is no such link.- Parameters:
item
-role
-- Returns:
true
if the link was removed.
-
getLinkedWorkItems
Returns all Work Items linked with and that link this Work Item. The returned collection is a union of collections returned from thegetLinkedWorkItemsDirect()
andgetLinkedWorkItemsBack()
methods.- Returns:
- An immutable
List
ofIWorkItem
linked with this item in both directions.
-
getLinkedWorkItemsDirect
- Returns:
- The immutable
IWorkItem
collection contained in the object, no querying is required. - See Also:
-
getLinkedWorkItemsBack
- Returns:
- The immutable
IWorkItem
collection that reference this item. The result is obtained by querying.
-
traverseLinkedWorkitems
boolean traverseLinkedWorkitems(Set treeLinked, Set linkTypes, Set backLinkTypes, IWorkItem.ITerminalCondition condition) Traverses, depth first, the tree of items linked (both backward and forward) with this item then adds all touched items to thetreeLinked
return parameter and terminates either by traversing all of them or on a given condition.- Parameters:
treeLinked
- The set that contains the result. Either anew HashSet()
can be passed in, or the existing modifiable set with Work Items to ignore in the traversal. If the caller is not interested in this result, then passing anull
value will result in the set's auto creation.linkTypes
- String Ids of forward link roles for traversal. Passing innull
means to traverse all roles.backLinkTypes
- String Ids of backward link roles for traversal. Passing innull
means to traverse all roles.condition
- The termination condition to be evaluated on every item. Can benull
and constantfalse
will be used in such a case. Returningtrue
for some Work Item means that the traversal will not continue through this item. However, it will terminate just a given tree branch, not the complete traversal.- Returns:
true
if the traversal was stopped by the condition,false
if the whole tree was processed.
-
getHyperlinks
Collection getHyperlinks()- Returns:
- Collection of
IHyperlinkStruct
.
-
addHyperlink
-
removeHyperlink
-
getPlanningConstraints
ITypedList getPlanningConstraints() -
addPlanningConstraint
Adds the new planning constraint. Does nothing if such a constraint already exists or would conflict with another one.- Parameters:
date
-constraint
-- Returns:
true
if modification was done,false
otherwise.
-
removePlanningConstraint
Removes the given planning constraint. Does nothing, if no such constraint exists.- Parameters:
date
-constraint
-- Returns:
true
if modification was done. Otherwisefalse
.
-
getPlaningConstraintDate
Returns the Date of a planning constraint.- Parameters:
constraintId
- The Id of the constraint to return.- Returns:
Date
of the given planning constraint,null
if the constraint does not exist.
-
getDueDate
DateOnly getDueDate()Returns the due date of this Work Item.- Returns:
- The due date for this Work Item.
-
setDueDate
Sets the due data for this Work Item.- Parameters:
dueDate
- TheDate
to set as the due date.
-
getInitialEstimate
DurationTime getInitialEstimate()Returns the initial estimate of this Work Item.- Returns:
- The initial estimate for this Work Item.
-
setInitialEstimate
Sets the initial estimate for this Work Item. -
getTimeSpent
DurationTime getTimeSpent()- Returns:
- The time spent on this Work Item.
-
setTimeSpent
Sets The time spent on this Work Item. -
getRemainingEstimate
DurationTime getRemainingEstimate()- Returns:
- The remaining estimate to complete this Work Item.
-
setRemainingEstimate
Sets the new estimate to complete this Work Item -
getCreated
Date getCreated()- Returns:
- The date the Work Item was created.
-
getUpdated
Date getUpdated()- Returns:
- The date of the last update to this Work Item.
-
getPlannedStart
Date getPlannedStart()- Returns:
- The date of the planned start of an activity for this Work Item.
-
setPlannedStart
Sets the date of the planned start of an activity for this Work Item. -
getPlannedEnd
Date getPlannedEnd()- Returns:
- the date of the planned end of an activity for this Work Item.
-
setPlannedEnd
Sets the date of the planned end of an activity for this Work Item. -
getPlannedIn
- Returns:
- The list of Plans that contain this Work Item.
- Since:
- 3.8.0
-
getResolvedOn
Date getResolvedOn()- Returns:
- The date that the Work Item was resolved on.
-
isVotingEnabled
boolean isVotingEnabled()Shortcut forIVotingManager.isVotingEnabled(IWorkItem)
-
getVotesCount
int getVotesCount()Shortcut forIVotingManager.getVotesCount(IWorkItem)
-
getVotes
IPObjectList getVotes()Shortcut forIVotingManager.getVotes(IWorkItem)
-
getWatchingUsers
IPObjectList getWatchingUsers() -
getPriority
IPriorityOpt getPriority() -
setPriority
-
createPriorityOpt
Creates a new Priority Option for the given value. Just a short form ofgetProject().getPriorityEnum().wrapOption(value)
.- Parameters:
value
- - priority level- Returns:
- The
IPriorityOpt
with the given value. - See Also:
-
getClosestStandardOpt
Returns the closest standard option for the given option. The shortcut forthis.getProject().getPriorityEnum().getClosestStandardOpt(option.getFloat())
.- Parameters:
option
- theIPriorityOpt
to find the closest standard option for- Returns:
- the standard
IPriorityOpt
- See Also:
-
getSeverity
ISeverityOpt getSeverity() -
setSeverity
-
getWorkRecords
Returns the list of work records for this Work Item.- Returns:
- The
List
ofIWorkRecord
s for this Work Item.
-
getLocation
ILocation getLocation()Returns the location of this Work Item in the repository.- Returns:
- The
ILocation
in the repository that this item came from.
-
delete
void delete()Deletes this Work Item (including comments, work records and attachments) and removes all its files from the repository.- Since:
- 3.2.0
-
getLocalizedTitle
Returns the localized title or the normal title if the localized title is not defined or empty.- Parameters:
language
- The language Id ornull
for the default language. (In which case this method acts asgetTitle()
).- Returns:
- localized title (can be
null
). - Since:
- 3.6.1
- See Also:
-
getLocalizedDescription
Returns the localized description or the normal description if the localized description is not defined or empty.- Parameters:
language
- The language Id ornull
for default language (in which case this method acts asgetDescription()
).- Returns:
- localized description (can be
null
). - Since:
- 3.6.1
- See Also:
-
setLocalizedTitle
Sets the localized title.- Parameters:
language
- The language Id ornull
for the default language (in which case this method acts assetTitle(String)
).title
- The title (can benull
).- Throws:
IllegalArgumentException
- if the language is not defined.- Since:
- 3.6.1
- See Also:
-
setLocalizedDescription
Sets the localized description.- Parameters:
language
- The language Id ornull
for the default language (in which case this method acts assetDescription(Text)
)description
- The description (can benull
).- Throws:
IllegalArgumentException
- if a language is not defined.- Since:
- 3.6.1
- See Also:
-
getPreviousStatus
Deprecated.The previous status is not used internally anymore and should not be used.- Returns:
- The previous status of the Work Item.
-
can
- Specified by:
can
in interfaceIPObject
- Specified by:
can
in interfaceIWorkflowObject
- Since:
- 3.8.2
-
getTestCase
Returns The test case specific view of this Work Item.- Since:
- 3.9.2
-
getLabel
Return a string with the format 'ID - Title' or only the ID if the Title is null or empty.- Since:
- 3.24.4
-
IWithLinkedOslcResources.KEY_LINKED_OSLC_RESOURCES
instead