Share via

Create Page on Organization Process Work Item Types Using Rest API

Vikas Surve 6 Reputation points
2023-08-22T10:55:13.03+00:00
If I am trying to create a page on Microsoft.VSTS.WorkItemTypes.Feature or Bug or any other standard work item types in process, we are not able to add or update layout by adding page or field using REST API  As well as Field Throwing Error Message as VS403115:You cannot modify form layout information for work item types Microsoft.VSTS.WorkItemTypes.Bug in process 684c9689-fd2d-45d7-ab3a-e411c08d39fd as these work item types are locked.

https://dev.azure.com/TennantA/_apis/work/processes/684c9689-fd2d-45d7-ab3a-e411c08d39fd/workItemTypes/Microsoft.VSTS.WorkItemTypes.Feature/layout/pages?api-version=7.0

Body

{

    "id":"Microsoft.VSTS.WorkItemTypes.Feature",

    "label": "SamplePageBug",

    "order": "1",

    "overridden": "false",

    "inherited": false,

    "visible": "true",

    "locked": false,

    "pageType": "Custom",

    "contribution": false

}

Response: 

{

    "$id": "1",

    "innerException": null,

    "message": "VS403115:You cannot modify form layout information for work item types Microsoft.VSTS.WorkItemTypes.Feature in process 684c9689-fd2d-45d7-ab3a-e411c08d39fd as these work item types are locked.",

    "typeName": "Microsoft.TeamFoundation.WorkItemTracking.Server.FormLayout.FormLayoutInfoNotAvailableException, Microsoft.TeamFoundation.WorkItemTracking.Server",

    "typeKey": "FormLayoutInfoNotAvailableException",

    "errorCode": 0,

    "eventId": 3200

}



When we did some modifications on the Azure devops portal and its change type from Microsoft.VSTS.WorkItemTypes.Feature to SampleProcess.Bug all operations like insertion and updation working fine

https://dev.azure.com/TennantA/_apis/work/processes/684c9689-fd2d-45d7-ab3a-e411c08d39fd/workItemTypes/SampleProcess.Feature/layout/pages?api-version=7.0

Body

{

    "id":"Microsoft.VSTS.WorkItemTypes.Feature",

    "label": "SamplePageBug",

    "order": "1",

    "overridden": "false",

    "inherited": false,

    "visible": "true",

    "locked": false,

    "pageType": "Custom",

    "contribution": false

}

Response is 

{ 

    "id": "2722fc8b-5dcc-479d-b21e-c9333cf31e60", 

    "label": "SamplePageBug", 

    "pageType": "custom", 

    "visible": true, 

    "isContribution": false, 

    "sections": [ 

        { 

            "id": "Section1", 

            "groups": [] 

        }, 

        { 

            "id": "Section2", 

            "groups": [] 

        }, 

        { 

            "id": "Section3", 

            "groups": [] 

        }, 

        { 

            "id": "Section4", 

            "groups": [] 

        } 

    ] 

}


Community Center | Not monitored
0 comments No comments

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 71,016 Reputation points Moderator
    2023-08-22T11:45:13.9466667+00:00

    Hi @Vikas Surve

    Welcome to Microsoft Q&A! Thanks for posting the question.

    DevOps is currently not supported in the Q&A forums, the supported products are listed over here https://docs.microsoft.com/en-us/answers/products (more to be added later on).

    You can ask the experts in the dedicated forum over here:

    https://stackoverflow.com/questions/tagged/devops

    https://developercommunity.visualstudio.com/spaces/21/index.html

    Please 'Accept Answer' if it helped so that it can help others in the community looking for help on similar topics.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.