Interface WorklogService
- All Known Implementing Classes:
DefaultWorklogService
WorklogService
functionality.
This will perform validation before it hands off to the WorklogManager
.
Operations will not be performed if validation fails.-
Method Summary
Modifier and TypeMethodDescriptioncreateAndAutoAdjustRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) createAndRetainRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) createWithManuallyAdjustedEstimate
(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountResult worklogAdjustmentAmount, boolean dispatchEvent) createWithNewRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent) boolean
deleteAndAutoAdjustRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Deletes the specifiedWorklog
.boolean
deleteAndRetainRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Deletes the specifiedWorklog
.boolean
deleteWithManuallyAdjustedEstimate
(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountResult worklogAdjustmentAmount, boolean dispatchEvent) Deletes the specifiedWorklog
.boolean
deleteWithNewRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent) Deletes the specifiedWorklog
.getById
(JiraServiceContext jiraServiceContext, Long id) Used to get a worklog by its id.getByIssue
(JiraServiceContext jiraServiceContext, Issue issue) Returns all child worklogs of a specified issue.getByIssueVisibleToUser
(JiraServiceContext jiraServiceContext, Issue issue) Returns all child worklogs of a specified issue that the provided user has permission to see.getByIssueVisibleToUser
(JiraServiceContext jiraServiceContext, Issue issue, int pageSize) Returns a PagedList over all all child worklogs of a specified issue that the provided user has permission to see.getByIssueVisibleToUser
(CommentSearchParameters parameters) Returns child worklogs filtered accordingCommentSearchParameters
to parameters.getWorklogsDeletedSince
(ApplicationUser user, Long sinceInMilliseconds) Returns a list of ids of worklogs which were removed, since the time provided in .getWorklogsForIds
(JiraServiceContext jiraServiceContext, Set<Long> idsOfWorklogs) Returns a set of worklogs for provided ids.getWorklogsUpdatedSince
(ApplicationUser user, Long sinceInMilliseconds) Returns a list of worklogs visible by the calling user, which were modified since time provided in .boolean
hasPermissionToCreate
(JiraServiceContext jiraServiceContext, Issue issue, boolean isEditableCheckRequired) Determines if the user has thePermissions.WORK_ISSUE
permission, that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.boolean
hasPermissionToDelete
(JiraServiceContext jiraServiceContext, Worklog worklog) Determine whether the current user has the permission to delete the supplied worklog, timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.boolean
hasPermissionToUpdate
(JiraServiceContext jiraServiceContext, Worklog worklog) Determine whether the current user has the permission to update the supplied worklog, timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.boolean
Will return true if the issue is in an editable workflow state.boolean
Will return true ifAPKeys.JIRA_OPTION_TIMETRACKING
is true, false otherwise.updateAndAutoAdjustRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Updates the providedWorklog
.updateAndRetainRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Updates the providedWorklog
.updateWithNewRemainingEstimate
(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent) Updates the providedWorklog
.validateCreate
(JiraServiceContext jiraServiceContext, WorklogInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.Issue, boolean)
to create a worklog for this issue.validateCreateWithManuallyAdjustedEstimate
(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permission as determined by callinghasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.Issue, boolean)
to create a worklog for this issue.validateCreateWithNewEstimate
(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permission as determined by callinghasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.Issue, boolean)
to create a worklog for this issue.validateDelete
(JiraServiceContext jiraServiceContext, Long worklogId) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.validateDeleteWithManuallyAdjustedEstimate
(JiraServiceContext jiraServiceContext, Long worklogId, String adjustmentAmount) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.validateDeleteWithNewEstimate
(JiraServiceContext jiraServiceContext, Long worklogId, String newEstimate) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.validateUpdate
(JiraServiceContext jiraServiceContext, WorklogInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue.validateUpdateWithNewEstimate
(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue.
-
Method Details
-
validateDelete
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodworklogId
- identifies the worklog that the update validation will occur against- Returns:
- WorklogResult which can be passed to the delete methods if has permission and the data passed in is valid, null otherwise
-
validateDeleteWithNewEstimate
WorklogNewEstimateResult validateDeleteWithNewEstimate(JiraServiceContext jiraServiceContext, Long worklogId, String newEstimate) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodworklogId
- identifies the worklog that the delete validation will occur againstnewEstimate
- The value to change the issues remaining estimate to.- Returns:
- Worklog which can be passed to the delete methods if has permission and the data passed in is valid, null otherwise
-
validateDeleteWithManuallyAdjustedEstimate
WorklogAdjustmentAmountResult validateDeleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, Long worklogId, String adjustmentAmount) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodworklogId
- identifies the worklog that the delete validation will occur againstadjustmentAmount
- The value to increase the issues remaining estimate by.- Returns:
- Worklog which can be passed to the delete methods if has permission and the data passed in is valid, null otherwise
-
deleteWithNewRemainingEstimate
boolean deleteWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent) Deletes the specifiedWorklog
. This method will adjust the issues remaining estimate to be the new value which has been passed to this method, the old remaining estimate value will be lost.- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the supplied worklog and theErrorCollection
that will contain any errors encountered in calling the methodworklogNewEstimate
- the Worklog and new estimate for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog delete @return the deleted Worklog object, or null if no object has been deleted.- Returns:
- true if the
Worklog
was successfully deleted, false otherwise
-
deleteWithManuallyAdjustedEstimate
boolean deleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountResult worklogAdjustmentAmount, boolean dispatchEvent) Deletes the specifiedWorklog
. This method will adjust the issues remaining estimate to be the new value which has been passed to this method, the old remaining estimate value will be lost.- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the supplied worklog and theErrorCollection
that will contain any errors encountered in calling the methodworklogAdjustmentAmount
- the Worklog and adjustmentAmount for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog delete @return the deleted Worklog object, or null if no object has been deleted.- Returns:
- true if the
Worklog
was successfully deleted, false otherwise
-
deleteAndRetainRemainingEstimate
boolean deleteAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Deletes the specifiedWorklog
. This method will make no adjustment to the issues remaining estimate.- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the supplied worklog and theErrorCollection
that will contain any errors encountered in calling the methodworklogResult
- result of the call tovalidateDelete(com.atlassian.jira.bc.JiraServiceContext, Long)
which contains theWorklog
to deletedispatchEvent
- whether or not you want to have an event dispatched on Worklog delete- Returns:
- true if the
Worklog
was successfully deleted, false otherwise
-
deleteAndAutoAdjustRemainingEstimate
boolean deleteAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Deletes the specifiedWorklog
. This method will auto-adjust the issues remaining estimate by adding the time spent on the deleted worklog.- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the supplied worklog and theErrorCollection
that will contain any errors encountered in calling the methodworklogResult
- result of the call tovalidateDelete(com.atlassian.jira.bc.JiraServiceContext, Long)
which contains theWorklog
to deletedispatchEvent
- whether or not you want to have an event dispatched on Worklog delete- Returns:
- true if the
Worklog
was successfully deleted, false otherwise
-
validateUpdate
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate- Returns:
- WorklogResult which can be passed to the update methods if has permission and the data passed in is valid, null otherwise
-
validateUpdateWithNewEstimate
WorklogNewEstimateResult validateUpdateWithNewEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate- Returns:
- WorklogResult which can be passed to the update methods if has permission and the data passed in is valid, null otherwise
-
updateWithNewRemainingEstimate
Worklog updateWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent) Updates the providedWorklog
. This method will adjust the issues remaining estimate to be the new value which has been passed to this method, the old remaining estimate value will be lost.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodworklogNewEstimate
- the Worklog and new estimate for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog update @return the updated Worklog object, or null if no object has been updated.- Returns:
- the updated Worklog object, or null if no object has been updated.
-
updateAndRetainRemainingEstimate
Worklog updateAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Updates the providedWorklog
. This method will make no adjustment to the issues remaining estimate.- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the supplied worklog and theErrorCollection
that will contain any errors encountered in calling the methodworklogResult
- result of the call tovalidateUpdate(com.atlassian.jira.bc.JiraServiceContext, WorklogInputParameters)
which contains theWorklog
to updatedispatchEvent
- whether or not you want to have an event dispatched on Worklog update- Returns:
- the updated Worklog object, or null if no object has been updated.
-
updateAndAutoAdjustRemainingEstimate
Worklog updateAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Updates the providedWorklog
. This method will auto-adjust the issues remaining estimate based on the updated value of the time spent on the work.- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the worklog and theErrorCollection
that will contain any errors in calling the methodworklogResult
- result of the call tovalidateUpdate(com.atlassian.jira.bc.JiraServiceContext, WorklogInputParameters)
which contains theWorklog
to updatedispatchEvent
- whether or not you want to have an event dispatched on Worklog update- Returns:
- the update Worklog object, or null if no object has been updated.
-
hasPermissionToUpdate
Determine whether the current user has the permission to update the supplied worklog, timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.In case of errors, add error messages to the error collection within the servicecontext.
Passing in null worklog or a worklog with null ID will return false and an error message will be added to the error collection.
Passing in null error collection will throw NPE.
This method will return true if the user is a member of the worklog's group/role level (if specified) AND
- The user has the
Permissions.WORKLOG_EDIT_ALL
permission; OR - The user is the
Worklog
author and has thePermissions.WORKLOG_EDIT_OWN
permission
- Parameters:
jiraServiceContext
- containing theUser
who wishes to update the worklog and theErrorCollection
that will contain any errors in calling the methodworklog
- theWorklog
the user wishes to update- Returns:
- true if the user has permission to update the supplied worklog, false otherwise
- The user has the
-
hasPermissionToDelete
Determine whether the current user has the permission to delete the supplied worklog, timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.In case of errors, add error messages to the error collection within the servicecontext.
Passing in null worklog or a worklog with null ID will return false and an error message will be added to the error collection.
Passing in null error collection will throw NPE.
This method will return true if the user is a member of the worklog's group/role level (if specified) AND
- The user has the
Permissions.WORKLOG_DELETE_ALL
permission; OR - The user is the
Worklog
author and has thePermissions.WORKLOG_DELETE_OWN
permission
- Parameters:
jiraServiceContext
- containing theUser
who wishes to delete the worklog and theErrorCollection
that will contain any errors in calling the methodworklog
- theWorklog
the user wishes to delete- Returns:
- true if the user has permission to delete the supplied worklog, false otherwise
- The user has the
-
validateCreate
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by callinghasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.Issue, boolean)
to create a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate- Returns:
- WorklogResult which can be passed to the create methods if has permission and the data passed in is valid, null otherwise
-
validateCreateWithNewEstimate
WorklogNewEstimateResult validateCreateWithNewEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permission as determined by callinghasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.Issue, boolean)
to create a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate- Returns:
- WorklogNewEstimateResult the Worklog of which can be passed to the create methods if has permission and the data passed in is valid, null otherwise
-
validateCreateWithManuallyAdjustedEstimate
WorklogAdjustmentAmountResult validateCreateWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountInputParameters params) Determines whether worklogs are enabled in JIRA and if the user has the required permission as determined by callinghasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.issue.Issue, boolean)
to create a worklog for this issue.- Parameters:
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate- Returns:
- WorklogAdjustmentAmountResult the Worklog of which can be passed to the create methods if has permission and the data passed in is valid, null otherwise
-
createWithNewRemainingEstimate
Worklog createWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent) Persists a newWorklog
on the givenIssue
. This method will adjust the issues remaining estimate to be the new value which has been passed to this method, the old remaining estimate value will be lost.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodworklogNewEstimate
- the Worklog and new estimate for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog creation- Returns:
- the created Worklog object or null if no object was created.
- See Also:
-
createWithManuallyAdjustedEstimate
Worklog createWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountResult worklogAdjustmentAmount, boolean dispatchEvent) Persists a newWorklog
on the givenIssue
. This method will adjust the issues remaining estimate by reducing by the adjustmentAmount which has been passed to this method. Before calling this method, you must call validateCreateWithManuallyAdjustedEstimate() to ensure that the creation is OK.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodworklogAdjustmentAmount
- the Worklog and adjustmentAmount for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog creation- Returns:
- the created Worklog object or null if no object was created.
- See Also:
-
createAndRetainRemainingEstimate
Worklog createAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Persists a newWorklog
on the givenIssue
. This method will make no adjustment to the issues remaining estimate.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodworklogResult
- the WorklogResult generated by the validate calldispatchEvent
- whether or not you want to have an event dispatched on Worklog creation @return the created Worklog object, or null if no object created.- Returns:
- the created Worklog object or null if no object was created.
-
createAndAutoAdjustRemainingEstimate
Worklog createAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent) Persists a newWorklog
on the givenIssue
. This method will auto-adjust the issues remaining estimate based on the value of the time spent on the work.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodworklogResult
- the WorklogResult generated by the validate calldispatchEvent
- whether or not you want to have an event dispatched on Worklog creation @return the created Worklog object, or null if no object created.- Returns:
- the created Worklog object or null if no object was created.
-
hasPermissionToCreate
boolean hasPermissionToCreate(JiraServiceContext jiraServiceContext, Issue issue, boolean isEditableCheckRequired) Determines if the user has thePermissions.WORK_ISSUE
permission, that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodissue
- the issue to add the worklog toisEditableCheckRequired
- set to true if we require the issue to be in an editable state. This should always be the case except when logging work on transition- Returns:
- true if the user has permission to create a worklog on the specified issue, false otherwise
-
getById
Used to get a worklog by its id.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodid
- uniquely identifies the worklog- Returns:
- returns the worklog for the passed in id, null if not found.
-
getWorklogsUpdatedSince
WorklogChangedSincePage<Worklog> getWorklogsUpdatedSince(ApplicationUser user, Long sinceInMilliseconds) Returns a list of worklogs visible by the calling user, which were modified since time provided in . The list is limited toWorklogManager.WORKLOG_UPDATE_DATA_PAGE_SIZE
elements, in order to get more elements, execute this method again with which is equal to the updated time of the last element in the result. This won't return worklogs updated within last minute.- Parameters:
user
- user retrieving the list of modified worklogs since a qiven time expressed in miliseconds.sinceInMilliseconds
- the time (measured as a difference between the timestamp and midnight, January 1, 1970 UTC) since which the modified worklogs will be returned.- Returns:
- a list of worklogs visible by the calling users, which were modified since the time provided in .
-
getWorklogsDeletedSince
WorklogChangedSincePage<DeletedWorklog> getWorklogsDeletedSince(ApplicationUser user, Long sinceInMilliseconds) Returns a list of ids of worklogs which were removed, since the time provided in . The list is limited toWorklogManager.WORKLOG_UPDATE_DATA_PAGE_SIZE
elements, in order to get more elements, execute this method again with which is equal to removal time of the last element in the result. This won't return worklogs updated within last minute.- Parameters:
user
- user retrieving the list of deleted worklogs since a qiven time expressed in milliseconds.sinceInMilliseconds
- the time (measured as a difference between the timestamp and midnight, January 1, 1970 UTC) since which the deleted worklogs will be returned.- Returns:
- a list of ids of deleted worklogs, which were removed since the time provided in .
-
getWorklogsForIds
ServiceOutcome<Set<Worklog>> getWorklogsForIds(JiraServiceContext jiraServiceContext, Set<Long> idsOfWorklogs) Returns a set of worklogs for provided ids. If the calling user doesn't have permissions to get worklog for given id, the worklog won't be returned. The set is limited toWorklogManager.WORKLOG_UPDATE_DATA_PAGE_SIZE
elements, in order to get more elements, execute this method again providing ids of otherWorklog
to retrieve.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodidsOfWorklogs
- set of ids for which worklogs will be returned.- Returns:
- a set of worklogs for provided ids.
-
getByIssue
Returns all child worklogs of a specified issue.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodissue
- the specified parent issue (not null)- Returns:
- a List of Worklogs, ordered by creation date. An empty List will be returned if none are found
-
getByIssueVisibleToUser
Returns all child worklogs of a specified issue that the provided user has permission to see.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodissue
- the specified parent issue (not null)- Returns:
- a List of Worklogs, ordered by creation date. An empty List will be returned if none are found
-
getByIssueVisibleToUser
Returns child worklogs filtered accordingCommentSearchParameters
to parameters.CommentSearchParameters
are used because they are able to handle focused items.- Parameters:
parameters
- parameters for search (not null)- Returns:
- a Window of Worklogs, ordered by start date. An empty Window will be returned if none are found
-
getByIssueVisibleToUser
PagedList<Worklog> getByIssueVisibleToUser(JiraServiceContext jiraServiceContext, Issue issue, int pageSize) Returns a PagedList over all all child worklogs of a specified issue that the provided user has permission to see.- Parameters:
jiraServiceContext
- containing theUser
who wishes to create a worklog and theErrorCollection
that will contain any errors in calling the methodissue
- the specified parent issue (not null)pageSize
- the number of worklogs per page- Returns:
- a List of Worklogs, ordered by creation date. An empty List will be returned if none are found
-
isTimeTrackingEnabled
boolean isTimeTrackingEnabled()Will return true ifAPKeys.JIRA_OPTION_TIMETRACKING
is true, false otherwise.- Returns:
- true if enabled, false otherwise.
-
isIssueInEditableWorkflowState
Will return true if the issue is in an editable workflow state.- Parameters:
issue
- the issue to see if it is in an editable store- Returns:
- true if editable, false otherwise
-