Is there any custom option to lock work item for specific iteration? - tfs

I'm trying to lock/deny the option to open a new work item with specific iterations.
I tried to do it with a custom field with same value of iteration id and
<PROHIBITEDVALUES> rule.
Then I understood that its not possible because iteration-id field load only after I press the "save" button and its too late.
There any other ideas how to do it?

There is not any build-in option to hide older/specific iterations in the Work Item field.
However, you can set the security for "Edit work items in this node" to deny and they will not be able to save work items with the area or iteration selected.
Besides you could also hide the iteration node(s):
Open Project settings>Project configuration
Select the Iteration Tab
Select the iteration that you want to hide
Click on Security > Add a "Deny View" permissions for the users that
you want to hide the nodes from.
The user will not able to see the iteration in the sprint.
update:

Related

Can you add a drop-down box for BoardColumn in TFS?

In TFS, is it possible to add a drop-down box to the work item form that allows you to select/change the System.BoardColumn? Or is it only possible to change a board column via drag/drop on the board itself? This is in on premise TFS 2015
Use case: Sometimes we have an item open during a meeting to discuss it in depth. It would be easier to select a new column while the item is open for edit already than saving the item, then going back to the board to move it.
System.BoardColumn is a read-only field, you are not able to add a drop-down box for this field.
A workaround is mapping the State to the BoardColumn, and change the State field instead of BoardColumn field.

Hide Area and Iteration Names users don't have permission to view

I have end users going in as stakeholders and adding new work items. we have a long list of areas and iterations.
I have created a custom group and denied them access to all areas and iterataions except the one they need but when they go create workitem, they can still see all the areas and iterations.
Yes, they cannot save workitem under an area/iteration that they don't have access to but is there a way to display only those areas and iterations that they have access to?
There is no such work item rule by default to hide Area and Iteration Names, you would need to customize your own work item control. The source below can help you start how to customize a work item control:
https://witcustomcontrols.codeplex.com/

DateTime of sprint backlog task status change to "Done"

Is there a field in TFS or any way to get the datetime value on which a sprint backlog task was changed to done?
I spotted an AuthorizedDate field but I'm not sure if it's out of the box or not.
Suggestions will be appreciated.
It is possible to get TFS to do this for you if your template isn't already set up to do so.
Start the TFS Process editor (Install TFS power tools if needed), connect to TFS and edit the WIT Task.
Create a new field called (For Example) CompletedDate with a suitable reference name (For example: StackOverFlow.Questions.TaskCompletedDate).
Set it to be of type DateTime.
Next go to the workflow tab and do the following for each of the transitions to the done state:
Right Click, select open details
Select the fields tab, click new.
Enter the reference name of the field you create above (StackOverFlow.Questions.TaskCompletedDate).
Select the Rules Tab and click new.
Select SERVERDEFAULT from the list of rules
On the dialog that appears, set the from field to clock.
Click OK, OK, OK to get back to the workflow.
Save the Work Item Definition.
See:
https://msdn.microsoft.com/en-us/library/ms194981.aspx
When your work item is set to done the closed date and closed by fields are set automatically.
These fields are part of all of the default templates.
Some of the older 2012 & 2013 templates did not include this for tasks and you would have to adds it', however you should use the out of the box provided fields and not create new ones. If you are reporting in this it's a nightmare if each work item type had its own way of doing things. Use the System.ClosedDate and System.ClosedBy field. You can copy the setup from the PBI or Bug work items..

How to add edit items to the predefined lists in TFS Work Items

I am trying to follow this article to do the same for adding a new State to a particular project's Bug work item. By default I can only see . I wanted to add a new state, "On Hold"
But I perhaps followed it wrong and ended up getting
The error says "Open Transition Active~On Hold to add at least one Reason." How do I open that transition and where do I add one reason. What is the reason it is talking about? I only want to add a new state.
Thanks for your time...
Double click the Active~On Hold Transition , select the Reasons tab and type in at least one reason.
After saving the .wit file, you must click Refresh from the Team Explorer menu in order to see changes.
In the work item editor, double click on the Transition between your Active and On hold states. Under 'Transition Detail' you should see 'From: Active' and 'To: On Hold'. Change 'From: Active' to blank so it should show 'From: '. Now save the editors, click 'refresh' from the Team Explorer menu and any new bugs you create will have 'On Hold' as an option for the state.

jQuery: how to go into sort mode, get out of it, apply order, and cancel sort?

I want the user to be able to trigger sorting mode. It's because I find that with long lists, updating takes long. If updating the position happens every time an item is dropped, it'd be slow and expensive.
This means that when they trigger the sorting mode, let's say by clicking on Start sorting, that's when I apply the .sortable(...) to the list I want them to sort.
My problem lies in these:
How do I disable the automatic update after everytime an item is dropped?
If the user decides that they don't want to sort it after all, how do I cancel it?
Thanks!
If you have a button that you want to use to "Start Sorting" the sortable, I would recommend this approach, assuming you have a DIV with an ID of "MyList"...
On document load or Init, create the sortable and deactivate it...
$(init);
function init() {
$("#MyLIst").sortable();
$("#MyLIst").sortable("disable");
}
Then when the user clicks the "Start Sorting" button...
$("#MyLIst").sortable("enable");
At this point I would prefer to change the "Start Sorting" button to "Finish Sorting", and when this button is clicked...
$("#MyLIst").sortable("disable");
I know this is an old question so I point out that this uses the latest JQuery as described here. I am not sure what the minimum version is that would allow for this to work.

Resources