Create Page on Organization Process Standard Work Item Types Using Rest API

Vikas Surve 6 Reputation points
2023-08-30T04:19:58.7066667+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": [] 

        } 

    ] 

}
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
43,274 questions
{count} votes

Your answer

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