Intercepting WorkItem Changes from Excel

hi all, i'm working on VSIP package in order to do some custom validation on workitem save and its working fine.. but still there are other ways people can by pass validation like from Excel etc. I'v never worked on excel customization etc.. so can somebody give any ideas how to approach it..

regards
faraz


Answer this question

Intercepting WorkItem Changes from Excel

  • TBing

    I think you've hit the fact that our rules/validation system is not extensible beyond the built in capabilities. This is something we are looking at enhancing in future versions.

    Brian


  • gkostel

    Hi,

    Can you provide some more details on what kind of validations are you planning to add to Excel

    Excel Add-in in TFS V1 does not support any customization mechanism. You may have to implement your own COM Add-in and capture Excel events like SheetChangeEventHandler and implement your customizations in that Add-in

    Following MSDN article talks about how To Build an Office COM Add-in by Using Visual C# .NET

    http://support.microsoft.com/default.aspx scid=kb;en-us;q302901

    Swamy



  • piell

    have a look at this http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=676436&SiteID=1 and you'll understand what i'm doing and where am i at the moment.. i cant do much in excel i think plus i cant afford to write a complete addon for this.. but i'm thinking to perform some sort of validation by putting validate button on workitem form via custom control and update some hidden property based on validation result.. in this way.. i can handle excel clients as well.. but i'm not comfortable with all this.. :(
  • Lawrence 007

    well i was expecting same :) ..Regarding validation at the moment i'm intercepting workitem save to validate some states and based on some rules allowing to continue or not and all this i'm doing in VSIP package.. now in visual studio i'v controlled of this.. but user can do changes without any validations via Publish Changes to TFS from Excel.. so i want to stop it.. oke tell me if i write my own add-in to do publish then what about existing add-in installed by default.. can i uninstall it.. or permanently stop by default installation of it

    regards

    faraz


  • thuynganguyen

    One way to remove TFS Excel add-in is to unregister this add-in using the following command. But this will disable the TFS Project Add-In as well (as this is a common layer for both TFS Add-ins)

    regsvr32 /u "%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\TFSOfficeAdd-in.dll"

    Have you looked at the options to define rules as part of the workitem xml files If you can fit your rules as part of the workitem xml then you don't need to fix them in each client (say VSIP, Excel Add-in, Project Add-in). Take a look at WorkItem customization topics at http://msdn2.microsoft.com/en-us/library/ms195025(VS.80).aspx and see whether you can plug in your validations there

    It will be nice if we supported some kind of pre-events (say OnCreating, OnUpdating etc) on TFS client or TFS server where these types of custom validations can be added. But unfortunately we don't have that support in V1 - may be something to think about for a future version

    Let me know if you have any other questions and I will be glad to help

    Swamy



  • Intercepting WorkItem Changes from Excel