It's all about the answers!

Ask a question

Validation fails skips work item ids.

praveen patidar (8613144) | asked Oct 05 '15, 9:57 p.m.
 Hello ,  

This seems weird but if I save work item without putting all mandatory fields. The error message appears and after providing all mandatory fields the work item is getting created with ID skipped. 

This is causing lots of ID missed if there is some automation of Importing work items. 

Is there way to avoid ID increase in case of Validation Error ? 

One answer

permanent link
Kevin Ramer (4.5k8178197) | answered Oct 06 '15, 8:39 a.m.
The work item id "counter" is shared across the RTC repository, so it is very probable that from the time the save is attempted and corrections made and re-attempt the save, work items were created in the same project or another.

Said another way:  Given that your project's maximum work item ID is N, there is no guarantee that the next will have value N+1.

sam detweiler commented Oct 06 '15, 9:25 a.m.

as I recall, the number is retrieved when the editor panel is presented, and again presented when the error is shown.   the number retrieved on the first presentation is discarded.

praveen patidar commented Oct 06 '15, 6:51 p.m.

 Hello Thanks Kavin and Sam for Answering. 

@Kavin, I am working on my local development workshop so there is no possibility of someone else working on that. I searched the work item id and there is nothing found. 

@Sam, yes it seems like it worked on basis of editor presentation loaded. It seems high level of enhancement needed for that. Means the work item should be assigned an ID only when confirmed submission. 


sam detweiler commented Oct 06 '15, 8:11 p.m.

Yeh,but that is not how it works.  

Your answer

Register or to post your answer.