TFS all work items are disappeared after a windows' date change - tfs

The date of Team foundation server changed to the year: 2023 and after that non of the defined work items can be found at the board. Neither they're accessible by querying. As it seems they're lost for only a certain project. All of the other projects are alright.
They didn't appear even after correction of the date.
How can I get the disappeared work items back?

Please check the work items not only in VS but also through web portal.
If you could also not find the work item by entering a known Work Item Id. Suggest you remote to your TFS database server and launched SQL Server Management Studio to explore the raw data. Double check if the workitems are still stored in database.
If not you may have to restore your last back-up TFS database. Otherwise suggest you clear TFS and VS cache.

Related

Moving a Team Project from one Collection to another - TFS 2015 Update 3

I'm trying to move a Team Project from one Team Collection to another, including check-in history, user stories and source code.
I'm running a TFS 2015 Update 3 setup, but the tools I found do not support this version.
Tools:
http://tfsintegration.codeplex.com/
https://visualstudiogallery.msdn.microsoft.com/eb77e739-c98c-4e36-9ead-fa115b27fefe
0. Create an empty collection that will be used as a copy of DefaultCollection.
I called my second collection "TeamPrjectCollection"
1. Make a Full Backup in TFS Administration Console
2. Detach the collection that contains your Team Project
3. Back up the collection database only using SQL Management Studio.
4. Restore database from backup to your empty collection
Restore DefaultCollection from backup file into the empty Collection called "TeamPrjectCollection". You might get an error message during restore, make sure to open Options tab and check "Overwrite the existing database" and "Close existing connections to destination database".
If you still get access error try do get DB offline restart the server and then back online the DB.
5. Attach both collections in TFS Administration Console
Select Tfs_DefaultDatabase DBs from the list and attach it, then select Tfs_TeamProjectCollection and attach it too with different Collection Name. Ignore the warning at the end.
6. Sort your Team Projects in both collections
After your attach process second collection will go offline due to the warning message saying that your both team projects exist in both collections.
Simply remove MyFirstProject from 'TeamProject Collection'
and remove 'TeamProjectToMigrate' from 'DefaultCollection'
Bring 'TeamProjectCollection' online.
As can see both Collections are accessible from TFS
For more details please refer to Visual Studio documentation here: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/move-project-collection
As #Daniel mentioned in comment, there's no way to move team projects between collections other than by using third party tools. But this feature is under planned, you can track this UserVoice:
We are committed to allow you to move team projects between
collections, although it’s currently not in scope for the 2016
calendar year. We’ll provide an updated timeline as we get closer to
2017.

Duplicate collections in Team Foundation Server 2010

I am currently trying to solve an issue with our current on-premise TFS 2010 Server where I have 2 collections and both of my project collections were set to offline due to some tinkering with trying to upgrade to on-premise TFS 2015.
Whenever I try to activate the desired collection, I am getting the following error:
TF253021:The following team project is duplicated in at least two team
project collections: ProjectName. The collection cannot start while
the duplication exists. You must delete this project from all but one
of the collections before the collection can be started. The project
exists in the following collections: CollectionA, CollectionB.
I also had a look at each of their settings, and apparently the database connection string for both collections are pointing towards the same SQL Server instance and the same database. Both collections also have the same number and names of all team projects too.
I'm thinking of deleting one of the collection and its projects, but I fear that if I do it, it may delete the same collection and settings for the second project collection that I'm trying to set online.
I'm wondering if anybody has encountered this issue and what steps have he/she has done to fix it.
Many thanks!
You've gotten yourself in a remarkable situation, which may need Microsoft support to chime in. Even with creative backups I'd be unsure whether you'd get yourself in an unsupported end-situation.
If you have a backup of the whole situation before you started this experiment, I'd recommend going back to that.
You may find yourself in a catch-22 situation, since TFS 2010 has passed it's support lifecycle. Mentioning it happened while preparing for a TFS 2015 upgrade may convince them.
You can find the contact details here:
https://support.microsoft.com/en-us/contactus/

Team Foundation server 2015 - Delete old users

I have a TFS server that has been moved between multiple physical servers and upgraded throughout versions 2005 -> 2015 during the past 10 years. It was working under a domain controller, but now its standing alone. When managing security and working with work items, it become like a mess. Too many old users are showing, some of them are duplicated with old names. However, we are dealing with windows users, so many of these users doesn't exists anymore. TFS web portal is showing a list of all existing users, but it doesn't offer delete option.
How can I delete them (old users)?
Is it the right procedure to follow (I
believe it won't be worst, as when I open work item owned by old
user, TFS shows the old name, but give a warning that this user
doesn't exists anymore)
I cannot confirm this solution will work.
From I could gather on Internet you need to delete user from all groups/collection they belonged to and then delete their windows account.
Overall
Delete from groups
Link to kick off TFS active sync.
Another solution could be using this software if it works with tfs 2015 or getting only important part of its source code from here

Work Items were lost during TFS upgrade

Last week I upgraded our TFS 2012 Server to TFS 2013. I read the MSDN documentation first and I also followed the documentation as I performed the upgrade. Everything seemed to go ok.
After the upgrade I ended up with 7 or so Team Projects that the wizard couldn't configure, for whatever reason, and needed manual configuration.
I noticed this week that ALL of the work items under one of my Team Projects are missing. Gone. Like even if I select Team|Go To Work Item and enter in a known Work Item Id, I receive an error that the item is either missing or I do not have permission to view it. I'm an Administrator on the TFS server and I'm the TFS Admin, so I highly doubt permissions are the issue.
I remoted into the server and launched SSMS to explore the raw data. I know for a fact Work Item 450 is missing (it's the only Id I remember at this point). I selected the TOP 1000 from WorkItemsAre, which seems to be the table that holds the Work Items (?). There is a gap in the Ids, I see 1-448, then the numbering picks up again at 457. So, somehow my Work Items appear to have been deleted. I stopped there, I assume there are more gaps since I'm missing more than 9 items.
Now I haven't gone through every one of our Team Projects. I've only touched 3 of them since the upgrade. Thankfully the largest, most active Team Project, with the most work items/version history seems to be intact. I'm not sure if any other Team Projects are missing their Work Items too.
Has anyone else experienced this? Does anyone know if there's some "secret squirrel" way to recover these missing work items, or have they been hard deleted and are gone for good (other than looking through tape backups of the server).
Any advice would be appreciated.
I already migrated to TFS 2013 from TFS 2012.
The problem of manual configuring the project may occur when you have customized work item types in TFS Project Templates. Did you customize your project templates?
Although, I can hardly believe that work-items getting hard deleted from TFS. This issue may occur probably because of archiving during migration. The workitems that TFS upgrade wizard may not have "understood" during migration/upgrade, might be archived and moved to another table in database Tfs_DefaultCollection.
You may want to consider that. I am not sure if that may be the case, but this happened when we migrated from TFS 2010 to TFS 2012 because we had many custom work items in TFS 2010. Hence we had to standardize templates before migration using powershell. But we lost some amount of history.
Hope that sparks some idea.

TFS 2010 warehouse job never leaves the running state

We have recently migrated to TFS 2010 using the MSF For Agile process template and we make use of such reports as the Burndown, User Stories progress etc. Up until 13/10/10, our warehousing worked perfectly and all our reports displayed upto date data. However, after this date, the reports started displaying old data and on looking at the status of the warehousing jobs using the GetProcessingStatus() method on the WarehouseControlWebService, we can see that the Work Item Tracking Sync job seems to be stuck in the 'Running' state.
Indeed, when you put a profiler on the database, you can see the same stored procs being called again and again, with the same parameters, as if it is stuck in a loop. While this is happening, the CPU usage is 50% and above. It stayed in this state for over 24 hours before I decided to kill it.
There is nothing particularly crazy about our setup - we did a clean TFS install and imported work items from TFS 2008 using Excel. We also have a custom work item template 'Support Ticket' which our support team use to log calls from customers. All importing was done with the proper TFS command line tools or Excel.
Has anyone experienced anything like this before? I have seen a couple of posts where people have had similar issues but not seen an answer.
I am delighted to inform everyone that we managed to fix it! The issue was a rogue work item (Bug) which had a link to a Task which did not exist. I am not quite sure how this happened but can only assume it happened during our work item import from TFS 2008.
We only noticed this because, as a last resort, we were going to create a brand new Team Project Collection and Team Project, and import all our work items into it and see if the warehousing worked there. However, when we viewed the 'All Work Items' query as a tree view in Team Explorer prior to the import, one of them was highlighted in red with an exclamation next to it saying the referenced item does not exist. We simply deleted them item using 'witadmin destroywi /collection:http://tfs2010:8080/tfs/<> /id:1571' and then magically the warehousing worked again. Marvellous!
If this post helps even one person then I am a happy man as this has caused us much heartache over the past week. Although we have managed to overcome the issue, it can't be denied that Microsoft's error handling in TFS leaves a lot to be desired.
Yours
Dan

Resources