Interface IWorkItem
- All Superinterfaces:
IAdaptable,IBaseWithLinkedOslcResources,IChangeListener,IHasCustomValues,IHasValues,IPObject,IUniqueObject,IWithAttachments<IAttachment>,IWithLinkedOslcResources,IWorkflowObject
- Author:
- POLARION SOFTWARE
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String[]static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface com.polarion.alm.projects.model.IUniqueObject
KEY_ID, KEY_PROJECTFields inherited from interface com.polarion.alm.tracker.model.IWithAttachments
KEY_ATTACHMENTSFields 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).voidaddAprovee(IUser approvee) Adds the user to the approval collection with the default status.booleanaddAssignee(IUser participant) Adds a user to the list of assignees.booleanaddCategory(ICategory category) booleanaddExternallyLinkedItem(URI workItemURI, IEnumOption role) Adds a given link.booleanaddHyperlink(String url, IEnumOption role) voidaddHyperlink(String url, IEnumOption role, String title) Creates a new hyperlink for a Work Item with a URL, Role, and an optional title.booleanaddLinkedItem(IWorkItem item, ILinkRoleOpt role, String revision, boolean suspect) Adds the link.booleanaddLinkedRevision(IRevision revision) Adds the revision to revisions that are directly linked.booleanaddLinkedRevision(String repositoryName, String revision) Adds the given revision to revisions that are directly linked.booleanaddPlanningConstraint(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.voiddelete()Deletes this Work Item (including comments, work records and attachments) and removes all its files from the repository.voiddeleteWorkRecord(IWorkRecord workRecord) Removes and deletes the work record from this Work Item.voidPerforms the auto-assignment of this item, based on the relevant configuration.voidPerforms an autosuspect of this item.voidSet 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 StringgetLabel()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 ofILinkedWorkItemStructstructures that reference this item.The same asgetLinkedWorkItemsStructsBack()but with possibility to have the links sorted by Work Item a sort string.Returns the collection ofILinkedWorkItemStructstructures 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)intShortcut forIVotingManager.getVotesCount(IWorkItem)Returns the list of work records for this Work Item.booleanbooleanReturns true, if modifications of this item should, by default, result in setting the suspect flag.booleanShortcut forIVotingManager.isVotingEnabled(IWorkItem)voidremoveApprovee(IUser approvee) Removes the user from the approvees collection.booleanremoveAssignee(IUser participant) Removes a user from the list of assignees.booleanremoveCategory(ICategory category) booleanremoveExternallyLinkedItem(URI workItemURI, IEnumOption role) Removes a given link.booleanremoveHyperlink(String url) booleanremoveLinkedItem(IWorkItem item, IEnumOption role) Removes the link.booleanremoveLinkedRevision(IRevision revision) Removes the given revision from the link set.booleanremoveLinkedRevision(String repositoryName, String revision) Removes the given revision from the link set.booleanremovePlanningConstraint(Date date, IPlanningConstraintOpt constraint) Removes the given planning constraint.renderDescription(Text description, IWorkItem.RenderingOptions options) Deprecated.use e.g.voidsetApprovalStatus(IUser approvee, IApprovalStatusOpt status) Sets the approval status for the given user.voidsetDescription(Text description) voidsetDueDate(DateOnly dueDate) Sets the due data for this Work Item.voidsetInitialEstimate(DurationTime initialEstimate) Sets the initial estimate for this Work Item.voidsetLocalizedDescription(String language, Text description) Sets the localized description.voidsetLocalizedTitle(String language, String title) Sets the localized title.voidsetPlannedEnd(Date plannedEnd) Sets the date of the planned end of an activity for this Work Item.voidsetPlannedStart(Date plannedStart) Sets the date of the planned start of an activity for this Work Item.voidsetPriority(IPriorityOpt option) voidsetRemainingEstimate(DurationTime remainingEstimate) Sets the new estimate to complete this Work ItemvoidsetResolution(IResolutionOpt newResolution) voidsetSeverity(ISeverityOpt option) voidsetTimePoint(ITimePoint newTimePoint) voidsetTimeSpent(DurationTime timeSpent) Sets The time spent on this Work Item.voidtransformDescriptionForUI(Text description) Deprecated.use e.g.booleantraverseLinkedWorkitems(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 thetreeLinkedreturn parameter and terminates either by traversing all of them or on a given condition.Methods inherited from interface com.polarion.platform.persistence.model.IAdaptable
adaptMethods inherited from interface com.polarion.alm.tracker.model.IBaseWithLinkedOslcResources
addLinkedOslcResource, getPolarionType, getPolarionTypeIdMethods inherited from interface com.polarion.platform.persistence.model.IChangeListener
markChangedMethods inherited from interface com.polarion.platform.persistence.model.IHasCustomValues
getCustomField, getCustomFieldPrototype, getCustomFieldsList, setCustomFieldMethods 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, updateMethods inherited from interface com.polarion.alm.tracker.model.IWithAttachments
deleteAttachmentMethods inherited from interface com.polarion.alm.tracker.model.IWithLinkedOslcResources
addLinkedOslcResource, getLinkedOslcResourcesStructs, getLinkedOslcResourceStruct, removeLinkedOslcResourceMethods 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:
getProjectIdin 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:
getIdin 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\ncharacters to<br>- Parameters:
description-options- ornullto 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 (falseif it already had this category).
-
removeCategory
- Parameters:
category-- Returns:
trueif category was removed,falseif 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- ifnullthen the default repository will be used.revision-- Returns:
trueif the revision was added,falseif 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- ifnullthen the default repository will be used.revision-- Returns:
trueif the revision was removed,falseif 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:
trueif the revision was added,falseif 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:
trueif the revision was removed,falseif 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- theIUserto add to the list of assignees.- Returns:
true, if the assignee was added (falseif Work Item already has an assignee).
-
removeAssignee
Removes a user from the list of assignees.- Parameters:
participant- theIUserto remove from the list of assignees- Returns:
trueif assignee was removed,falseif 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:
IPObjectListofIUsers 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:
IPObjectListofIUsers 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
IComments (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, dateare 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, dateare 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
workItemandprojectare pre-filled.- Returns:
- The temporary
IWorkRecodecreated.
-
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
workItemandprojectare pre-filled.- Returns:
- The temporary
IWorkRecodecreated. - Since:
- 3.3
-
deleteWorkRecord
Removes and deletes the work record from this Work Item.- Parameters:
workRecord-
-
getAttachments
Description copied from interface:IWithAttachmentsReturns all attachments of this object.- Specified by:
getAttachmentsin 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:
createAttachmentin 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
IAttachementcreated.
-
getAttachment
Returns the attachment with the given Id for this Work Item.- Specified by:
getAttachmentin interfaceIWithAttachments<IAttachment>- Parameters:
id- attachment's id (notnull)Id- The Id of the attachment to get.- Returns:
- The
IAttachementwith 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 ofILinkedWorkItemStructstructures contained in this item. -
getLinkedWorkItemsStructsBack
Returns the collection ofILinkedWorkItemStructstructures 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:
trueif 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:
trueif 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-nullto point to the HEAD.suspect-- Returns:
trueif a link was added.
-
removeLinkedItem
Removes the link. Does nothing, if there is no such link.- Parameters:
item-role-- Returns:
trueif 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
ListofIWorkItemlinked with this item in both directions.
-
getLinkedWorkItemsDirect
- Returns:
- The immutable
IWorkItemcollection contained in the object, no querying is required. - See Also:
-
getLinkedWorkItemsBack
- Returns:
- The immutable
IWorkItemcollection 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 thetreeLinkedreturn 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 anullvalue will result in the set's auto creation.linkTypes- String Ids of forward link roles for traversal. Passing innullmeans to traverse all roles.backLinkTypes- String Ids of backward link roles for traversal. Passing innullmeans to traverse all roles.condition- The termination condition to be evaluated on every item. Can benulland constantfalsewill be used in such a case. Returningtruefor 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:
trueif the traversal was stopped by the condition,falseif the whole tree was processed.
-
getHyperlinks
Collection getHyperlinks()- Returns:
- Collection of
IHyperlinkStruct.
-
addHyperlink
-
addHyperlink
Creates a new hyperlink for a Work Item with a URL, Role, and an optional title.- Since:
- 3.25.6
-
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:
trueif modification was done,falseotherwise.
-
removePlanningConstraint
Removes the given planning constraint. Does nothing, if no such constraint exists.- Parameters:
date-constraint-- Returns:
trueif modification was done. Otherwisefalse.
-
getPlaningConstraintDate
Returns the Date of a planning constraint.- Parameters:
constraintId- The Id of the constraint to return.- Returns:
Dateof the given planning constraint,nullif 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- TheDateto 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
IPriorityOptwith 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- theIPriorityOptto 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
ListofIWorkRecords for this Work Item.
-
getLocation
ILocation getLocation()Returns the location of this Work Item in the repository.- Returns:
- The
ILocationin 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 ornullfor 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 ornullfor 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 ornullfor 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 ornullfor 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:
canin interfaceIPObject- Specified by:
canin 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_RESOURCESinstead