YouTrack Server 2022.1 Help

Import from GitLab

The new option to import data from GitLab lets you migrate projects, issues, comments, and users from GitLab to YouTrack.

In essence, an import configuration is a graphic UI representation of an import script. A setup wizard navigates you through the import configuration process. It prompts you to enter the connection settings and lets you map projects in YouTrack to projects in GitLab. If your project has any custom settings, you can edit the import script in YouTrack directly.

Prerequisites

Before you import projects from GitLab to YouTrack, check the following requirements:

  • Your GitLab version is 13.8 or later.

  • Your GitLab server is accessible to inbound connections. Specifically, you need to make sure that your network doesn't block requests from YouTrack to GitLab.

  • The account that you use to connect to GitLab has access to the GitLab project that you want to import. This is the user account whose private access token is used for authentication.

Import Details

If the GitLab database contains references to entities that do not exist in YouTrack yet, they are created. The YouTrack user account you use to run the import should have enough permissions to create all imported entities. We recommend using an account with a System Admin role or the Low-level Admin Write permission to run the import.

Imported Entities

Here is the list of entities that are imported from GitLab and their mapping to YouTrack entities:

Entity in GitLab

Entity in YouTrack

Projects

Projects

Issues

Issues

Epics

Issues

Issue field values

Custom field values

Wiki pages

Articles

Comments

Comments

Labels

Tags

Issue history

Issue activity items

Currently, history import is limited. For details, see Import Limitations.

Users

Users

Attachments

Attachments

Currently, attachment import is limited. For details, see Import Limitations.

Milestones

Values of the Milestone custom field

Linked issues

Issue links

Import Limitations

Due to GitLab and YouTrack API limitations, YouTrack imports some entities partially or doesn't import at all. The following import limitations are in place:

Entity

Details

Attachments

Only image attachments in issues are imported. In some cases, image attachments in articles can also be imported.

Each issue with a missing attachment will be marked with the attachments missing tag. YouTrack appends the list of missing attachments at the end of the issue description.

Historical events

YouTrack imports historical events for Milestone, State and Weight fields only.

Work items

Work items are not imported.

Issue fields

YouTrack imports all issue fields except Iteration and Severity.

Boards

Boards are not imported.

Set up an Import from GitLab

Before you add a new import configuration, you need to create a personal access token that will grant access to the target project in GitLab. Then you can use the token for authorization when setting up the import in YouTrack.

Create a Personal Access Token in GitLab

To set up an import of issues from GitLab, first, you need to create a personal access token in GitLab.

To create a personal access token in GitLab:

  1. Log in to GitLab with an account that is granted administrative permissions.

  2. Click your avatar in the upper-right corner.

  3. Navigate to the Preferences > Access tokens page.

  4. Enter a name for the token.

  5. Set the Scopes for the token. The import requires read_api and read_user scopes.

  6. Click the Create personal access token button.

    • The new personal access token is created.

    copy token in GitLab

For more details on creating personal access tokens, refer to the GitLab documentation.

Configure an Import from GitLab in YouTrack

The setup wizard guides you through the setup process.

To configure an import from GitLab:

  1. From the Administration menu, select Integrations > Imports.

  2. Click New import to open the setup dialog.

    New import dialog
  3. Select GitLab.

  4. Configure the import settings:

    GitLab import settings

    Setting

    Description

    GitLab URL

    The URL of your GitLab.

    If your instance is hosted on gitlab.com, enter the project URL. For self-managed installations, enter the base URL instead.

    Token

    The personal access token that you have generated in GitLab to access the target issues.

    If required by your GitLab installation, enable the Use SSL key for client authentication option.

    When done, click Next.

  5. Review the settings that you have provided.

    Select the GitLab projects and the target YouTrack projects for the import. For more details about project mapping configuration, see Project Mapping.

    Optionally, enable the Continuous import. When enabled, YouTrack will periodically poll the selected GitLab projects and import updates that were made since the last sync.

    Confirm settings and start import.
  6. When done, click Start import.

    • YouTrack will create new projects and import data to the existing ones according to the configured project mapping.

    • YouTrack will import issues, articles, and users to the target projects.

    • If the Continuous import option is enabled, YouTrack will periodically check target GitLab projects for updated and new issues.

When you have set up an import, it is shown in the imports list. To view configuration and import details, select the import configuration from the list.

Import configuration details

In the details sidebar, YouTrack shows import status and details on the data that was imported. Click the Resume button in the toolbar to explicitly start polling for changes and importing updates from the source GitLab project.

You can also download the import log file to study and investigate when needed.

Project Mapping

If your GitLab is self-managed, you can import multiple projects from GitLab to YouTrack within one import configuration.

On the final step of the import setup, you can select those projects that you want to import to YouTrack. You can also choose whether to create a new project for the import or import data into an existing project in YouTrack.

Project Mapping

To configure project mapping:

  1. Locate those GitLab projects that you want to import. Note that the GitLab project names on the list include the name of the group they belong to.

    Use the filter bar on the right to filter projects by name.

  2. Select the projects that you want to import. Check the box on the top of the list to import all available GitLab projects.

  3. Select a target YouTrack project for each GitLab project.

    • When loading the list of GitLab projects for mapping, YouTrack checks for existing YouTrack projects with corresponding names. If it finds a YouTrack project with the same name as the GitLab one, YouTrack suggests it as the target project.

    • If there is no existing YouTrack project with the corresponding name, YouTrack suggests creating a new one.

  4. If you want to change a target project, select another option from the corresponding dropdown on the list.

  5. Click Start import to finalize import setup and start import.

    • Import starts.

Import Options

After the initial import, the following controls are available in the sidebar:

Import Options

Control

Description

Resume

Immediately imports any changes made in the selected GitLab projects after the previous import.

Edit

Opens the integration settings page in edit mode. Use this option to connect to a different GitLab instance, update the login credentials, or update project mapping.

Delete

Deletes the current import settings. Projects, issues, comments, users, and groups that were imported from the connected GitLab instance are not affected. If you delete the import settings and connect to the same GitLab instance, the issues are re-imported into existing projects with new issue IDs.

Last modified: 06 July 2022