Class IssuesApi

All Implemented Interfaces:
Constants

public class IssuesApi extends AbstractApi implements Constants
This class provides an entry point to all the GitLab API Issue calls.
See Also:
  • Constructor Details

    • IssuesApi

      public IssuesApi(GitLabApi gitLabApi)
  • Method Details

    • getIssues

      public List<Issue> getIssues() throws GitLabApiException
      Get all issues the authenticated user has access to. Only returns issues created by the current user.
      GitLab Endpoint: GET /issues
      Returns:
      a list of user's issues
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(int page, int perPage) throws GitLabApiException
      Get all issues the authenticated user has access to using the specified page and per page setting. Only returns issues created by the current user.
      GitLab Endpoint: GET /issues
      Parameters:
      page - the page to get
      perPage - the number of issues per page
      Returns:
      the list of issues in the specified range
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public Pager<Issue> getIssues(int itemsPerPage) throws GitLabApiException
      Get a Pager of all issues the authenticated user has access to. Only returns issues created by the current user.
      GitLab Endpoint: GET /issues
      r
      Parameters:
      itemsPerPage - the number of issues per page
      Returns:
      the Pager of issues in the specified range
      Throws:
      GitLabApiException - if any exception occurs
    • getIssuesStream

      public Stream<Issue> getIssuesStream() throws GitLabApiException
      Get all issues the authenticated user has access to as a Stream. Only returns issues created by the current user.
      GitLab Endpoint: GET /issues
      Returns:
      a Stream of user's issues
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(Object projectIdOrPath) throws GitLabApiException
      Get a list of project's issues.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      Returns:
      a list of project's issues
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(Object projectIdOrPath, int page, int perPage) throws GitLabApiException
      Get a list of project's issues using the specified page and per page settings.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      page - the page to get
      perPage - the number of issues per page
      Returns:
      the list of issues in the specified range
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public Pager<Issue> getIssues(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException
      Get a Pager of project's issues.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      itemsPerPage - the number of issues per page
      Returns:
      the Pager of issues in the specified range
      Throws:
      GitLabApiException - if any exception occurs
    • getIssuesStream

      public Stream<Issue> getIssuesStream(Object projectIdOrPath) throws GitLabApiException
      Get a Stream of project's issues. Only returns the first page
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      Returns:
      a Stream of project's issues
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(Object projectIdOrPath, IssueFilter filter) throws GitLabApiException
      Get a list of project's issues.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - IssueFilter a IssueFilter instance with the filter settings
      Returns:
      the list of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(Object projectIdOrPath, IssueFilter filter, int page, int perPage) throws GitLabApiException
      Get a list of project's issues.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - IssueFilter a IssueFilter instance with the filter settings.
      page - the page to get.
      perPage - the number of projects per page.
      Returns:
      the list of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public Pager<Issue> getIssues(Object projectIdOrPath, IssueFilter filter, int itemsPerPage) throws GitLabApiException
      Get a list of project's issues.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - IssueFilter a IssueFilter instance with the filter settings.
      itemsPerPage - the number of Project instances that will be fetched per page.
      Returns:
      the Pager of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssuesStream

      public Stream<Issue> getIssuesStream(Object projectIdOrPath, IssueFilter filter) throws GitLabApiException
      Get a Stream of project's issues.
      GitLab Endpoint: GET /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      filter - IssueFilter a IssueFilter instance with the filter settings
      Returns:
      a Stream of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(IssueFilter filter) throws GitLabApiException
      Get all issues the authenticated user has access to. By default it returns only issues created by the current user.
      GitLab Endpoint: GET /issues
      Parameters:
      filter - IssueFilter a IssueFilter instance with the filter settings
      Returns:
      the list of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public List<Issue> getIssues(IssueFilter filter, int page, int perPage) throws GitLabApiException
      Get all issues the authenticated user has access to. By default it returns only issues created by the current user.
      GitLab Endpoint: GET /issues
      Parameters:
      filter - IssueFilter a IssueFilter instance with the filter settings.
      page - the page to get.
      perPage - the number of projects per page.
      Returns:
      the list of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssues

      public Pager<Issue> getIssues(IssueFilter filter, int itemsPerPage) throws GitLabApiException
      Get all issues the authenticated user has access to. By default it returns only issues created by the current user.
      GitLab Endpoint: GET /issues
      Parameters:
      filter - IssueFilter a IssueFilter instance with the filter settings.
      itemsPerPage - the number of Project instances that will be fetched per page.
      Returns:
      the Pager of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssuesStream

      public Stream<Issue> getIssuesStream(IssueFilter filter) throws GitLabApiException
      Get all issues the authenticated user has access to. By default it returns only issues created by the current user.
      GitLab Endpoint: GET /issues
      Parameters:
      filter - IssueFilter a IssueFilter instance with the filter settings
      Returns:
      the Stream of issues in the specified range.
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssues

      public List<Issue> getGroupIssues(Object groupIdOrPath) throws GitLabApiException
      Get a list of a group’s issues.
      GitLab Endpoint: GET /groups/:id/issues
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      Returns:
      a List of issues for the specified group
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssues

      public Pager<Issue> getGroupIssues(Object groupIdOrPath, int itemsPerPage) throws GitLabApiException
      Get a Pager of groups's issues.
      GitLab Endpoint: GET /groups/:id/issues
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      itemsPerPage - the number of Issue instances that will be fetched per page.
      Returns:
      the Pager of issues for the specified group
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssuesStream

      public Stream<Issue> getGroupIssuesStream(Object groupIdOrPath) throws GitLabApiException
      Get a Stream of a group’s issues.
      GitLab Endpoint: GET /groups/:id/issues
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      Returns:
      a Stream of issues for the specified group and filter
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssues

      public List<Issue> getGroupIssues(Object groupIdOrPath, IssueFilter filter) throws GitLabApiException
      Get a list of a group’s issues.
      GitLab Endpoint: GET /groups/:id/issues
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      filter - IssueFilter a IssueFilter instance with the filter settings.
      Returns:
      a List of issues for the specified group and filter
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssues

      public Pager<Issue> getGroupIssues(Object groupIdOrPath, IssueFilter filter, int itemsPerPage) throws GitLabApiException
      Get a list of groups's issues.
      GitLab Endpoint: GET /groups/:id/issues
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      filter - IssueFilter a IssueFilter instance with the filter settings.
      itemsPerPage - the number of Issue instances that will be fetched per page.
      Returns:
      the Pager of issues for the specified group and filter
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssuesStream

      public Stream<Issue> getGroupIssuesStream(Object groupIdOrPath, IssueFilter filter) throws GitLabApiException
      Get a Stream of a group’s issues.
      GitLab Endpoint: GET /groups/:id/issues
      Parameters:
      groupIdOrPath - the group in the form of an Long(ID), String(path), or Group instance
      filter - IssueFilter a IssueFilter instance with the filter settings.
      Returns:
      a Stream of issues for the specified group and filter
      Throws:
      GitLabApiException - if any exception occurs
    • getIssue

      public Issue getIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get a single project issue.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      the specified Issue instance
      Throws:
      GitLabApiException - if any exception occurs
    • getOptionalIssue

      public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Long issueIid)
      Get a single project issue as an Optional instance.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      the specified Issue as an Optional instance
    • createIssue

      public Issue createIssue(Object projectIdOrPath, String title, String description) throws GitLabApiException
      Create an issue for the project.
      GitLab Endpoint: POST /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      title - the title of an issue, required
      description - the description of an issue, optional
      Returns:
      an instance of Issue
      Throws:
      GitLabApiException - if any exception occurs
    • createIssue

      public Issue createIssue(Object projectIdOrPath, String title, String description, Boolean confidential, List<Long> assigneeIds, Long milestoneId, String labels, Date createdAt, Date dueDate, Long mergeRequestToResolveId, Long discussionToResolveId) throws GitLabApiException
      Create an issue for the project.
      GitLab Endpoint: POST /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      title - the issue title of an issue, required
      description - the description of an issue, optional
      confidential - set the issue to be confidential, default is false, optional
      assigneeIds - the IDs of the users to assign issue, optional
      milestoneId - the ID of a milestone to assign issue, optional
      labels - comma-separated label names for an issue, optional
      createdAt - the date the issue was created at, optional
      dueDate - the due date, optional
      mergeRequestToResolveId - the IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values. Optional
      discussionToResolveId - the ID of a discussion to resolve. This will fill in the issue with a default description and mark the discussion as resolved. Use in combination with merge_request_to_resolve_discussions_of. Optional
      Returns:
      an instance of Issue
      Throws:
      GitLabApiException - if any exception occurs
    • createIssue

      public Issue createIssue(Object projectIdOrPath, String title, String description, Boolean confidential, List<Long> assigneeIds, Long milestoneId, String labels, Date createdAt, Date dueDate, Long mergeRequestToResolveId, Long discussionToResolveId, String iterationTitle) throws GitLabApiException
      Create an issue for the project.
      GitLab Endpoint: POST /projects/:id/issues
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      title - the issue title of an issue, required
      description - the description of an issue, optional
      confidential - set the issue to be confidential, default is false, optional
      assigneeIds - the IDs of the users to assign issue, optional
      milestoneId - the ID of a milestone to assign issue, optional
      labels - comma-separated label names for an issue, optional
      createdAt - the date the issue was created at, optional
      dueDate - the due date, optional
      mergeRequestToResolveId - the IID of a merge request in which to resolve all issues. This will fill the issue with a default description and mark all discussions as resolved. When passing a description or title, these values will take precedence over the default values. Optional
      discussionToResolveId - the ID of a discussion to resolve. This will fill in the issue with a default description and mark the discussion as resolved. Use in combination with merge_request_to_resolve_discussions_of. Optional
      iterationTitle - the iteration title of an issue, optional
      Returns:
      an instance of Issue
      Throws:
      GitLabApiException - if any exception occurs
    • closeIssue

      public Issue closeIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Closes an existing project issue.
      GitLab Endpoint: PUT /projects/:id/issues/:issue_iid
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the issue IID to update, required
      Returns:
      an instance of the updated Issue
      Throws:
      GitLabApiException - if any exception occurs
    • updateIssue

      public Issue updateIssue(Object projectIdOrPath, Long issueIid, String title, String description, Boolean confidential, List<Long> assigneeIds, Long milestoneId, String labels, Constants.StateEvent stateEvent, Date updatedAt, Date dueDate) throws GitLabApiException
      Updates an existing project issue. This call can also be used to mark an issue as closed.
      GitLab Endpoint: PUT /projects/:id/issues/:issue_iid
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the issue IID to update, required
      title - the title of an issue, optional
      description - the description of an issue, optional
      confidential - set the issue to be confidential, default is false, optional
      assigneeIds - the IDs of the users to assign issue, optional
      milestoneId - the ID of a milestone to assign issue, optional
      labels - comma-separated label names for an issue, optional
      stateEvent - the state event of an issue. Set close to close the issue and reopen to reopen it, optional
      updatedAt - sets the updated date, requires admin or project owner rights, optional
      dueDate - the due date, optional
      Returns:
      an instance of the updated Issue
      Throws:
      GitLabApiException - if any exception occurs
    • assignIssue

      public Issue assignIssue(Object projectIdOrPath, Long issueIid, Long assigneeId) throws GitLabApiException
      Updates an existing project issue. This call can also be used to mark an issue as closed.
      GitLab Endpoint: PUT /projects/:id/issues/:issue_iid
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the issue IID to update, required
      assigneeId - the ID of the user to assign issue to, required
      Returns:
      an instance of the updated Issue
      Throws:
      GitLabApiException - if any exception occurs
    • deleteIssue

      public void deleteIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Delete an issue.
      GitLab Endpoint: DELETE /projects/:id/issues/:issue_iid
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the internal ID of a project's issue
      Throws:
      GitLabApiException - if any exception occurs
    • estimateTime

      public TimeStats estimateTime(Object projectIdOrPath, Long issueIid, int duration) throws GitLabApiException
      Sets an estimated time of work in this issue
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the internal ID of a project's issue
      duration - estimated time in seconds
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • estimateTime

      public TimeStats estimateTime(Object projectIdOrPath, Long issueIid, String duration) throws GitLabApiException
      Sets an estimated time of work in this issue
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the internal ID of a project's issue
      duration - Human readable format, e.g. 3h30m
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • estimateTime

      public TimeStats estimateTime(Object projectIdOrPath, Long issueIid, Duration duration) throws GitLabApiException
      Sets an estimated time of work in this issue
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/time_estimate
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      duration - set the estimate of time to this duration
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • resetEstimatedTime

      public TimeStats resetEstimatedTime(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Resets the estimated time for this issue to 0 seconds.
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_time_estimate
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • addSpentTime

      public TimeStats addSpentTime(Object projectIdOrPath, Long issueIid, int duration) throws GitLabApiException
      Adds spent time for this issue
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      duration - the duration in seconds
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • addSpentTime

      public TimeStats addSpentTime(Object projectIdOrPath, Long issueIid, String duration) throws GitLabApiException
      Adds spent time for this issue
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      duration - Human readable format, e.g. 3h30m
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • addSpentTime

      public TimeStats addSpentTime(Object projectIdOrPath, Long issueIid, Duration duration) throws GitLabApiException
      Adds spent time for this issue
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/add_spent_time
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      duration - the duration of time spent
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • resetSpentTime

      public TimeStats resetSpentTime(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Resets the total spent time for this issue to 0 seconds.
      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/reset_spent_time
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      a TimeSTats instance
      Throws:
      GitLabApiException - if any exception occurs
    • getTimeTrackingStats

      public TimeStats getTimeTrackingStats(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get time tracking stats.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      a TimeStats instance
      Throws:
      GitLabApiException - if any exception occurs
    • getOptionalTimeTrackingStats

      public Optional<TimeStats> getOptionalTimeTrackingStats(Object projectIdOrPath, Long issueIid)
      Get time tracking stats as an Optional instance
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/time_stats
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      a TimeStats as an Optional instance
    • getClosedByMergeRequests

      public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get list containing all the merge requests that will close issue when merged.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/closed_by
      Parameters:
      projectIdOrPath - id, path of the project, or a Project instance holding the project ID or path
      issueIid - the internal ID of a project's issue
      Returns:
      a List containing all the merge requests what will close the issue when merged.
      Throws:
      GitLabApiException - if any exception occurs
    • getClosedByMergeRequests

      public List<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException
      Get list containing all the merge requests that will close issue when merged.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/closed_by
      Parameters:
      projectIdOrPath - id, path of the project, or a Project instance holding the project ID or path
      issueIid - the internal ID of a project's issue
      page - the page to get
      perPage - the number of issues per page
      Returns:
      a List containing all the merge requests what will close the issue when merged.
      Throws:
      GitLabApiException - if any exception occurs
    • getClosedByMergeRequests

      public Pager<MergeRequest> getClosedByMergeRequests(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException
      Get a Pager containing all the merge requests that will close issue when merged.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/closed_by
      Parameters:
      projectIdOrPath - id, path of the project, or a Project instance holding the project ID or path
      issueIid - the internal ID of a project's issue
      itemsPerPage - the number of Issue instances that will be fetched per page
      Returns:
      a Pager containing all the issues that would be closed by merging the provided merge request
      Throws:
      GitLabApiException - if any exception occurs
    • getClosedByMergeRequestsStream

      public Stream<MergeRequest> getClosedByMergeRequestsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get list containing all the merge requests that will close issue when merged.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/closed_by
      Parameters:
      projectIdOrPath - id, path of the project, or a Project instance holding the project ID or path
      issueIid - the internal ID of a project's issue
      Returns:
      a List containing all the merge requests what will close the issue when merged.
      Throws:
      GitLabApiException - if any exception occurs
    • getIssueLinks

      public List<Issue> getIssueLinks(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get a list of related issues of a given issue, sorted by the relationship creation datetime (ascending). Issues will be filtered according to the user authorizations.

      NOTE: Only available in GitLab Starter, GitLab Bronze, and higher tiers.

      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      a list of related issues of a given issue, sorted by the relationship creation datetime (ascending)
      Throws:
      GitLabApiException - if any exception occurs
    • getIssueLinks

      public Pager<Issue> getIssueLinks(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException
      Get a Pager of related issues of a given issue, sorted by the relationship creation datetime (ascending). Issues will be filtered according to the user authorizations.

      NOTE: Only available in GitLab Starter, GitLab Bronze, and higher tiers.

      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      itemsPerPage - the number of issues per page
      Returns:
      a Pager of related issues of a given issue, sorted by the relationship creation datetime (ascending)
      Throws:
      GitLabApiException - if any exception occurs
    • getIssueLinksStream

      public Stream<Issue> getIssueLinksStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get a Stream of related issues of a given issue, sorted by the relationship creation datetime (ascending). Issues will be filtered according to the user authorizations.

      NOTE: Only available in GitLab Starter, GitLab Bronze, and higher tiers.

      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/links
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      Returns:
      a Stream of related issues of a given issue, sorted by the relationship creation datetime (ascending)
      Throws:
      GitLabApiException - if any exception occurs
    • createIssueLink

      public IssueLink createIssueLink(Object projectIdOrPath, Long issueIid, Object targetProjectIdOrPath, Long targetIssueIid) throws GitLabApiException
      Creates a two-way relation between two issues. User must be allowed to update both issues in order to succeed.

      NOTE: Only available in GitLab Starter, GitLab Bronze, and higher tiers.

      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue
      targetProjectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance of the target project
      targetIssueIid - the internal ID of a target project’s issue
      Returns:
      an instance of IssueLink holding the link relationship
      Throws:
      GitLabApiException - if any exception occurs
    • deleteIssueLink

      public IssueLink deleteIssueLink(Object projectIdOrPath, Long issueIid, Long issueLinkId) throws GitLabApiException
      Deletes an issue link, thus removes the two-way relationship.

      NOTE: Only available in GitLab Starter, GitLab Bronze, and higher tiers.

      GitLab Endpoint: POST /projects/:id/issues/:issue_iid/links/:issue_link_id
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the internal ID of a project's issue, required
      issueLinkId - the ID of an issue relationship, required
      Returns:
      an instance of IssueLink holding the deleted link relationship
      Throws:
      GitLabApiException - if any exception occurs
    • getParticipants

      public List<Participant> getParticipants(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get list of participants for an issue.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the IID of the issue to get the participants for
      Returns:
      a List containing all participants for the specified issue
      Throws:
      GitLabApiException - if any exception occurs
    • getParticipants

      public List<Participant> getParticipants(Object projectIdOrPath, Long issueIid, int page, int perPage) throws GitLabApiException
      Get list of participants for an issue and in the specified page range.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the IID of the issue to get the participants for
      page - the page to get
      perPage - the number of projects per page
      Returns:
      a List containing all participants for the specified issue
      Throws:
      GitLabApiException - if any exception occurs
    • getParticipants

      public Pager<Participant> getParticipants(Object projectIdOrPath, Long issueIid, int itemsPerPage) throws GitLabApiException
      Get a Pager of the participants for an issue.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the IID of the issue to get the participants for
      itemsPerPage - the number of Participant instances that will be fetched per page
      Returns:
      a Pager containing all participants for the specified issue
      Throws:
      GitLabApiException - if any exception occurs
    • getParticipantsStream

      public Stream<Participant> getParticipantsStream(Object projectIdOrPath, Long issueIid) throws GitLabApiException
      Get Stream of participants for an issue.
      GitLab Endpoint: GET /projects/:id/issues/:issue_iid/participants
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance
      issueIid - the IID of the issue to get the participants for
      Returns:
      a Stream containing all participants for the specified issue
      Throws:
      GitLabApiException - if any exception occurs
    • getIssuesStatistics

      public IssuesStatistics getIssuesStatistics(IssuesStatisticsFilter filter) throws GitLabApiException
      Gets issues count statistics on all issues the authenticated user has access to. By default it returns only issues created by the current user. To get all issues, use parameter scope=all.
      GitLab Endpoint: GET /issues_statistics
      Parameters:
      filter - IssuesStatisticsFilter a IssuesStatisticsFilter instance with the filter settings.
      Returns:
      an IssuesStatistics instance with the statistics for the matched issues.
      Throws:
      GitLabApiException - if any exception occurs
    • getGroupIssuesStatistics

      public IssuesStatistics getGroupIssuesStatistics(Object groupIdOrPath, IssuesStatisticsFilter filter) throws GitLabApiException
      Gets issues count statistics for given group.
      GitLab Endpoint: GET /groups/:groupId/issues_statistics
      Parameters:
      groupIdOrPath - the group ID, path of the group, or a Group instance holding the group ID or path, required
      filter - IssuesStatisticsFilter a IssuesStatisticsFilter instance with the filter settings
      Returns:
      an IssuesStatistics instance with the statistics for the matched issues
      Throws:
      GitLabApiException - if any exception occurs
    • geProjectIssuesStatistics

      public IssuesStatistics geProjectIssuesStatistics(Object projectIdOrPath, IssuesStatisticsFilter filter) throws GitLabApiException
      Gets issues count statistics for given project.
      GitLab Endpoint: GET /projects/:projectId/issues_statistics
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      filter - IssuesStatisticsFilter a IssuesStatisticsFilter instance with the filter settings.
      Returns:
      an IssuesStatistics instance with the statistics for the matched issues
      Throws:
      GitLabApiException - if any exception occurs
    • moveIssue

      public Issue moveIssue(Object projectIdOrPath, Long issueIid, Object toProjectId) throws GitLabApiException

      Moves an issue to a different project. If the target project equals the source project or the user has insufficient permissions to move an issue, error 400 together with an explaining error message is returned.

      If a given label and/or milestone with the same name also exists in the target project, it will then be assigned to the issue that is being moved.

      GitLab Endpoint: POST /projects/:projectId/issues/:issue_iid/move
      Parameters:
      projectIdOrPath - the project in the form of an Long(ID), String(path), or Project instance, required
      issueIid - the IID of the issue to move
      toProjectId - the ID of the project to move the issue to
      Returns:
      an Issue instance for the moved issue
      Throws:
      GitLabApiException - if any exception occurs