TFS 2015 Copy Template URL dropping value - tfs

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.

Related

Looking to fill out most or all of the Fed Ex "Create Label" page using URL query string

Looking to create a shipment on www.fedex.com
But fill out most of the fields using a query string at the end of a URL.
Seems like this might not be possible, but need help figuring out how to know whether it is or not.
My "Create Labels" page has a URL ending in -- ?method=doInitialize&utype=null ,
or else sometimes ...
-- ?method=doEntry&link=1&locale=en_US&urlparams=us&sType=F
so it seems promising. Just not sure how to access the names of the required fields (Contact name, Address 1 and 2, etc ) besides guess and check.
Thanks!
--------- Destination Section Parameters Found
The query string parameters for the destination contact field are, at the time this answer was written :
toData.addressData.contactName
toData.addressData.addressLine1
toData.addressData.addressLine2
toData.addressData.zipPostalCode
toData.addressData.city
toData.addressData.stateProvinceCode
toData.addressData.phoneNumber
psdData.mpsRowDataList[0].weight
Of course, they need to be appended to the original URL using valid query string syntax and URL encoding.
--------- How Were These Found ?
These were each found using the page inspector. I found that it is important to cut through the noise by zeroing in on the exact field where the data needs to be entered, and opening up the page inspector to that location.
Right click (Win) or control click (Mac) > "inspect"
This will bring up the following text in the inspector. By trial and error, I discovered that the "name" fields correspond to the working query string parameters.
The part we are looking for :
This corresponds to the query string parameter ...
toData.addressData.addressLine1
... originally listed above.
--------- Unsolved Parameters
It's a mystery why this same rule doesn't apply in the same way to other values in the page, like service type (e.g. "Priority Overnight") or package type (e.g. "FedEx Box"). The following, for example, do not fill as expected, even when using the exact same "name" field from the page inspector.
psdData.mpsRowDataList[0].carriageValue
psdData.serviceType
psdData.packageType
billingData.referenceData.yourReference
Maybe it's a URL encoding issue? Anyway, hope this helps.

Drupal 7 create url using characters from field

I am having a drupal 7 node about software releases. The title field of the release is
"Release v6-05-01"
I need to construct a URL based on this title that goes like this http://example.com/html605/Class.html
I know hot to construct the URL but the "605" bit is tricky because I have no token for it.
I thought that maybe I could take the characters from the title one by one? Is this possible in Drupal 7?
One solution could be to add a new field (eg "version number", text field) to your content type to hold the "605" string, and then use this token (typically : [node:field_version_number]) to construct your URL. But you'll have one more field to manage when creating new nodes, and maybe a lot of work to process existing nodes.
Depending on how this number is constructed from the node title, you could try using Computed Field or Dynamic Field, and create a PHP computed field. In PHP you could build the version number with some substr logic based on the node title (its value is available in the PHP snippet). This way you don't have to fill the new field for each new node and existing nodes should be automatically updated.
Good luck

TFS 2013 - Description HTML Field Can't Be Required

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.

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