Error: There may be problems with the work item type definition  
Author Message
Peter Chapman





PostPosted: Team Foundation Server - Work Item Tracking, Error: There may be problems with the work item type definition Top

I've changed a work item type using witexport and witimport. I have imported it back successfully. The input form displays correctly, but when i save the new item i get the following message:

TF26212: Team Foundation Server could not save your changes. There may be problems with the work item type definition. Try again or contact your Team Foundation Server administrator.

Can anyone point me in the right direction to track this one down



Visual Studio Team System25  
 
 
Naren Datha - MSFT





PostPosted: Team Foundation Server - Work Item Tracking, Error: There may be problems with the work item type definition Top

Does it happen for all workitem saves with any data or just few workitems with specific data This usually happens 1) if client okayed the rules, but server rejected it, or 2) There are few rule violations other than fields (one example is link/attachment comment size but I think we do check for that in our OM).

Options here:

- Try clearing your client cache. This will force update client cache with server rules in case cache somehow go corrupted. Here is how:

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.

4. Connect to the Team Foundation Server through the Tools menu Connect to Team Foundation Server option.

- Try enabling tracing to see additional details. Here is how:

Goto <>drive:\ Program Files\Microsoft Team Foundation 2005\Web Services
Open web.config
look for <Switches> element in web.config
Update the trace level for Work Item Tracking to 4
<!-- WorkItem trace switches -->

<add name="traceLevel" value="4" />

Look for <add key="traceWriter" value="false"/> in web.config
Update the traceWriter value to “True” as below

<add key="traceWriter" value="true"/>

Save the web.config file
Now when the failure occurs, grab the tracelog file from

"%TEMP%\\TFLogFiles

Note that %TEMP% is usually %WINDIR%\Temp.



 
 
Peter Chapman





PostPosted: Team Foundation Server - Work Item Tracking, Error: There may be problems with the work item type definition Top

Interesting. Clearing the client cache didn't help, but the logging has given me more to work on. There is an exception:


[WI] [Error, 3716, 16, 09:43:23.520] SvrEx: Microsoft.TeamFoundation.WorkItemTracking.Server.ValidationException: Forcing rollback ---> System.Data.SqlClient.SqlException: Forcing rollback
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.NextResult()
at Microsoft.TeamFoundation.WorkItemTracking.Server.PayloadTableCollection.Populate(SqlDataReader reader)
at Microsoft.TeamFoundation.WorkItemTracking.Server.SqlAccess.ExecuteBatchPayloadImpl(IRequestContext context, String sqlBatch, List`1 parameterList, Boolean& errorOnBulkUpdate, String connectionString)
--- End of inner exception stack trace ---.

I'll see if i can find out what the TdsParser is doing, and look into the sql query to see if there is anything obvious i'm missing.

Other work items (ones that i haven't edited) are working as expected. I'll review what i think i'm doing for a while.

 
 
Peter Chapman





PostPosted: Team Foundation Server - Work Item Tracking, Error: There may be problems with the work item type definition Top

As the stack trace suggests, this was a validation error.

I've fixed it now. I had been using the Microsoft.VSTS.Common.Discipline field, but giving it my own values in the xml definition. That's why it wasn't happy.

There is an MSDN article relevant to this:

http://msdn2.microsoft.com/en-us/library/ms404878.aspx