WorkItems will not be saved in db table WorkItemTotals

Feb 25, 2008 at 5:13 PM
Hi Guys,

I have a strange problem when trying to add some time to a work item.
In the work item I've set "completed work" to "0", and "remaining work" to "4".
If i'm trying to add 1:00 hour in timesheet, the following message appears:
"You have allocated 1:00 too much to the task "Build Tasks".
You will not be able to set timesheets to "Completed" until these problems are resolved.

I've debugged the source code and found out that "reportedHours" is 0.
That's the reason for the error message.
I found out that there are no entries in the database table WorkItemTotals.
In the TimesheetEntries table all changes made in the timesheet tab are saved.

So why aren't work items saved in the WorkItemTotals table?

Thank you very much!!!

FG
Feb 27, 2008 at 8:27 AM
I solved the problem.
Thanks anyway.
Apr 24, 2008 at 7:28 PM
Hi , floriangruener

I have the same problem, could you please let me know how to fix it, thanks.
May 5, 2009 at 8:29 PM
Edited May 6, 2009 at 8:02 PM
I Need Help Please. This seems to be a reoccurring problem. I have the entire Timesheet up and running with the exception of this problem where the WorkItemsTotals table will not update. I have wondered if it is a problem with permissions or a web service not running. I have not been able to identify the exact problem. I have been out of programming for 9 years and as a result of the job market, have found myself having to code again. I love the coding, but I am a bit rusty and have lost my edge at the moment. Any help would be appreciated. If someone can help me, I will post the solution for others.
May 8, 2009 at 8:51 PM
Edited May 11, 2009 at 3:58 PM

NEW Install Issue: CODE Change request - This problem seems to occur basically when the TFS Timesheet is first installed and therefore, there are pre-existing Work Items that have not become a part of the WorkItemsTotal table. As each new Work Item is created both through the VS IDE or the TSWA, an entry will be made in the WorkItemTotals table. But it is very frustrating when you first install the app and can not get it to work with the pre-existing Work Items with "Enforce Consistency" set to "true" in the config file. You either have to manually update each Work Item with hours through the VS IDE to trigger the Work Item Changed event (thus create an entry in the WorkItemTotal table) or write a script that will programmatically add all previsous work items to the WorkItem Totals table. The TFSTimeSheet.dbo.WorkItemTotals table will allow a new work item to be added for update from the Visual Studio IDE interface when time is changed on a work item if it does not previously exist in this table. It will also allow an update  for a previously existing work item, that is in the WorkItemTotals table. But, it will not allow updates for the WorkItemsTotals table from the TSWA Web interface unless the workitem was created using the TSWA Web interface or has first been previsouly updated through the VS IDE. This is true whether "Enforce Consistancy" is set to either false or true. I want to make a Change Request for an update to the source code that will ensure that the WorkItemTotals table is also updated when the application is installed the first time with pre-existing Work Items. At least give a pop up explanation of the first time install issues. The issues occurs with a TSWA Web Timesheet tab entry update on first install when the work item meets the following circumstances: 1) Work Item does not previously exist in the WorkItemTotals table, 2) Work Item was not created using the TSWA Web interface, 3) Work Item previously existed as a Work Item created using the VS IDE prior to TFS Timesheet install.  I have found that the TFSTimeSheet.dbo.TimesheetEntries table works fine under all circumstances. I have verified that I have properly registered the WorkItemChanged Event with BisSubscribe as documented. Because of the inconsistency of the updating methods of the WorkItemTotals table, the WorkItemTotals table has no integrity in the data it contains when you are working through the initial install! Now I have been wrong once or twice before :), so if I am missing something here, I would enjoy hearing from a fellow Geek who could enlighten me. I love this plug-in and I do appreciate all the work it took to develop it. It is meeting a great need that was missing in Microsoft's original TSWA. Are you Listening Microsoft!!!!