AX TFS WorkItems

AX TFS WorkItems is an extension for Dynamics AX 2009 allowing to link Team Foundation Server 2010 work items to a source code changeset.

Content:

Features
Usage
Installation
Download

Features

Supported features:

  • selection and run of work item query (queries are defined in TFS)
  • selection of one or more work items for linking with a changeset
  • warning if no work item is selected (and corresponding Check-in policy in TFS is active)

Unsupported features related to those mentioned above:

  • hierarchical queries
  • work items can be only linked, you cannot choose “Resolve”
  • no comment can be specified when overriding Check-in policy

Usage

New tab “Work Items” has been added to the Checkin form. A query (defined in TFS) can be selected by a lookup here and it can be executed be the “Run” button. The first run of the lookup is slow, because a connection to TFS is being created.

Work Items query

Mark one or more work items (using the “Include” column). These work items will be linked to the created changeset during checkin.

If the “Work Items” Check-in Policy is activated in TFS and no work item is selected, the following dialog will be shown:

Installation

Requirements:

  • Dynamics AX 2009
  • Team Explorer 2010
  • Team Explorer 2008 SP1 + Forward Compatibility Update for TFS2010

Team Exploreru 2008 installation

Team Explorer 2008 must include Service Pack 1. If you add Team Explorer to Visual Studio 2008 SP1, you have to run SP1 installation once more to update Team Explorer.

Download links:

Apply Forward Compatibility Update for TFS 2010 (download here) on Team Explorer 2008 SP1. It allows AX2009 to communicate with Team Foundation Serverem 2010.

AX TFS Work Items installation

AX TFS WorkItems consists of two parts. One part  is made up of changes in Dynamics AX and the second part is a .DLL library simplifying access to TFS API. Therefore the installation requires two steps:

  1. Place AxTfsWorkItems.dll to the Bin subfolder in the AX client folder (e.g. C:\Program Files\Microsoft Dynamics AX\50\Client\Bin).
  2. Import TfsWorkItems.xpo (if you have any modification regarding version control, ensure yourself that they don’t collide with the imported modifications).

Download

Installation files
Source codes

(Build 1.0.4085)

9 Comments

  1. We get an error message, when we use this tool, at the check in. We can not choose a query. if we klick on the drop down we gett the follow error message

    Error executing code: ImageListAppl_TFSQuery (object) has no valid runable code in method ‘new’.

    

    (C)\Classes\ImageListAppl_TFSQuery\new
    (C)\Forms\TFSWorkItemQueryLookup\Methods\init
    (C)\Classes\SysSetupFormRun\init – line 3
    (C)\Classes\FormStringControl\PerformTypeLookup
    (C)\Classes\FormStringControl\Lookup

    • Please recompile ImageListAppl_TFSQuery class. Are there any compilation errors? If yes, try to identify where is the problem. Maybe it’s interfering with your modifications, maybe some AX update introduced a conflicting code.

      • Thank you for your answer. I compiled this class and i get the follow error message. In the Application Object ImageListAppl_TFSQuery Method: classDeclaration Message: The macro does not exist. Line 3 Collumn 5

        That is the ImageListAppl_TfsQuery

        public class ImageListAppl_TFSQuery extends ImageListAppl
        {
        #RctRessources
        }

        I make a Change in the class ImageListAppl_TfsQuery. This is the new class.

        public class ImageListAppl_TFSQuery extends ImageListAppl
        {
        #ResAppl
        }

        Thanks for your help.

        • Glad to hear that you sorted it out. Sorry about any troubles.
          Unfortunately I don’t have any AX2009 with TFS in this moment, so I effectively can’t look into it myself.

  2. Hi Martin.

    I placed the Goshoom.AxTfsWorkItems.dll file in C:\Program Files (x86)\Microsoft Dynamics AX\50\Cient\Bin

    I imported tfsWorkItems.xpo into an Dynamics AX 2009 and I corrected the macro from #RctRessources to #ResAppl as Sven mentioned.

    I have another error in TfsQueryDefinition.getWorkItems() method. In the line that looks like this:

    workItems = queryDefinition.ExecuteQuery();

    it will not compile it and says that “The class Goshoom.DynamicsAX.TFS.WorkItems.QueryDefinitionAdapter does not contain this function.”

    If I “dot” the variable workItem I get a list of methods like Contains(), Equals(), get_AsOf() and many others but if I “dot” queryDefinition then I get nothing. There is not a ExecuteQuery() method or any other method to see.

    Do I have the wrong DLL?

    • I’ve just decompiled the assembly (although I was sure that the DLL didn’t change) and the method is there. Your problem must be caused by something else. Don’t you have a different version of Visual Studio without the necessary compatibility pack?
      It may be better to drop me an email rather then discussing it all here. Just please take into account that this was written six years ago and I don’t have any AX 2009 environment anymore.

        • If the problem is in versions, recompilation won’t likely solve anything, because the project will still refer to the same version of TFS. You also don’t have to install VS 2010; you need the compatibility pack for TFS. Also, you need a compatibility pack for TFS 2008, because that’s the version that Microsoft used when developing the integration to TFS (while I used 2010). That’s exactly what the article above is talking about, except of the fact that you’re now using even a newer version of VS than I was when writing this in 2011.

  3. Hi Martin
    Thanks a lot for the assistance. It works fine now.
    I’ve got it working now with a 2010 installed. You can’t install the comp. pack for 2008 without 2010 installed. I skipped the 2010 because it isn’t needed with 2013.

    Warning: TFS Teamexplorer doesn’t refresh the data. So on the workitems the links doesn’t show up before You restart or refresh Youself.

Leave a Reply to Henrik Berg Andersen Cancel reply

Your email address will not be published.