Prevent deletion of items that are locked - tfs

Does anyone know if there is a way to prevent items that are at state "Closed" from being deleted? Or maybe there is a workaround type of way to do this?
We work in a regulated environment so we have a condition where we cannot delete items once they are closed(as they also go into read only) unless its for maintenance reasons.

There isn't any way to control this base on work item state. The workaround would be disable the "Permanently delete work items" and "Delete and restore work items" permission for normal users.

Related

Unable to drag and drop workitems on board from one state to another

Unable to drag and drop workitems on the board in TFS2013 whereas manually able to change the status from one to another (example: In progress to Done etc.). It's not happening for all the users, only few not able to perform this. Is this sort of permissions issue? if yes, where would this need to be set to avoid the issue. Any ideas.
Yes, for work tracking permission, you could grant or restrict access to various work tracking features by granting users or groups specific permissions for an object, team project, or collection. Please double check Set permissions and access for work tracking
You could use tf command line to list two users' related permission. One could, another is not unable. This will narrow down the issue.
Another thing, instead of drag and drop work items on the board in TFS2013 to change work item status. Suggest you ask that user to change the work item status in the work item directly . He may lack of the related permission for that specific work item.

Can I disable copy/clone of work item?

We have customized out workitems to a far extent. Now the copy/clone are throwing exceptions. Can I disable copy/clone work item in TFS? Is it possible?
According to your description, seems you are meaning the feature as below screenshot:
There is no way to disable the feature directly in TFS, unless you restrict the user's related permission.
The user which want to copy/clone work item must have your View work items in this node, and your Edit work items in this node permissions set to Allow.
More details please refer this tutorial: Copy or clone work items

TFS (VSTS) Stakeholder Work Item Creation Permission

I've allowed my Stakeholders to create Work Items but I would like to restrict them to only be able to create bugs and NOTHING else. Currently they can create ANY Work Item type including Epics... I'm thinking there has to be a way to stop this but I can't seem to find it.
There is no setting for this. And there is already a similar feature request submitted on VSTS User Voice: Hide Work Item Types (WITs) based on permission/security group.

TFS 2010 Work Item State Change Date / Changed By User Fields are Updated Unexpectedly

Our company is moving to TFS to manage development activities and the State Changed Date and Changed By Fields are an important part of auditing who did what / when.
The problem I'm running into is that the default work item template (CMMI) assumptivly changes these values based on temporary selections in the state dropdown rather than the actual state transition chosen by the user on Save.
Example: Work item is in Active state. User opens state dropdown, accidentally selects 'Closed' but doesnt save, selects 'Resolved', saves the state change from 'Active to Resolved'.
Issue / Bug: Because they accidentally moused over and selected 'Closed', TFS also set the Closed By and Closed Date fields, even though the work item was never closed and no transition from Active to Closed was ever intended or saved by the user. This occurs with all states.
Since there is no way to prohibit accidental selection of states in the dropdown, this presents not only a major user experience issue, but can wreak havok on the integrity of the audit trail as theese fields can get overwritten at any time, even if the user never actually saves a transition from one state to the other.
Anyone else experiencing this and know of a template update to resolve?
You can solve this problem by using restrictions. For example:
Bugs can only be Activated by Testers
If Work Item Type = Bug, set Assign to to Tester and State to Active
From the above example, you can restrict your developers from activating the bug. You can also use the same method to restrict developers from resolving bugs, because developers should not be able to set a bug as Resolved.
With this type of restrictions, you can prevent wrong selections of Assign to and State fields as well as accidentally saving the Work Item with illegal values.
Thank you
Please vote up if this helps!

In TFS, how do I override the "keep items checked out when checking in" setting for a check in?

In Team Foundation Server, I want to use the setting to "keep items checked out when checking in" active, but I will eventually want to do a check in where it does not check it back out automatically.
How do I accomplish this without changing the setting every time? Is there a shortcut key I can use (pressing shift while checking in or something)?
I am also willing to do the reverse and keep the setting off and do something extra when I want to check in and keep the file checked out. I just don't want to have to change the setting every time.
I guess I'll put here what I put in the comments above so that this has an answer to it. Unfortunately there is no way to do this today in TFS. If this is something people are passionate about then I suggest they vote for it on our UserVoice site.

Resources