It's all about the answers!

Ask a question

How to find out missing numbers from workitem ID sequence?

Pravin Patil (104145134) | asked Sep 10 '15, 11:56 a.m.

I added 2 work items and the sequencing was off. 406 (SCR work item type) and 427 (SIR work item type).
I learned that, there is only one counter, so all requests for workitems, within a project area, will increment the numbers.

But I see that there are no other workitems created between 406 and 427, how to figure out what happened with the sequencing and what took away the missing numbers from sequence?

4 answers

permanent link
sam detweiler (12.5k6195201) | answered Sep 10 '15, 11:34 p.m.
I mentioned before, the number is 'taken' at the beginning of workitem create, when the editor comes up if there is a ui, long before the save. if the save never happens the number is still consumed, but not used.. abandonded if you will.

the only thing you CAN say is that the number ill INCREASE between two workitems created in sequence.
the internal details of when the counter gets increments are not documented.

permanent link
Miguel Tomico (5001423) | answered Sep 10 '15, 12:57 p.m.
Type any of those 'missing' numbers in the 'Search Work Items' textbox in the upper right corner.
As someone highlighted in another post, you may not have access to those work items or they might have been deleted.

Pravin Patil commented Sep 10 '15, 3:54 p.m.

It was late night and I don't think any body must have created so many workitems in one night and deleted them. Am I missing something that I need to be aware of from workitems ID generation?

I tried searching for workitems 407, 420, and get the below error:


Error fetching or storing Work Item 420 | Details: Could not load work item. A work item with that number may not exist
Hence I believe they don't exist. Please let me know your thoughts

Kevin Ramer commented Sep 10 '15, 4:09 p.m.

Why is this such a burning issue ?  There is a single counter for work item id used by all project areas within an RTC repository.   Unless you are a JazzAdmin you could get the error because you cannot read some work item or another because it is not in a project area for which you have read authority.   I'd suggest taking this up with the administrators of your rtc repository.

Pravin Patil commented Sep 10 '15, 9:04 p.m.

Thanks for your response. I understand this is not a burning issue but it will be to the project when I start migrating workitems from my current system into RTC and the workitem ID's go off sequence with I having no proper explanation on why it happened...

I am the JazzAdmin for the project area but was still getting the error (that I provided above) while trying to access workitems between 406-427.

What are your thoughts, why would the ID's disappear?

Ralph Schoon commented Sep 11 '15, 5:02 a.m.

If you import from another system, you can add a custom attribute of type text where you can store the original number for reference in older documents. You will never be able to import the work items with the same numbers of your old system.

Pravin Patil commented Sep 11 '15, 12:27 p.m.

yes, got that.

I am referring to, if I import 999 workitems, there ID that get generated are expected to be sequential...but from above scenario it doesn't look confirmed.

Also, if my last workitem in RTC is 101, will the next one that I import be 102 for sure?

sam detweiler commented Sep 11 '15, 12:35 p.m.

If nothing else is happening on this server, it should be sequential, but there is no guaranty.   when I worked on a migration process at one prior customer, we imported 15,000 workitems on a system where my job was the only one doing this work.

I did not check if the workitem ids were sequential, but from memory I don't remember any particular gaps.

showing 5 of 6 show 1 more comments

permanent link
Miguel Tomico (5001423) | answered Sep 11 '15, 1:11 p.m.
Allow me to adopt a purist approach to this question, as I've had this 'sequential Identifiers' discussion a hundred times. It is applicable to any software using Integer numbers as Identifiers.

A proper identifier, once it has been assigned, it will never change. It will never be reused. It's the way to make it unique.
Unfortunately, that is incompatible with being sequential.

Said that, Why do you need it to be sequential? What's the business reason behind it?
I would suggest not to pay attention to the sequence of numbers. If you find those gaps disturbing, change the query display to hide the ID column.
If, for whatever reason, you need a sequential number, you will have to build your own. The Work Item ID will never serve that purpose.

Pravin Patil commented Sep 14 '15, 4:57 p.m.

I hear what you say. Also, there is no GREAT business reason or enforcement to have the IDs in sequence.

However, I am just trying to understand on what happened that some of the IDs went missing when they are supposed to be sequential and unique, good to know, isn't it?

you can choose not to reply to this comment, since it may not be as important to all...

Ralph Schoon commented Sep 15 '15, 2:22 a.m.

The question was already answered. RTC uses a unique key (integer) and assigns that key as ID to each work item that is created in the repo. Usually all used IDs will be present in the repository, but they might be spread across multiple project areas.
ID's can become unused if the work item is deleted. I don't think these ID's will be reused.

Pravin Patil commented Sep 15 '15, 6:42 p.m.

I think I didn't explain my situation correctly....

I created a work item and got its ID as 406. Then immediately I created another work item and got ID as 427. Its impossible that users must have created and deleted 427-406=21 work items in such short time gap.

I accept that RTC creates unique sequential ID's for work items, but in my case it was not sequential and hence I was trying to figure out on what happened with the ID's between 406 to 427.

This is not impacting my work anyways, but just good to know.

Ralph Schoon commented Sep 16 '15, 1:59 a.m.

The ID is assigned if you save the work item, not if you "Create" it in the UI. Whatever, I'll unsubscribe now, as this costs far more precious time than it should.

permanent link
Miguel Tomico (5001423) | answered Sep 16 '15, 3:45 a.m.
I've never experienced the behaviour you described.
Unfortunately, RTC does not keep track of deleted work items.
I would suggest to contact IBM support to see if they can help to locate those 'missing' IDs.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.