{"id":19301277,"url":"https://github.com/fuglede/youtrack-to-azure-devops-boards","last_synced_at":"2025-04-22T10:32:29.300Z","repository":{"id":48630205,"uuid":"330618198","full_name":"fuglede/youtrack-to-azure-devops-boards","owner":"fuglede","description":"YouTrack to Azure DevOps issue migration","archived":false,"fork":false,"pushed_at":"2021-07-16T22:31:02.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-02-27T22:22:14.742Z","etag":null,"topics":["azure-devops","azure-devops-api","youtrack","youtrack-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuglede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-18T09:36:58.000Z","updated_at":"2022-07-30T12:49:04.000Z","dependencies_parsed_at":"2022-08-27T10:11:06.021Z","dependency_job_id":null,"html_url":"https://github.com/fuglede/youtrack-to-azure-devops-boards","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuglede%2Fyoutrack-to-azure-devops-boards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuglede%2Fyoutrack-to-azure-devops-boards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuglede%2Fyoutrack-to-azure-devops-boards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuglede%2Fyoutrack-to-azure-devops-boards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuglede","download_url":"https://codeload.github.com/fuglede/youtrack-to-azure-devops-boards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223893277,"owners_count":17220867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","azure-devops-api","youtrack","youtrack-api"],"created_at":"2024-11-09T23:17:24.269Z","updated_at":"2024-11-09T23:17:25.557Z","avatar_url":"https://github.com/fuglede.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTrack to Azure DevOps issue migration\r\n\r\nThis project contains a script for migrating issues from YouTrack to Azure DevOps\r\nBoards. It can migrate issues from a given YouTrack project to a given Azure DevOps\r\nproject. It supports migration of comments, attachments, and custom fields.\r\n\r\n\r\n## Example usage\r\n\r\nAll interfacing with Azure DevOps requires a [personal access token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops)\r\ngranting read+write access to work items, and which we refer to as `pat` below:\r\n\r\n```python\r\nfrom migrator import Migrator, SetFieldOperation\r\n\r\npat = 'wz13hy65okghxfuodbvk3tmkilefxnx6gret04sl1m0didiocept'  # Placeholder: Replace with your own PAT\r\nyt_base = \"https://my-youtrack-instance\"\r\nado_organization = \"https://dev.azure.com/organization-name\"\r\nado_project = \"project-name\"\r\nmigrator = Migrator(pat, yt_base, ado_organization, ado_project)\r\n```\r\n\r\nWith this, you may want to first get a list of available custom fields on a given\r\nYouTrack issue, say `AB-123`:\r\n\r\n```python\r\nprint(migrator.custom_fields('AB-123'))\r\n```\r\n\r\nThese custom fields can then be used to define how to migrate a particular issue or\r\nYouTrack project; for instance, to move YouTrack fields `'Priority'` and `'Estimation'`\r\nto Azure DevOps fields `'Task Priority'`, `'Estimation'`, define a handler through\r\n\r\n```python\r\ndef custom_field_handler(fields):\r\n    priority = fields[\"Priority\"].get(\"name\", \"\")\r\n    yield SetFieldOperation(\"Task Priority\", priority, False)\r\n\r\n    estimation = fields[\"Estimation\"].get(\"presentation\", \"\")\r\n    yield SetFieldOperation(\"Estimation\", estimation, False)\r\n```\r\n\r\nHere, the keys `'name'` and `'presentation'` depend on the type of custom field and\r\ncan be read from the output of `migrator.custom_fields` above.\r\n\r\nNote that when using \"Task\" as work item type in Azure DevOps Boards, some fields, such\r\nas `System.State` and `System.Reason` can only be set after the work item has been\r\ncreated; for such fields, use `True` for the third parameter above.\r\n\r\nWith this, we can migrate a particular issue through\r\n\r\n```python\r\nmigrator.migrate_issue('AB-123', custom_field_handler)\r\n```\r\n\r\nor an entire project through\r\n```python\r\nmigrator.migrate_project('AB', custom_field_handler, issue_count_upper_limit=50000)\r\n```\r\n\r\nwhere here, `number_of_issues` is simply any number greater than the number of issues\r\nin the project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuglede%2Fyoutrack-to-azure-devops-boards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuglede%2Fyoutrack-to-azure-devops-boards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuglede%2Fyoutrack-to-azure-devops-boards/lists"}