Code Monkey home page Code Monkey logo

process-migrator's Introduction

VSTS Process Migrator for Node.js

This application provide you ability to automate the Process export/import across VSTS accounts through Node.js CLI.

NOTE: This only works with 'Inherited Process', for 'XML process' you may upload/download process as ZIP.

Getting Started

Run

To run this tool you must have both NodeJS and NPM installed. They are available as a single package and instructions are below.

  • Install Node from https://nodejs.org/en/download/ or https://nodejs.org/en/download/package-manager/

  • Install this package through npm install process-migrator -g

  • Create and fill required information in config file configuration.json. See document section for details

    Just run process-migrator without any argument will create the file if it does not exist.

    CONFIGURATION FILE HAS PAT, RIGHT PROTECT IT !
  • Run process-migrator [--mode=<migrate(default)/import/export>] [--config=<your-configuration-file-path>]

Contribute

  • From the root of source, run npm install
  • Build by npm run build
  • Execute through node build\nodejs\nodejs\Main.js <args>

Documentation

Command line parameters
  • --mode: Optional, default as 'migrate'. Mode of the execution, can be 'migrate' (export and then import), 'export' (export only) or 'import' (import only).
  • --config: Optional, default as './configuration.json'. Specify the configuration file.
Configuration file structure
  • This file is in JSONC format, you don't have to remove comments lines for it to work.
  • The AccountUrl for the source and target is the root URL to the organization. Example: https://dev.azure.com/MyOrgName.
  • The Personal Access Token (PAT) for both the source and target must have the Work Items 'Read, Write, & Manage' permission scope.
{
    "sourceAccountUrl": "Source account url. Required in export/migrate mode, ignored in import mode.",
    "sourceAccountToken": "!!TREAT AS PASSWORD!! In Azure DevOps click on user settings personal access tokens an generate a token for source account. Required in export/migrate mode, ignored in import mode.",
    "targetAccountUrl": "Target account url. Required in import/migrate mode, ignored in export mode.",
    "targetAccountToken": "!!TREAT AS PASSWORD!! In Azure DevOps click on user settings personal access tokens and generate a token for target account. Required in import/migrate mode, ignored in export mode.",
    "sourceProcessName": "Source process name to export. Required in export/migrate mode, ignored in import mode.",
    "targetProcessName": "Optional. Set to override process name in import/migrate mode.",
    "options": {
        "processFilename": "Optional File with process payload. Required in import mode, optional for export/migrate mode.",
        "logLevel":"log level for console. Possible values are 'verbose'/'information'/'warning'/'error' or null.",
        "logFilename":"Optional, file name for log. defaulted to 'output/processMigrator.log'.",
        "overwritePicklist": "Optional, default to 'false'. Set as true to overwrite picklist if exists on target or import will fail when picklist entries varies across source and target.",
        "continueOnRuleImportFailure": "Optional, default to 'false', set true to continue import on failure importing rules, warning will be provided.",
        "skipImportFormContributions": "Optional, default to 'false', set true to skip import control contributions on work item form.",
    }
}
Notes
  • If extensions used by source account are not available in target account, import MAY fail
    1. Control/Group/Page contributions on work item form are by default imported, so it will fail if the extension is not available on target account. use 'skipImportFormContributions' option to skip importing custom controls.
  • If identities used in field default value or rules are not available in target account, import WILL fail
    1. For rules you may use 'continueOnRuleImportFailure' option to proceed with rest of import when such error is occurred.
    2. For identity field default value, you may use 'continueOnFieldDefaultValueFailure' option to proceed with rest of import when such error is occurred.
  • Personal Access Token (PAT) needs to allow "Read, write, & manage" access for the "Work Items" scope
    1. The tool needs to be able to modify the definition of work items and work item types (to add custom fields for example).

process-migrator's People

Contributors

agray0232 avatar aminti avatar danhellem avatar liang2zhu1 avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mikewo avatar molausson avatar mrhinsh avatar msftgits avatar ojferro avatar ryandkyle avatar tspascoal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

process-migrator's Issues

Overwriting existing fields

I want to just ask a question about usage before I try something. Just in case there is a better way, or I have blocked myself and am wasting my time.

Background

I have two Azure DevOps instances, both with, in theory, the same inherited template. This has up to now been kept in sync manually; hence the 'in theory'

I have some custom fields in these templates.

Problem

If I try to do a migrate from one instance to another I get the error

Import failed, see log file for details. Create field 'Location' failed, see log for details.

On looking at the code I can't see any flag or handing for overwriting an existing field. But after a bit more thought I realised that this might not be straight forward. An overwrite would only work if the only reference to the field was by name (no GUID used or the like)

Options

The options I see are

  • Delete the field definition on the target instance, but this will result in data loss (I think)
  • Write some re-mapper - something I would like to avoid

Any comments or have I missed something obvious?

Why put Target for Export?

The documentation implies that entering the target information is required for Export, but it should not be.

connect ETIMEDOUT 13.107.6.183:443

Hi ,

Getting below error when trying to migrate the process template.

connect ETIMEDOUT 13.107.6.183:443
Exception message:connect ETIMEDOUT 13.107.6.183:443
Call stack:Error: connect ETIMEDOUT 13.107.6.183:443
at Object._errnoException (util.js:992:11)
at _exceptionWithHostPort (util.js:1014:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[ERROR] [2019-06-20T07:34:01.009Z] Import failed, see log file for details. Failed to add field 'Custom.ScrumMaster' to work item type 'PhilipsAgileProcess.IterationReport', see logs for details.

Please help

System Default Date fields not getting updated for Custom WIT types

I have a azure devops org in which I have inherited Agile process template where we have added custom WITs with states New,Active,Resolved , Closed.

The custom WITs are not updated with system default date fields "Activated Date" and "Resolved Date" when the state changes to either "Active" or "Resolved". The same works for the existing work items of the template like Bug/User Story or Task.

Can anyone help me on how we can get this issue fixed for custom work items as well.

"Current user is not member of group" Condition in Rule is ignored

When using a "Current user is (not) member of group"-Rule no condition is saved in export JSON.
Rule in DevOps:
image

Rule in exported JSON-File:

    {
          "id": "2e9c6ee1-9e10-46d2-8e49-49132d8e5c41",
          "friendlyName": "\"Manuell Config Steps\" Read Only For Ext-Users",
          "conditions": [],
          "actions": [
            {
              "actionType": "$makeReadOnly",
              "targetField": "Custom.ManualConfigsteps",
              "value": null
            }
          ],
          "isDisabled": false,
          "isSystem": false
        },

Rules import fails when a field picklist has a new value

I'm importing a process to a target organisation that already has an old version of my process. This normally works fine (so long as the process name is different) but, in this case, my source organisation Process has had a new value added to one of the picklist fields on the User Story work item type and rules have been defined for the User Story that apply when that new picklist value is used. When process-migrator imports the updated process it fails when importing the rule saying that the new picklist value is not one of the valid values and then lists the valid values, which do not include the new one that has been added....

[VERBOSE] [2021-01-07T16:25:17.471Z] Begin step 'Create rule '139afccb-54e6-4d27-9d07-4a5f216af1cf' in work item type 'PowerObjectsAgile0.7.UserStory''.
[VERBOSE] [2021-01-07T16:25:17.746Z] Exception message:VS403221: The value 'Fit with technical configuration' is not an allowed value for field 'HCL_FitGap'. Valid values are Fit, Gap, Partial, TBC.
Call stack:Error: VS403221: The value 'Fit with technical configuration' is not an allowed value for field 'HCL_FitGap'. Valid values are Fit, Gap, Partial, TBC.
at RestClient. (C:\Users\einar.larusson\AppData\Roaming\npm\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:173:31)
at Generator.next ()
at fulfilled (C:\Users\einar.larusson\AppData\Roaming\npm\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:6:58)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[ERROR] [2021-01-07T16:25:17.747Z] Import failed, see log file for details. Unable to create rule '139afccb-54e6-4d27-9d07-4a5f216af1cf' in work item type 'PowerObjectsAgile0.7.UserStory', see logs for details.

I can see that early in the process-migrator log the picklist field gets created successfully...

[VERBOSE] [2021-01-07T16:21:20.741Z] Begin step 'Create picklist for field Custom.HCL.PowerObjectsAgile.FitGap'.
[VERBOSE] [2021-01-07T16:21:21.387Z] Finished step 'Create picklist for field Custom.HCL.PowerObjectsAgile.FitGap'.

So why can't the rule be created successfully? It seems like the rule creation isn't aware that the list of values on the field has changed.

If I manually add the new picklist value to the field in the target organisation for the old version of the process and then re-run the import to bring in the new version, the updated process loads just fine.

Note that I've tried resolving the problem by setting the "overwritePicklist" option to true but that made no difference.

cryptic error if missing sufficient permissions to export

I'm trying to generate a source account token with minimal permissions needed for exporting. When permissions are insufficient, I get an ECONNRESET error from the API:

INFORMATION] [2018-11-19T21:55:49.985Z] Full log is sent to '/Users/seanknox/src/microsoft/process-migrator/output\processMigrator.log'
[VERBOSE] [2018-11-19T21:55:49.992Z] Keyboard listener added
[VERBOSE] [2018-11-19T21:55:49.992Z] Begin step 'Get rest client on source account 'https://myorgname.visualstudio.com/''.
[VERBOSE] [2018-11-19T21:55:50.514Z] Finished step 'Get rest client on source account 'https://myorgname.visualstudio.com/''.
[INFORMATION] [2018-11-19T21:55:50.515Z] Export process started.
[VERBOSE] [2018-11-19T21:55:50.515Z] Begin step 'Get source process Id from name'.
[VERBOSE] [2018-11-19T21:55:50.845Z] Finished step 'Get source process Id from name'.
[VERBOSE] [2018-11-19T21:55:50.846Z] Begin step 'Get artifacts from source process'.
[VERBOSE] [2018-11-19T21:55:53.586Z] Exception message:read ECONNRESET
Call stack:Error: read ECONNRESET
    at _errnoException (util.js:1031:13)
    at TLSWrap.onread (net.js:619:25)
[ERROR] [2018-11-19T21:55:53.586Z] Encountered unkonwn error, check log file for details.

Inherited Process Template named SCRUMUA didn't get exported to my other VSTS Account. Can you please do let me know what am i doing wrong.

Hi ,

  1. I installed the NPM through the โ€œnode-v8.11.3-x64โ€ from your link and it installed successfully.
  2. Then I create the PAT from both the Source VSTS account and from the Target VSTS account.
  3. Then I manually created the Configuration.json file.
  4. The Configuration.json file is in the attachments for your review, I changed the PATs from it for
    security reason.
  5. Then I ran the Node.Exe file.
  6. Command Prompt open and there I ran the command
    process-migrator [--mode=<migrate(default)/import/export> [--config=]

Which I ran on my machine like this:-

process [export [--config=C:\Users\uabbasi\Documents\configuration.json]

But the TFS Process Template named SCRUMUA didnโ€™t get exported to Target VSTS account.

I think the command i am running is incorrect so can you please let me know how to correct this command And if something else is missing or incorrect then can you please do let me know that.

If possible can you please share any video or stepbystep guide regarding how to use this process migrator which shall by very helpful for us.

I have attached the node.exe command prompt image and also the configuration.json file in this ticket.

process-migrator_command_running_through_node exe_on_comand_prompt

configuration.zip

Support field (control) and group order

When migrating custom and inherited fields and groups, the custom controls/groups are moved to the last placement in the UI (not retaining order). I've opened a PR for this that should retain ordering. url

398441

Good morning. I'm sure it is something simple but I'm getting an error when I try to run the process-migrator -- mode=export --config=./configuration.json command. For my sourceURL I have tried both https://XXXXXX.visualstudio.com and https://dev.azure.com/XXXXXX and every time I run the command, I get [Configuration validation] Missing or invalid source account url: 'undefined'

It looks like I ran the installation in the C:\Windows\System32 so that is where I am running the command.
Any help?
Thank you,
Ford

import: Exception message:VS403113: A group with label 'Details' already exists in page 'Details'.

Process does not exist before attempting import.

[VERBOSE] [2019-01-09T19:53:11.688Z] Begin step 'Create group '04978aea-1160-4579-a4f9-2d4f68678af9' in page 'Scrum.Bug.Bug''.
[VERBOSE] [2019-01-09T19:53:11.792Z] Exception message:VS403113: A group with label 'Details' already exists in page 'Details'.

Relevant process.json section:

{
                "id": "Section2",
                "groups": [
                  {
                    "id": "04978aea-1160-4579-a4f9-2d4f68678af9",
                    "label": "Details",
                    "isContribution": false,
                    "visible": true,
                    "controls": [
                      {
                        "id": "System.CreatedDate",
                        "label": "Found On",
                        "controlType": "DateTimeControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      },
                      {
                        "id": "PhilipsScrum.FoundBy",
                        "label": "Found By",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      },
                      {
                        "id": "7136ebcf-91cc-4724-980e-9e944e6e5ccd",
                        "label": "Module",
                        "readOnly": false,
                        "visible": true,
                        "contribution": {
                          "contributionId": "PhilipseICU.vsts-rest-picklist-control.picklist-form-control",
                          "inputs": {
                            "FieldName": "Custom.Module",
                            "Url": "https://dev.azure.com/patientcareanalytics/eICU/_apis/git/repositories/ALM/items?scopepath=GlobalLists.json&version=master ",
                            "Property": "$.Modules[*]",
                            "IsTreeView": "true"
                          }
                        },
                        "isContribution": true
                      },
                      {
                        "id": "48923dc1-0e1b-4a4a-bef3-107a2dd9fd6f",
                        "label": "Version Found",
                        "readOnly": false,
                        "visible": true,
                        "contribution": {
                          "contributionId": "PhilipseICU.vsts-rest-picklist-control.picklist-form-control",
                          "inputs": {
                            "FieldName": "PhilipsScrum.VersionFound",
                            "Url": "https://dev.azure.com/patientcareanalytics/eICU/_apis/git/repositories/ALM/items?scopepath=GlobalLists.json&version=master",
                            "Property": "$.ProductVersions[*]"
                          }
                        },
                        "isContribution": true
                      },
                      {
                        "id": "b4f8efa0-4f99-4999-84f6-a9cb294dbb1f",
                        "label": "Versions Where Present",
                        "readOnly": false,
                        "visible": true,
                        "contribution": {
                          "contributionId": "PhilipseICU.vsts-rest-picklist-control.picklist-form-control",
                          "inputs": {
                            "FieldName": "PhilipsScrum.VersionsWherePresent",
                            "Url": "https://dev.azure.com/patientcareanalytics/eICU/_apis/git/repositories/ALM/items?scopepath=GlobalLists.json&version=master",
                            "Property": "$.ProductVersions[*]",
                            "IsMultiSelect": "true"
                          }
                        },
                        "isContribution": true
                      },
                      {
                        "id": "PhilipsScrum.PLCStage",
                        "label": "PLC Stage",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      },
                      {
                        "id": "PhilipsScrum.IncidentSource",
                        "label": "Incident Source",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      },
                      {
                        "id": "PhilipsScrum.RequirementID",
                        "label": "Requirement ID",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      },
                      {
                        "id": "Custom.PreviousTFSID",
                        "label": "Previous TFS ID",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      }
                    ]
                  },
                  {
                    "id": "dcacc634-c5a4-44e6-86b6-fb08d2df17cd",
                    "label": "Complaint Info",
                    "isContribution": false,
                    "visible": true,
                    "controls": [
                      {
                        "id": "PhilipsScrum.ReportingCustomer",
                        "label": "Reporting Customer",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      },
                      {
                        "id": "PhilipsScrum.SupportTicket#",
                        "label": "Support Ticket #",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "visible": true,
                        "isContribution": false
                      }
                    ]
                  },
                  {
                    "id": "Scrum.Bug.Bug.Details",
                    "inherited": true,
                    "overridden": true,
                    "label": "Version Found",
                    "isContribution": false,
                    "visible": true,
                    "controls": [
                      {
                        "id": "Microsoft.VSTS.Common.Priority",
                        "inherited": true,
                        "overridden": true,
                        "label": "Priority",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      },
                      {
                        "id": "Microsoft.VSTS.Common.Severity",
                        "inherited": true,
                        "overridden": true,
                        "label": "Severity",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      },
                      {
                        "id": "Microsoft.VSTS.Scheduling.Effort",
                        "inherited": true,
                        "overridden": true,
                        "label": "Effort",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      },
                      {
                        "id": "Microsoft.VSTS.Scheduling.RemainingWork",
                        "inherited": true,
                        "overridden": true,
                        "label": "Remaining Work",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      },
                      {
                        "id": "Microsoft.VSTS.Common.Activity",
                        "inherited": true,
                        "overridden": true,
                        "label": "Activity",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      }
                    ]
                  },
                  {
                    "id": "Scrum.Bug.Bug.Build",
                    "inherited": true,
                    "overridden": true,
                    "label": "Defect Review",
                    "isContribution": false,
                    "visible": true,
                    "controls": [
                      {
                        "id": "Microsoft.VSTS.Build.FoundIn",
                        "inherited": true,
                        "overridden": true,
                        "label": "Found in Build",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      },
                      {
                        "id": "Microsoft.VSTS.Build.IntegrationBuild",
                        "inherited": true,
                        "overridden": true,
                        "label": "Integrated in Build",
                        "controlType": "FieldControl",
                        "readOnly": false,
                        "watermark": "",
                        "metadata": "",
                        "visible": false,
                        "isContribution": false
                      }
                    ]
                  }
                ]
              }

Unrecognized value 'whenCurrentUserIsNotMemberOfGroup' for property condition.conditionType.

I'm running a migration, the process.log says:

[VERBOSE] [2021-09-21T21:12:19.564Z] Begin step 'Create rule 'd6707080-f015-4711-8f04-136373a3966c' in work item type 'Test.Blazers''.
[VERBOSE] [2021-09-21T21:12:19.826Z] Exception message:VS1640105: Unrecognized value 'whenCurrentUserIsNotMemberOfGroup' for property condition.conditionType.
Call stack:Error: VS1640105: Unrecognized value 'whenCurrentUserIsNotMemberOfGroup' for property condition.conditionType.
    at RestClient.<anonymous> (/Users/mauriciohernandez/Documents/projects/az-devops/process-templates/process-migrator-lambda/process-migrator/node_modules/azure-devops-node-api/node_modules/typed-rest-client/RestClient.js:173:31)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/user/Documents/projects/epam/bayer/az-devops/process-templates/process-migrator-lambda/process-migrator/node_modules/azure-devops-node-api/node_modules/typed-rest-client/RestClient.js:6:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

and the process.json says:

{
        "conditionType": "whenCurrentUserIsNotMemberOfGroup",
        "field": null,
        "value": "f61824ac-44b2-42b2-be41-bd715dc04534"
}

Field name case sensitive - Source and Destination

I had a case where a field name was like below:

Source - "Working with"
Destination - "Working With"

The import gave me an error as it was unable to create the field as Azure DevOps see it as the same field but apparently the migratory doesn't and so tried to create a new one.

Cannot find module 'guid-typescript' on running process-migrator command

After installation I get following error when running the 'process-migrator' command:

module.js:550
throw err;
^

Error: Cannot find module 'guid-typescript'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/process-migrator/build/nodejs/common/Utilities.js:10:27)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)`

If I check the node-modules that are coming with the process-migrator package and the 'guid-typescript' is there.

Tried both with node 8.12.0 and with 8.9.4.

I'm getting below error when i migrate the Inherited process by using the Process-migrator tool, so please suggest work arounds for this

Begin step 'Create picklist for field CMMI_D365.BugSourceLevel'.
[VERBOSE] [2018-06-15T07:34:01.547Z] Finished step 'Create picklist for field CMMI_D365.BugSourceLevel'.
[VERBOSE] [2018-06-15T07:34:01.547Z] Begin step 'Create picklist for field CMMI_D365.Scope'.
[VERBOSE] [2018-06-15T07:34:01.644Z] Exception message:You must provide a value for the Items parameter.
Call stack:Error: You must provide a value for the Items parameter.
at RestClient. (C:\Users\User1\AppData\Roaming\npm\node_modules\process-migrator\node_modules\vso-node-api\node_modules\typed-rest-client\RestClient.js:173:28)
at Generator.next ()
at fulfilled (C:\Users\User1\AppData\Roaming\npm\node_modules\process-migrator\node_modules\vso-node-api\node_modules\typed-rest-client\RestClient.js:6:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[ERROR] [2018-06-15T07:34:01.645Z] Import failed, see log file for details. Failed to create picklist for field CMMI_D365.Scope, see logs for details.

Repeated 503 errors during import

I've been regularly getting 503 errors when importing a process template of late. It occurs at different points in the import process and if you delete the incomplete imported process from the target and retry it may or may not go through successfully. On occasion we have to run process-migrator 5 or 6 times to get it to successfully import on the target. I've uploaded the last log file that had this error and the associated exported process file.
output.zip

Here, I've run the import 3 times over the course of an afternoon with only the final attempt succeeding. In each case its the same source and target...
image

Migrator does not migrate layout items in the same order

The process finished successfully and all the layout items were migrated successfully, the issue is that they were not migrated in the same order.

I had these columns:

[Custom]
Status
Details

I'm expecting that after migration they will be the same, meaning same values and order, but it did not.

After migration it looked like this:

Status
Details
[Custom]

The solution for this issue should be that after migration items should look like the source before migration.

What to do with the number of picklists in the collection has reached the limit of 512

We are getting the below issue when we fix the issue and re run the process-migrator to a vanilla instance

Exception message:VS402846: The number of picklists in the collection has reached the limit of 512.
Call stack:Error: VS402846: The number of picklists in the collection has reached the limit of 512.
at RestClient. (C:\Users\v-karake\AppData\Roaming\npm\node_modules\process-migrator\node_modules\vso-node-api\node_modules\typed-rest-client\RestClient.js:173:28)
at Generator.next ()
at fulfilled (C:\Users\v-karake\AppData\Roaming\npm\node_modules\process-migrator\node_modules\vso-node-api\node_modules\typed-rest-client\RestClient.js:6:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[ERROR] [2018-06-27T11:39:44.095Z] Import failed, see log file for details. Failed to create picklist for field SCM_Dynamics_SSE_D365.365TargetCodeDrop, see logs for details.

Please suggest

Installation with npm fails ENOENT

I am trying to install process-migrator with npm install process migrator -g but it always fails with this message. Any ideas how I can solve this?

npm: '6.14.5'
node: '14.3.0'
OS: Linux 5.6.16-1-MANJARO

npm install process-migrator -g
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /home/tagru/.npm-global/lib/node_modules/process-migrator/build/nodejs/nodejs/main.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/tagru/.npm-global/lib/node_modules/process-migrator/build/nodejs/nodejs/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/tagru/.npm/_logs/2020-07-03T16_44_01_423Z-debug.log

Process Migrator Import works in one target site but fails with different errors in another target organization

hi Team,

I am using Process Migrator to migrate my inherited process from one organization to another in Azure Devops. I did not face any issue while migating to my personal organization. I tries changing the target account and retriggered migration to a different sit. however the same process was failing while import into the second target Organization, whereas it was working fine for the first target organization without any errors. Requesting your help asap.
Errors i got:
1.First time I got the below error:
Import failed, see log file for details. Unable to add 'Microsoft.VSTS.CMMI.Committed' control to group '53360de9-e8c7-4cf5-a864-389971142c12' in page 'd0171d51-ff84-4038-afc1-8800ab613160.System.WorkItemType.Details' in 'Agile_SS365_3.Requirement'. Error: Failed request: (503)

2.Second time I deleted the Process template half imported in Target site and retrigged export and i got the below error:
[VERBOSE] [2019-11-05T23:14:20.985Z] Begin step 'Add field 'System.State' to work item type 'Agile_SS365_3.ConfigurationDeliverable''.
[VERBOSE] [2019-11-05T23:14:21.799Z] Exception message:Failed request: (503)
Call stack:Error: Failed request: (503)
at RestClient. (C:\Users\T970651\AppData\Roaming\npm\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:173:31)
at Generator.next ()
at fulfilled (C:\Users\T970651\AppData\Roaming\npm\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:6:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] [2019-11-05T23:14:21.808Z] Import failed, see log file for details. Failed to add field 'System.State' to work item type 'Agile_SS365_3.ConfigurationDeliverable', see logs for details.

1.I am not sure why it is failing for the first attempt with error related to control.
2.I assume during the second attempt it is failing because the field already exists(not deleted on deleting the process template) in the target Organization. Can you please advice me the best way to handle this. I don't find a was to customize the field names before migration in Process Migrator. Can you please help

Thanks and Regard,
Sakthi

PAT Permissions

Thanks for this great tool! During migration I run into an "Error getting process on source account" and I'm asked to check the token permissions. Could you please advise which scopes are required to read/write a process? I don't want to give full access if not absolutely necessary.

Import fails with timeout error

Hi,

I am trying to import a process from one organisation to another. The export works fine, however the import fails with the below error message.

Exception message:connect ETIMEDOUT 13.107.42.20:443 Call stack:Error: connect ETIMEDOUT 13.107.42.20:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1117:14)

The failure happens during the middle of the import process. Therefore, the process gets created in the target org but not 100% complete since the import got timed out.

If i delete the process in the target org and do a re-import, it again fails during the middle of the import process due to the timeout error. There is no specific pattern to determine when it times out. Sometimes it imports approx 80% of the process, sometimes 60% and sometimes 50% and times out.

Passing the PAT

I need to run this as part of a VSTS CD process. How do I pass the configuration options without using the Config file?

It is not going to be feasible or posible to write the PAT token into a file!

Error with special characters.

We are getting the following error due to special characters in the field name. We are unable to modify the field name to make the script happy. Are there any workarounds that someone can suggest?

"
Exception message:VS402800: The name 'CustomerName(IDN)' is invalid. Names cannot be empty, exceed 128 characters, be a number, or contain the following characters: '.,;~:/*|?"&%$!+=()[]{}<>-เนŒ.
"

Thanks in advance,

Migrator does not migrate states in the same order

When the process migration finished, it did migrate all the states correctly but the order is not correct.

If we have the states A, C, B (in the given order), after the migration it will become A, B and C.

Solution:
The states order should be the same (values and order) as the source. AKA: A, C, B

Cannot use it behind company proxy

Hello, I can use the tool normally when I am out of VPN, but in my company, it gets blocked as requires a proxy. The proxy settings here are set up in windows, but seems it is not considering them. There is some parameter to pass the proxy or any hint on how to use it behind a proxy?

Custom Completed State Category - now supported in inherited process templates, but fails during migration

We are now able to create a custom value for the 'Completed' State Category. However, this fails with the following error when running the process-migrator. In this case, I created a Completed State named 'Approved' in the source work item template.

[VERBOSE] [2020-01-11T00:43:41.088Z] Exception message:VS403093: Team Services currently does not support changes to 'Completed' category. Choose a different category.
Call stack:Error: VS403093: Team Services currently does not support changes to 'Completed' category. Choose a different category.
    at RestClient.<anonymous> ([...]\npm\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:173:31)
    at Generator.next (<anonymous>)
    at fulfilled ([...]\npm\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:6:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
[ERROR] [2020-01-11T00:43:41.106Z] Import failed, see log file for details. Unable to create/hide/update state 'Approved' in 'HWDev.HWECRApproval' work item type, see logs for details

GUIDs and name strings in process.json

After exporting and looking at the process.json, there seems to be namings and guids that won't be replaced on import. does this make trouble in future?

We are getting errors with Group names while we migrate Inherited process to a vanilla VSTS account

Hi,

We have applied customization's on an Inherited process(VSTS) and trying to migrate this inherited process to a vanilla VSTS account, but we are getting below issue with process-migrator

Exception message:VS403113: A group with label 'General' already exists in page 'Details'.
Call stack:Error: VS403113: A group with label 'General' already exists in page 'Details'.
at RestClient. (C:\Users\v-karake\AppData\Roaming\npm\node_modules\process-migrator\node_modules\vso-node-api\node_modules\typed-rest-client\RestClient.js:173:28)
at Generator.next ()
at fulfilled (C:\Users\v-karake\AppData\Roaming\npm\node_modules\process-migrator\node_modules\vso-node-api\node_modules\typed-rest-client\RestClient.js:6:58)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[ERROR] [2018-06-27T11:14:22.814Z] Import failed, see log file for details. Failed to create group 'ad017ec5-4ac4-4f13-873e-634cdbf09988' in page 'CMMI.Task.Task', see logs for details.

Ideally we want the Group name as "General" and after fixing this, we are getting same set of errors for other WIT's as well.

So can you please suggest any work around and next step to proceed further and it's blocking us

Thanks in advance

Regards,
Rakesh

Running multiple times, when I hit this VS402846: The number of picklists in the collection has reached the limit of 2048

Hello,
We are trying to migrate the fields and WITs from one ADO to another. We hit upon a bunch of errors such as and slowly got to resolve them one by one.
Some examples are
Error: VS402803: Field name 'XXXXX' you specified is already in use, choose a different name
Error: VS403221: The value 'Email' is not an allowed value for field 'Channel'

However, after running this maybe 10 times, we have fully blocked ourselves with this exception, and it wont go any further.

Exception message:VS402846: The number of picklists in the collection has reached the limit of 2048

I looked up the list of fields on the Organization, and I do not see more than 224 fields that are Picklists (total list of fields is 613)

When I ran this multiple times, would you know if it created those many number of picklists every time? If there is something that can help me locate those zombie picklists that would be great!
Thanks in advance
Blocked!

Documentation incorrect for LogLevel.

Documentation states:

"logLevel":"Optional, log level for console. Possibe values are 'Verbose'/'Information'/'Warning'/'Error'.",

When it should be:

"logLevel":"Optional, log level for console. Possibe values are 'verbose'/'information'/'warning'/'error'.",

Setting logLevel to "Verbose" results in error

  • Also note spelling error in docs "Possibe" should be "Possible"

Error while running process-Migrator

C:\Users\xxxx\AppData\Roaming\npm>process-Migrator --config "C:\Users\xxxx\Desktop\configuration.json"
C:\Users\xxxx\AppData\Roaming\npm\node_modules\process-migrator\build\nodejs\nodejs\main.js:16
async function main() {
^^^^^^^^
SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)

npm version is 6.1
Please help in fixing this issue

Error -

I receive the error when trying to migrate an inherited process. I have provided the configuration contents (removed personal settings) below. I copied and pasted the URL from the ADO site, so am wondering is it supposed to be something different. I have been unable to find any examples of a filled out configuration file.

[Configuration validation] Missing or invalid source account url: 'Required in 'export'/'migrate' mode, source account url.'

{
"sourceAccountUrl": "https://dev.azure.com/MyOrganizationName/Test01",
"sourceAccountToken": "[Copied from Azure DevOps when created]",
"targetAccountUrl": "https://dev.azure.com/MyOrganizationName/Test02",
"targetAccountToken": "[Copied from Azure DevOps when created]",
"sourceProcessName": "NewTemplate",
"targetProcessName": "Set to override process name on import, remove from param name",
"options": {
"processFilename": "Set to override default export file name, remove from param name",
"logLevel":"Set to override default log level (Information), remove from param name",
"logFilename":"Set to override default log file name, remove from param name",
"overwritePicklist": false
}
}

VS403113: A group with label 'System Info' already exists in page 'Details'.

Why would I get this error in a migration of a process?

The process in the target did not exist before running this.

2018-09-26T09:45:11.4815277Z [VERBOSE] [2018-09-26T09:45:11.264Z] Exception message:VS403113: A group with label 'System Info' already exists in page 'Details'.
2018-09-26T09:45:11.4816018Z Call stack:Error: VS403113: A group with label 'System Info' already exists in page 'Details'.
2018-09-26T09:45:11.4817168Z     at RestClient.<anonymous> (C:\npm\prefix\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:173:28)
2018-09-26T09:45:11.4818244Z     at Generator.next (<anonymous>)
2018-09-26T09:45:11.4819565Z     at fulfilled (C:\npm\prefix\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:6:58)
2018-09-26T09:45:11.4821054Z     at <anonymous>
2018-09-26T09:45:11.4822460Z     at process._tickCallback (internal/process/next_tick.js:188:7)
2018-09-26T09:45:11.4823552Z [ERROR] [2018-09-26T09:45:11.264Z] Import failed, see log file for details. Failed to edit group 'Agile.Bug.Bug.System Info.WideGroup' in page 'Agile.Bug.Bug', see logs for details.
2018-09-26T09:45:11.6227377Z ##[error]Process-Migrator FAILED: Call stack:Error: VS403113: A group with label 'System Info' already exists in page 'Details'. [ERROR] [2018-09-26T09:45:11.264Z] Import failed, see log file for details. Failed to edit group 'Agile.Bug.Bug.System Info.WideGroup' in page 'Agile.Bug.Bug', see logs for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.