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.
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.
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.
Here is the list of entities that are imported from GitLab and their mapping to YouTrack entities:
Entity in GitLab
Entity in YouTrack
Issue field values
Custom field values
Issue activity items
Currently, history import is limited. For details, see Import Limitations.
Currently, attachment import is limited. For details, see Import Limitations.
Values of the
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:
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
YouTrack imports historical events for
Work items are not imported.
YouTrack imports all issue fields except
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:
Log in to GitLab with an account that is granted administrative permissions.
Click your avatar in the upper-right corner.
Navigate to the Preferences > Access tokens page.
Enter a name for the token.
Set the Scopes for the token. The import requires
Click the Create personal access token button.
The new personal access token is created.
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:
From the Administration menu, select .
Click New import to open the setup dialog.
Configure the import settings:
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.
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.
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.
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.
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.
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.
To configure project mapping:
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.
Select the projects that you want to import. Check the box on the top of the list to import all available GitLab projects.
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.
If you want to change a target project, select another option from the corresponding dropdown on the list.
Click Start import to finalize import setup and start import.
After the initial import, the following controls are available in the sidebar:
Immediately imports any changes made in the selected GitLab projects after the previous import.
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.
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.