共用方式為


Email URL links to TFS work items and queries

To share the details of one or more work items, you can email a link to a query, a table-formatted list of linked work items, or a single work item from Visual Studio Online, Team Web Access (TWA), or the Team Explorer plug-in for Visual Studio. Some options require updates to your on-premises TFS.

  • Email a URL to a query (Visual Studio Online)

  • Copy as HTML selected query results (Visual Studio Online or TWA with TFS 2013.4 update)

  • Email selected query results

  • Email a link to a work item within the work item form

  • Copy the URL of a work item

If you’re working from the Team Explorer plug-in for Eclipse, you’ll need to open the web portal to access these features.

Each of the first three options requires you to first create or run a work item query.

You can also use any text editor to compose a message, and you can build a hyperlink to a work item and post the hyperlink on a Web page or send in an email message.

Email a URL to a query (Visual Studio Online only)

With this option, you capture a URL of a query written using the work item query language (WIQL). You can capture this query for any saved or unsaved query.

  1. Open the queries page, display the query of interest, and choose Copy query URL.

    Copy query URL

       

    If you don’t see the Copy query URL option, open the Editor view.

  2. Paste the URL into an email to share. Opening the query requires users to have read access to the team project.

To learn more about WIQL, see Query for Bugs, Tasks, and Other Work Items.

Copy as HTML selected query results (Visual Studio Online or TFS 2013.4 update)

With this option, you can copy an HTML formatted table of selected items in a query result list. You can then email this list using your choice of email client.

  1. Display a query results list in Visual Studio Online or TWA.

  2. From Team Web Access, select an item or highlight several items and choose Copy as HTML.

    Copy as HTML selected work items

       

    The formatted table contains a link to each work item included in your selected results list.

  3. Paste the contents of the clipboard into your email client. To open a linked work item, requires users to have read access to the team project or area node for those work items.

Email selected query results

To use this option, your TFS administrator must have configured an SMTP server for TFS. For Visual Studio Online users, your selected query results are emailed from the vso@microsoft.com account.

  1. Display a query results list.

  2. From Team Web Access, select an item or highlight several items and choose Email selected work items from the context menu.

    Email selected work items

       

    Or, from Team Explorer (Visual Studio), choose Send Query to Microsoft Outlook. This option requires that you configure Office Outlook on your client computer.

    Email query results list

  3. On the To line, type the user name(s) of valid users (ones who have access to the team project).

    Send query by email (TWA)

Open the work item in your web browser and choose Email work item. This option requires Visual Studio Online or TFS 2013.4 update.

From Visual Studio or Team Explorer, choose Send work item to Microsoft Outlook. This option requires that you configure Office Outlook on your client computer.

Copy URL to a work item

From TWA, open the work item and right-click the link ID to copy the shortcut.

Copy shortcut link to a work item

From Team Explorer, open the shortcut menu from the open work item to copy the full path.

Email a hyperlink for a work item

   

The hyperlink you copy opens the work item in TWA.

Q & A

A: Define a link that conforms to the following syntax:

For Visual Studio Online:

   **https://AccountName.visualstudio.com/DefaultCollection/TeamProjectName/_workitems/edit/**WorkItemNumber

   Example: https://fabrikam/DefaultCollection/Phone%20Saver/_workitems/edit/133

For on-premises TFS:

   **http://ServerName:Port/tfs/CollectionName/TeamProjectName/_workitems/edit/**WorkItemNumber

   Example: http://fabrikamprime:8080/tfs/DefaultCollection/Phone%20Saver/_workitems/edit/133

Or, for on-premises deployments prior to TFS 2013.2 update:

   **http://ServerName:Port/tfs/CollectionName/TeamProjectName/_workitems#_a=edit&id=**WorkItemNumber

   Example: http://fabrikamprime:8080/tfs/DefaultCollection/Phone%20Saver/_workitems#_a=edit&id=133

Where:

  • AccountName specifies the name of the Visual Studio Online account.

  • ServerName specifies the name of the server that is running Team Foundation Server.

  • Port specifies the port that Team Foundation Server uses. The default value is 8080.

  • CollectionName specifies the name of the team project collection.

  • TeamProjectName specifies the name of the team project.

  • WorkItemNumber specifies the ID of the bug, task, or other work item to which you want to link.

Q: How do I create alerts based on work item queries?

A: See Set alerts, get notified when changes occur.

Q: Is there a way to delete work items?

A: Yes. You can permanently remove work items from the TFS database by using the witadmin destroywi command. Work items whose state is set to Closed, Done, or Removed remain in the database and can be reactivated. Permanently removed work items can’t be restored nor reactivated.

See Also

Concepts

Choose the Team Foundation client to support your tasks