TFS 2013 - Description HTML Field Can't Be Required - tfs

Fellow TFS users and/or junkies,
We are using TFS 2013. When I add required for Description HTML (Microsoft.VSTS.Common.DescriptionHTML), the default value still shows up as "As a I want so that ", THUS it doesn't require the user to fill anything in and it doesn't show up yellow. Sure, I could change the field, but we already have many things linked to Description HTML and can't risk changing the fields (reports and such are already setup). How would I change this so either:
A. It is empty and will show up required OR
B. It requires the user to change the value
Things I tried:
Setting the value to empty. Won't allow me to have both empty AND required.
Setting Default Value to empty. Won't allow me to that either.
Setting Prohibited Values to the default text it has. Not allowed for the field.
Applying a WhenNotChanged rule for the field and setting it to required. It already has a value so it doesn't matter if it's required or not.

I've just looked into a similar tfs machine.
It's just a defined "Default" rule but not in the "Fields" tab but in workflow tab.
In my case, it was in the initial transition rule.
To be specific:
Like you can guess, using Power Tools;
open the work item
go to the "Workflow" tab.
In the designer, double click the (most possibly) first transition element to view its settings
In the window opened, go to the "Fields" tab
If you see "Description" field there, double click it
Remove the "Default" rule
Now, you don't have a default text. You can set it "Required" and it'll be ok.
Close all, go to Fields tab of work item and set a required rule in a way as you expected initially.

Related

TFS 2015 Copy Template URL dropping value

Using TFS 2015 we have several custom fields on a PBI work item.
These fields are type Int and have ALLOWEDVALUES rule of zero (0) to five (5).
When I try to create a template by creating a new template by clicking on the Copy Template URL and the value of the custom field is zero the resulting url contains:
&%5BMyCompany.MinorRelease%5D=
If I set it to any other allowed value I get:
&%5BMycompany.MinorRelease%5D=2
Is there a way to make the valid value of Zero appear?
I can reproduce the behavior too and have helped you submit a feedback on Microsoft Connect. You can track it here:
https://connect.microsoft.com/VisualStudio/feedback/details/1957055
And following are the workaround to this:
a). Since only the value "0" cannot appear in the URL, you can define a DEFAULT value "0" for the field, then the field value will be filled with "0" by default when you create the work item (The parameter will not appear in the URL when the field value matches default value.). And when you create a template URL with other values specified, the URL can show these values correctly.
b). The created URL is editable, you can add the value "0" behind "&%5BMyCompany.MinorRelease%5D=" manually and then share the updated URL to your team.

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..

JIRA gadget: how to disable a configuration field

Is there a way to disable a configuration field for a JIRA gadget based on the value of another field?
Example: when the user chooses 'Now' for field Foo, then the Date field is ignored. I'd like to disable the Date field. Can this be done? If so, how? I already do the ignoring part. But my only clue for the user that I am ignoring the Date field is my description for Date and Foo. It would be nicer to disable the Date field as well.
If you want to do anything other than use the built-in gadget controls with their standard behaviors, you need to implement your own gadget configuration code instead of relying on the UserPrefs directly.
This means that, in practice, that you need to omit the "configuration form" from your gadget descriptor, which is this part:
config: {
descriptor: function(){...},
args: {Function, Array}
},
After having removed that, your gadget will then need to build its own UI and decide itself whether or not it still needs to be configured, as well as call gadget.getPref() and gadget.savePref() to get/set your user's gadget configuration options in the parent container.
I should add that this is a fair amount of work. You might be able to do some hacky jQuery to override the standard controls built without doing the above, but this will not likely be portable to different parent containers (or even different versions of JIRA).

How can I add text to a work item

We have a few bugs and change requests which have a complicated iteration path. This results in people coming over the team to ask 'Where do we raise items' a lot.
As you can't set a default value for the iteration path in TFS 2010 we think the best solution would be to add a string of text under the field which we can manually update every 7 weeks with the correct area to raise items in.
However TFS doesn't seem to allow just a line of text on its work items as a control. Is there a way to add a line of display text i.e. Not a field you edit, but just to inform those writing the items?
Please note that it needs to be visible at all times, using the tooltip 'help text' field on a control is not enough in this case.
You can use the LabelControl for this purpose.
You can not have a default in the work item for the iteration path, but what you can do is making use or the template url in web access or the work item templates in the power tools to create a work item that is prepopulated with values.
What about a custom field with a display control in read-only? You can give a default value to the field and the "read-only" control prevent other to change it.

Rename work item type fails

In TFS2010/TFSPowerTools2010/Process Explorer I am creating a custom process template. I define a new work item type (WIT) called "Enhancement" copied from the CMMI "Change Request" WIT.
Then I want to rename the friendly field name of the work item type "System.Title" (called "Title") to "Summary".
When I upload my custom process template to the TFS server and create a team project, and then create a new Enhancement, the info in the required field text still shows :
"TF20012: Field "Title" cannot be empty.
Why ?
(I want to see "TF20012: Field "Summary" cannot be empty.)
What you can do is create a new field and make it required. Call it Summary, etc. Change the Title label and textbox from the stock values and point it to your new field. Do not remove the System.Title field from the field list.
In the work flow, use the Summary value to populate the System.Title field, which is not on the form. Then if they try to save without a Summary, they will get the correct error and System.Title will have a valid value for reporting.
Be sure you account for the System.Title field everywhere it is referenced in the work flow.
You aren't able to rename a system field like System.Title. It's used by other work item types across the team project collection and the server instance. It also has to be filled in by the default rules. You can rename the "label" that gets shown to the end user by going to the layout tab of the work item type editor (in the TFS Power Tools) and find the control and change it's label attribute but leave the field the same.
In Visual Studio I was looking at a WinForm and saving the form I got this error:
Microsoft Visual Studio Save failed.
TF20012: Field 'Title' cannot be empty.
OK
Since its a TF error I closed all the Work Items (even unsaved ones...) and then saving the Winform worked.
I am not sure how VS thought the Work Item was the active code window I saw looking at.

Resources