It's all about the answers!

Ask a question

RTC - how to reset record id for a project area?


Craig K (1838) | asked Aug 28 '14, 2:24 p.m.
I have a set of problem tickets currently managed in a spreadsheet. I am evaluating RTC to see if we can switch to it for managing the tickets. I'm able to create a customized work item and add custom attributes as well as create an editor presentation for editing the customized work item.

When i created my first work item for the project area, the internal record id is not 1 but rather 1481. Is there a way to reset the record id counter back to 1 for the project area? I want to import the problem tickets using the CSV format but want to retain the original ticket numbers which start at 1.

I'm using the RTC 3.0.1 Eclipse UI client but I haven't come across anything in the UI that allows me to reset the internal record id counter. Is it even possible? The RTC installation I'm using is shared by several other project teams so it seems the record id is being shared across all the projects? I would like the record id to be unique to my project area. If I attempt to import my problem tickets by CSV and set the Id field using my original ticket numbers what is going to happen? Would it overwrite existing work items of the other projects?

Accepted answer


permanent link
sam detweiler (12.5k6186201) | answered Aug 28 '14, 2:32 p.m.
The RTC workitem ID's are system wide, not project specific.

no, you should not be able to overwrite workitems not in your project.

you cannot 'set' the id by import.  you CAN update existing workitems in your project with those ID's
Craig K selected this answer as the correct answer

Comments
Craig K commented Aug 28 '14, 2:55 p.m.

So If I really want to use my original ticket numbers starting at 1 I would need to have a new RTC repository created just for my project?


sam detweiler commented Aug 28 '14, 3:02 p.m.

correct, and sometimes the numbers are not contiguous..    there are cases where canceling creating a workitem will still consume an id value.


sam detweiler commented Aug 28 '14, 3:05 p.m.

generally in migrations like this we suggest adding another field to show the original ID so that its searchable (/old_number  in the search box will find old_number in a field) 
old number is just for migration.. new workitems wouldn't have this.. so for a short time u deal with both, then just the normal workitem ID


Craig K commented Aug 28 '14, 6:21 p.m.

I have thought about using a custom field to store the ticket number from the old system but we do have a number of other documents referring to the old ticket number which I think can easily lead to confusion, at least when viewing historical items. Some of these tickets do have long lifetimes (e.g. several years) as well.

Previously, I found "TN0007: Guide for importing Jazz work items from Bugzilla and other systems (https://jazz.net/library/article/69) although it is somewhat dated now. It didn't address this migration issue.

I'm going to talk to our RTC repo admin to see about setting up another repo just for our project. Thanks for the information.

4 other answers



permanent link
Geoffrey Clemm (30.0k23035) | answered Aug 28 '14, 5:54 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Whether or not you are migrating, if you actually want to control the values that show in an "ID" field, then you will want/need to create a custom ID property, with your own custom work item save process adviser code that initializes that custom ID property.   For example, if you want that ID to be project area specific, and not have gaps, you would need to use that custom ID field.

Comments
Craig K commented Aug 28 '14, 6:33 p.m.

Nice tip. Is there an example of setting this up somewhere? Can you override the system wide work item id with the custom ID when displaying work items in query results? That is, do we have edit control over the layout of the query results? If I could hide the system wide id and just show the custom ID in certain query results, this might make it more palatable.


Geoffrey Clemm commented Aug 28 '14, 6:52 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You can control the editor display and the query-results display to show your ID in a very visible place, but the system-defined ID is hardwired into a few critical places like the "search" box and in the work item URLs.   So the more prominent you make your ID, the more likely your users are to make the mistake of using your ID in those places where the system-defined ID is expected.


permanent link
kavita herur (5875786) | answered Sep 29 '15, 8:02 a.m.
Hi All,
 I too have similar requirement. Is there any other solution than  adding custom ID. 
Can I set some value  with admin access so that next newly created Work Tickets should start from No-1000 ?
 Or Can I change existing WT ID with different value?

Thanks,
Kavita

Comments
1
sam detweiler commented Sep 29 '15, 8:05 a.m.

No. the number used for the ID is not controllable.  starts at 1 and counts up


permanent link
kavita herur (5875786) | answered Sep 29 '15, 8:02 a.m.
Hi All,
 I too have similar requirement. Is there any other solution than  adding custom ID. 
Can I set some value  with admin access so that next newly created Work Tickets should start from No-1000 ?
 Or Can I change existing WT ID with different value?

Thanks,
Kavita

permanent link
Ralph Schoon (60.7k33643) | answered Feb 15 '16, 8:37 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please see this community contributed extension for creating a custom consecutive ID: Extension to generate unique custom work item numbers

Comments
Abhinav Mishra commented Feb 15 '16, 8:46 a.m.

Thanks Ralph for your valuable input.


Abhinav Mishra commented Feb 18 '16, 8:01 a.m.

Ralph,
I have created workitems with cutsom Ids in RTC i.e 9999* . Able to successfully create the workitem with custom id via CSV import. Now the problem is automatic Id counter has started increasing from 9999* instead of previous value.


Any work around or suggestion to sort out this.
if creation of new workitems in terms of data would be safe ?


Ralph Schoon commented Feb 18 '16, 8:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am mot the creator of the extension. As I think it comes with code, I would suggest you understand the code and make it work for you.


Abhinav Mishra commented Feb 18 '16, 8:13 a.m. | edited Feb 18 '16, 8:15 a.m.

Thanks for your quick response !
I have done this via RTC UI using import feature. Didn't use any extension.

Any suggestions ?


1
Ralph Schoon commented Feb 18 '16, 8:22 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

If you import CSV and provide the ID and activate updating the items, then the items found by ID are updated. Otherwise leve the ID column out and a new ID is created starting with the last available ID in the repository.


Abhinav Mishra commented Feb 18 '16, 8:51 a.m.

I am using create option instead of update and providing a column with name "Id" in csv which have custom Ids.
The result of that csv import - created workitem with custom id provided in excel sheet.

After that I have inserted couple of more values in range of 16** and able to insert .
when creating a workitem without supplying id in the excel sheet it is taking ids of range 9999
*.

If longer custom id would cause data corruption ?


1
Ralph Schoon commented Feb 19 '16, 3:02 a.m. | edited Feb 19 '16, 3:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

To be honest, I don't understand what you are doing, trying to do and what environment you use. If you provide the ID in an import without update mode with CSV, the importer will try to use the ID given (I think as I have done that years ago). If that is already taken it will take an ID that is not, You can't be sure that the work item will actually have the ID.  You can update If you provide the ID

To be quite clear here: you don't have any control about the ID that RTC uses for work items beyond what I explained above. You can use a custom attribute as a custom ID, if you want to do some magic and control that value. As explained in this community contributed extension for creating a custom consecutive ID: Extension to generate unique custom work item numbers you can create automation for that as well.

If that does not answer your question, I suggest you open a new question, instead of posting to one that is already answered.


Ralph Schoon commented Feb 19 '16, 3:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

PS: RTC will start with the highest given ID fr the next one. If you are not careful, you can run out of ID's if you start with a really big value.

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.