Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #5179

Closed
Open
Created 11 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

[6.1] Issues renumbering

Closed

[6.1] Issues renumbering

Created by: sashkab

With 6.1 update I was surprised, that GitLab decided to brake everything and introduce project-related ids for issues, merge requests. This broke a lot of things:

  • comments in commits mention old issue numbers;
  • issues mention old issue numbers, but they weren't translated to new id;
  • same thing with merge requests.

From one point of view, global IDs where issue. From other, when performing upgrades, GitLab could have kept old issue/merge ids for existing projects. I don't understand, why you couldn't have kept IDs same, despite making them project related?

I «fixed» this with UPDATE issues SET iid=id;. Seems to work for me, but will this cause any issues, I'm not aware of? I didn't have to update merge_requests table, but it can be updated same way: UPDATE merge_requests SET iid=id;

Why brake what's working?

Linked issues
...

    Related merge requests

    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: hiroponz

      Written on http://blog.gitlab.org/gitlab-community-edition-6-dot-1-released/. So updating iid may cause some problem.

      Issue and Merge Request ID’s start at 1 for each Project

      The ID’s for Issues and Merge Requests now start at 1 for each Project. This means that bookmarked issue URL’s will > change. Old issue URL’s are redirected to the new one if the issue ID is too high for an internal ID.

      By Administrator on 2013-09-25T14:47:30 (imported from GitLab project)

    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: sashkab

      They can start from whatever they want, but I don't want to have mess in my commits/comments, etc.

      
      mysql> describe issues;
      +--------------+--------------+------+-----+---------+----------------+
      | Field        | Type         | Null | Key | Default | Extra          |
      +--------------+--------------+------+-----+---------+----------------+
      | id           | int(11)      | NO   | PRI | NULL    | auto_increment |
      | title        | varchar(255) | YES  | MUL | NULL    |                |
      | assignee_id  | int(11)      | YES  | MUL | NULL    |                |
      | author_id    | int(11)      | YES  | MUL | NULL    |                |
      | project_id   | int(11)      | YES  | MUL | NULL    |                |
      | created_at   | datetime     | NO   | MUL | NULL    |                |
      | updated_at   | datetime     | NO   |     | NULL    |                |
      | position     | int(11)      | YES  |     | 0       |                |
      | branch_name  | varchar(255) | YES  |     | NULL    |                |
      | description  | text         | YES  |     | NULL    |                |
      | milestone_id | int(11)      | YES  | MUL | NULL    |                |
      | state        | varchar(255) | YES  |     | NULL    |                |
      | iid          | int(11)      | YES  |     | NULL    |                |
      +--------------+--------------+------+-----+---------+----------------+
      13 rows in set (0.00 sec)

      So, iid is not auto_increment, not primary key. In notes, they use id field for references, not iid. Same thing for merge_requests table:

      mysql> describe merge_requests;
      +-------------------+--------------+------+-----+---------+----------------+
      | Field             | Type         | Null | Key | Default | Extra          |
      +-------------------+--------------+------+-----+---------+----------------+
      | id                | int(11)      | NO   | PRI | NULL    | auto_increment |
      | target_branch     | varchar(255) | NO   | MUL | NULL    |                |
      | source_branch     | varchar(255) | NO   | MUL | NULL    |                |
      | source_project_id | int(11)      | NO   | MUL | NULL    |                |
      | author_id         | int(11)      | YES  | MUL | NULL    |                |
      | assignee_id       | int(11)      | YES  | MUL | NULL    |                |
      | title             | varchar(255) | YES  | MUL | NULL    |                |
      | created_at        | datetime     | NO   | MUL | NULL    |                |
      | updated_at        | datetime     | NO   |     | NULL    |                |
      | st_commits        | longtext     | YES  |     | NULL    |                |
      | st_diffs          | longtext     | YES  |     | NULL    |                |
      | milestone_id      | int(11)      | YES  | MUL | NULL    |                |
      | state             | varchar(255) | YES  |     | NULL    |                |
      | merge_status      | varchar(255) | YES  |     | NULL    |                |
      | target_project_id | int(11)      | NO   |     | NULL    |                |
      | iid               | int(11)      | YES  |     | NULL    |                |
      | description       | text         | YES  |     | NULL    |                |
      +-------------------+--------------+------+-----+---------+----------------+

      So I don't see what making iid=id can brake, but for me fixes issue numbers mess. I never will have issue #1 (closed) in the project, but I don't care.

      By Administrator on 2013-09-25T15:02:58 (imported from GitLab project)

    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: Razer6

      Unique ids for projects was a heaviliy requested feature and was necessary as gitlab was increasing. Instance with thousands of projects Need unique IDS to be able to Track them

      By Administrator on 2014-01-10T21:30:13 (imported from GitLab project)

    • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
    Please register or sign in to reply
    0 Assignees
    Assign to
    Milestone
    No milestone
    None
    None
    Time tracking
    Due date
    None
    None
    0
    Labels
    None
    Assign labels
    • No matching results
    • Manage project labels
    Confidentiality
    Not confidential

    You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

    Lock issue
    Unlocked
    participants
    Reference: