Avoid removing or unlinking workitem from Changeset
Dear Team,
Usecase: Do not Allow Removal of workitem linked to Changeset or viceversa.
Currently we are restricting the user not to deliver the Changeset without workitem.
But after Delivered to Stream, Users are able to remove the linking of Changeset from Workitem or even go to history and remove the link to workitem.
Do you have any idea how can i avoid this?
Thanks
Accepted answer
To add to Baraths answer, there is a specific permission that grants roles permission to save/modify change set links
(Source Control>Save Change Set Links and Comments (server)) but this does not distinguish between adding or removing. A developer has to be able to add a change set link so they have the permission to delete it as well.
From my perspective it would also not make sense that a developer can only add a link. They need to be able to correct stuff. You also want to consider that you can create a bureaucratic nightmare if you have too many rules. A developer only being able to add a link to a change set and having to get an admin to remove it in case it was accidental makes no sense.
Controlling of change set creation and removal can be controlled using operational behavior. In Source Control>Save Change Set Links and Comments (server) operation behavior there are 4 advisors that e.g. prevent from linking to closed work items etc. It is possible to create custom advisors if it is possible to find a useful rule. In this case you might consider prevent removal of work item links to change sets if the change set is complete, or some other rule.
This is something that services could provide.
Comments
One other answer
You could remove the permission "Modify work item links" for that particular role.
Refer:
Please let me know if you still need help!