process-migrator icon indicating copy to clipboard operation
process-migrator copied to clipboard

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

Open monteholyfield opened this issue 5 years ago • 9 comments

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

monteholyfield avatar Jan 11 '20 00:01 monteholyfield

@monteholyfield hey sorry can't commit when I can look deep into this but can you attach exported xml? My best guess at this point stays the code shall not try to update the value on server but it's likely marked as 'non default' during export because of the new feature you mentioned on completed category customization.

liang2zhu1 avatar Feb 03 '20 17:02 liang2zhu1

Hi Liang,

Thank you for response.

Is there a way to export XML from an inherited process template? I see this section in the exported JSON from the process-migrator. The yellow ‘Approved’/’Completed’ value is the one causing trouble. Let me know if you need to see the entire exported JSON file.

{
  "workItemTypeRefName": "HWValidation.HWECR",
  "states": [
    {
      "id": "195e4dbf-a0ff-4dcb-ae07-ca4a504fc7b7",
      "name": "Pending Review",
      "color": "D5D5D5",
      "stateCategory": "Proposed",
      "order": 1,
      "url": "https://dev.azure.com/MR-HW/_apis/work/processDefinitions/a820e108-d03d-4ccc-ac38-6798f2fa6670/workItemTypes/HWValidation.HWECR/states/195e4dbf-a0ff-4dcb-ae07-ca4a504fc7b7"
    },
    {
      "id": "ca79fffe-339c-4448-88a4-c9aa8206f6fe",
      "name": "Rejected",
      "color": "e60017",
      "stateCategory": "InProgress",
      "order": 2,
      "url": "https://dev.azure.com/MR-HW/_apis/work/processDefinitions/a820e108-d03d-4ccc-ac38-6798f2fa6670/workItemTypes/HWValidation.HWECR/states/ca79fffe-339c-4448-88a4-c9aa8206f6fe"
    },
    {
      "id": "ccce3681-df84-4dc6-9289-3219cabe03dc",
      "name": "Approved",
      "color": "4E9D5D",
      "stateCategory": "Completed",
      "order": 3,
      "url": "https://dev.azure.com/MR-HW/_apis/work/processDefinitions/a820e108-d03d-4ccc-ac38-6798f2fa6670/workItemTypes/HWValidation.HWECR/states/ccce3681-df84-4dc6-9289-3219cabe03dc"
    }
  ]
}

Thanks, Monte

-- [cid:[email protected]]https://www.microsoft.com/microsoft-hololens/en-us Monte Holyfield Senior Hardware Engineering Program Mgr Microsoft HoloLens

Office: +1 (425) 421-1355 Mobile: +1 (425) 505-1433 [email protected]mailto:[email protected]

[Linkedin]https://www.linkedin.com/in/monteholyfield

From: Liang Zhu [email protected] Sent: Monday, February 3, 2020 9:41 AM To: microsoft/process-migrator [email protected] Cc: Monte Holyfield [email protected]; Mention [email protected] Subject: Re: [microsoft/process-migrator] Custom Completed State Category - now supported in inherited process templates, but fails during migration (#42)

@monteholyfieldhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmonteholyfield&data=02%7C01%7Cmonte.holyfield%40microsoft.com%7C06263fb024ab4ca5750e08d7a8d03dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637163484655627970&sdata=aZOKCm%2Fce4zbk2oZyWg7RnFs%2BD3ZKmTLkw6vFKKcrtM%3D&reserved=0 hey sorry can't commit when I can look deep into this but can you attach exported xml? My best guess at this point stays the code shall not try to update the value on server but it's likely marked as 'non default' during export because of the new feature you mentioned on completed category customization.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fprocess-migrator%2Fissues%2F42%3Femail_source%3Dnotifications%26email_token%3DAOH33OK3CMRCIZI647MW3RTRBBJK7A5CNFSM4KFPFG52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUXLGA%23issuecomment-581531032&data=02%7C01%7Cmonte.holyfield%40microsoft.com%7C06263fb024ab4ca5750e08d7a8d03dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637163484655637950&sdata=aawW%2B8ewTBK6lKRHE2BNr8N%2FtMrF8F%2BxGVmaZGknnWY%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOH33OICTPEAYLS6OVW4RVDRBBJK7ANCNFSM4KFPFG5Q&data=02%7C01%7Cmonte.holyfield%40microsoft.com%7C06263fb024ab4ca5750e08d7a8d03dbe%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637163484655637950&sdata=3HwtfcYTYQ8BLwpOovcykuodzJBV9sC7dMpCzTvXdVo%3D&reserved=0.

monteholyfield avatar Feb 03 '20 19:02 monteholyfield

We're hitting the exact same problem with process-migrator - for a custom state in "Completed" category on a custom work item type, even though this works beautifully in the web UI of AzDO:

[VERBOSE] [2020-04-07T12:40:36.712Z] 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. (C:\npm\prefix\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:173:31) at Generator.next () at fulfilled (C:\npm\prefix\node_modules\process-migrator\node_modules\typed-rest-client\RestClient.js:6:58) at processTicksAndRejections (internal/process/task_queues.js:97:5)

ross-bohr avatar Apr 08 '20 09:04 ross-bohr

Below is the API call made when modifying through browser: Request URL: https://dev.azure.com/{OrgName}/_apis/work/processes/{processid}/workItemTypes/{processname}.Feature/states Request Method: POST Status Code: 201 Payload {name: "Complete", stateCategory: "Completed", color: "4E9D5D", order: null} color: "4E9D5D" name: "Complete" order: null stateCategory: "Completed"

AjKundnani avatar Jul 09 '20 05:07 AjKundnani

Hi, Any update on this issue? I'm getting the same error even changing for a already definined Completed state Thanks

tasb avatar Jul 28 '20 16:07 tasb

+1 - Also just encountered this

chrisreddington avatar Nov 19 '20 12:11 chrisreddington

+1, This issue is still present.

Damandan avatar May 21 '21 08:05 Damandan

@liang2zhu1 Any word on when you might have a look at this?

Damandan avatar May 21 '21 08:05 Damandan

@liang2zhu1 Can you let us know if someone is working on this particular issue? If not the community may be able to assist but we'd like to know we're not duplicating effort. We're encountering this issue now more often and its a spanner in the works of our automation.

dwjobling avatar Feb 03 '22 11:02 dwjobling

Our team is dedicated to providing continuous support for this extension. To ensure efficient issue resolution, we will close any old or inactive issues. If you come across any new problems, please create a ticket, and we will promptly address and resolve them. Thank you for your cooperation and understanding.

AminTi avatar Jul 13 '23 12:07 AminTi

#83

christian-skj avatar Jul 14 '23 08:07 christian-skj