none
Work item details caching on client?

    Question

  •  

    We've had several instances of a work item which looks like it's being cached in the Team Explorer client.  Developer A changes the status and updates several fields and Developer B cannot see those updates.  We've experimented with various re-running of queries, refreshing the project, removing and re-adding the server via Team Explorer, and it always displays the old data until the instance of studio is shut down and restart.  It doesn't happen all the time, but it does happen daily on a project with only about 10 developers and BAs working in.

     

    I've seen several posts about caching issues in terms of work item definitions, and I understand those problems and we've seen that and it's easy enough to deal with, but we update work item details frequently throughout the day and obviously other team members and management needs to see those updates.  I'm out of ideas though - what could be happening?

     

    Thanks,

    matt

    Wednesday, February 27, 2008 6:01 PM

Answers

  • You should not have to close and restart Visual Studio, you can right click on the WorkItem and click "Refresh WorkItem" to get the latest one from the server. Caveat: If you have unsaved changes in the WI, you will be prompted to discard them if you refresh the WI.

     

    WorkItems are "pulled" from the server when you open them, so you have the revision you opened on your client (VS) even if other people changed it on the server. The client is not polling the server automatically to get the latest revision of the Workitem. Refresh is another explicit "pull from the server" command.

     

    Shutting down VS and reopening the WI works because you are now getting the latest revision of the WI from the server.

     

    Thanks,

    Amit

    Dev, TFS

    Thursday, February 28, 2008 3:06 AM

All replies

  • matt,

    Try to manually clear the local cache:

       1. Close Visual Studio.
       2. Delete the contents of the folder:
          %USERPROFILE%\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache\
       3. Start Visual Studio.

    Hope this helps,


    Steve - www.platinumbay.com
    Wednesday, February 27, 2008 6:18 PM
  • It does not sound right.

     

    What would happen if the developer that sees old version modifies it and saves it? Can you actually run into situation where incorrect data are saved into DB, or the problem occurs only for data presentation (old data displayed)?

     

    And another question - if you close all queries windows and all WI windows in VS, and then use Go to work item to open it, will WI display old data?

     

    Cheers,

    Eugene

     

    Wednesday, February 27, 2008 6:34 PM
  •  

    Steve: thnx for the response, but closing and restarting studio DOES work (without clearing the cache), the problem is that we can't restart studio every time we think someone else on the team might have updated a work item.

     

    Eugene, I can't find anyone who's tried to save an old version, but next time it happens (should be tomorrow sometime) we'll give it a try.  I think usually people notice it's bad and they restart - we haven't had any known situations of old data written.  We have tried closing all windows and queries and going direct to the workitem and it does still display the old data.  I spent some time trying to clear and refresh everything in the environment to track down the issue and nothing worked except a restart. 

     

    Thanks,

    Matt

    Wednesday, February 27, 2008 10:39 PM
  • You should not have to close and restart Visual Studio, you can right click on the WorkItem and click "Refresh WorkItem" to get the latest one from the server. Caveat: If you have unsaved changes in the WI, you will be prompted to discard them if you refresh the WI.

     

    WorkItems are "pulled" from the server when you open them, so you have the revision you opened on your client (VS) even if other people changed it on the server. The client is not polling the server automatically to get the latest revision of the Workitem. Refresh is another explicit "pull from the server" command.

     

    Shutting down VS and reopening the WI works because you are now getting the latest revision of the WI from the server.

     

    Thanks,

    Amit

    Dev, TFS

    Thursday, February 28, 2008 3:06 AM
  • We'll try the refresh next time - I actually didn't know it was there. 

     

    Not sure I understand though - if I close down all my open query and work item windows, then open a query, double-click on a work item, shouldn't it pull that work item from the server?  I don't expect it to auto-refresh, but if I re-run a query, I'd expect to see the latest fields and definitely if I close and re-open a work item I'd expect to see the latest...

     

    thanks,

    -matt

     

    Thursday, February 28, 2008 5:07 PM
  • Just a quick note, I wasn't suggesting that clearing the local cache be done every time this issue occurs.  Only as a one-time step to see if that was the problem.  If the problem is recurring, the other guys gave you some good ideas.

    Thanks,


    Steve - www.platinumbay.com
    Thursday, February 28, 2008 6:00 PM
  • I think that refreshing the work item is not the right solution. It will not work in specific cases and you will have to restart VS.

    The only true solution to this problem is to "Revert" the work item. Reverting pulls the latest data from the work item warehouse database and populates the fields on the form with the latest revision data.

    To achieve this right click on the work item updated by another user and click on "Undo changes and Revert work item".

    This Refresh-Revert mechanism is pretty strong and it will never allow incorrect data to be saved in the database.

    Tuesday, April 07, 2009 9:15 AM