Open-Source Wikis

/

GitLab

/

Primitives

/

Issuable

gitlab-org/gitlab

Issuable

The shared abstraction over Issue, MergeRequest, and (via the new framework) WorkItem.

Source

  • app/models/concerns/issuable.rb — core mixin.
  • app/models/concerns/has_internal_id.rb — IID generation.
  • app/services/issuable_base_service.rb — service-layer base class.
  • app/finders/issuable_finder.rb — common finder logic.

Shared behavior

All issuables have:

  • A title and description (Markdown, rendered by Banzai).
  • Author, assignee(s), reviewers (MR-only).
  • Labels, milestone (and iteration on EE).
  • A discussion thread of Notes.
  • An award emoji ("reactions") collection.
  • Subscribers and notification settings.
  • Internal IDs (iid) scoped to the parent project/group.
  • A state (open, closed, merged for MRs).
  • Confidentiality flag.
  • Lock/unlock for discussion control.
  • A "moved to" pointer for issue moves.

Internal IDs

Issuables have a global PK (id) and a per-parent IID (iid). The IID is what users see (#42). Generation uses the internal_ids table with row-level locking to ensure uniqueness without sequence collisions.

Quick actions

/assign @alice, /label ~bug, /close etc. are parsed by Banzai::QuickActionService and app/services/quick_actions/. They modify the issuable in the same transaction as the comment that contained them.

Search and filtering

IssuableFinder is the largest finder; it accepts ~30 filter parameters and produces an ActiveRecord::Relation. Used by:

  • The web UI list pages.
  • REST API list endpoints.
  • GraphQL resolvers.
  • Boards.

Workflows

Each issuable has its own state machine:

  • Issue: open → closed.
  • MR: open → closed; open → merged; reopened.

The state column drives lookups; transitions emit notifications and todos.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Issuable – GitLab wiki | Factory