It's all about the answers!

Ask a question

Is it possible to generate sequential workitem IDs for specific type items


VK L (8177157159) | asked Jul 06 '12, 3:36 a.m.
edited Jul 06 '12, 7:46 a.m. by Geoffrey Clemm (30.1k33035)
Hi All,
            Is it possible to have a different set of IDs for a specific workitem type so that it is sequential so that there are no gaps due to the distribution of IDs across all WI Types? Is this possible programatically using either custom attributes or other means?

Thanks.

Comments
Ralph Schoon commented Jul 06 '12, 7:15 a.m. | edited Jul 06 '12, 8:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi Valli,

can you tell me why this would be a requirement?

The only value of the number is to be unique from my perspective. Why do you want consecutive numbers? With respect to gaps, as soon as work items get closed you will have gaps anyway,if you are only looking at open items. Plus, if you change the type of the work item, what happens to the number in a scenario like you request?

As it works today, I think it just picks the next higher number. This is probably due to how the data is stored, indexed and also due to performance, the more complex you make it the slower it will be.

If you create work items programmatic, I think you can pick whatever number you want, unless it is not already used, in which case the storage layer will throw an exception,



VK L commented Jul 06 '12, 7:45 a.m. | edited Jul 06 '12, 7:51 a.m.

Hi Ralph,
               My consideration is more like having a single project for 1 WI Type alone - for all users to access.

Work Items have to be created by users only - though there would be operation advisors/participants running on the save operation to provide additional features.

Thanks.


Ralph Schoon commented Jul 06 '12, 7:51 a.m. | edited Jul 06 '12, 8:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am not sure I understand why you have issues with the gaps. However, as far as I can tell, the work item number is unique on a repository. If you have another project they seem to share the number range.


Geoffrey Clemm commented Jul 06 '12, 7:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note that one issue will be that RTC allows you to change the type of a work item. What would you do in that case? If you change the sequence number, that makes any references to that work item by sequence number become invalid. It also would leave a "hole" in the sequence numbering of the original type.


Aaron Garcia commented Sep 09 '14, 12:13 p.m. | edited Sep 10 '14, 8:20 p.m.

Some of us work projects for the government that dictate numbering schemes for things like defects, and change requests. My CM Plan dictates the naming convention and that the CRs and Defects number sequentially. Additionally, for defects the naming convention is "YYYY-nnn"  or my Change Requests naming convention is "PROJ-CR-nnn" PROJ indicates the project name, there is no way to do that in RTC withut creating additional attributes. The government Charter and CM plan dictate the convention, not the tool. So i have to add additional attributes to satisfy the requirement. 

In regards to switching from one work item to the next, I woudln't. My attributes are totally different so i would delete the one that was incorrect it and then I would create a new work item in RTC, it isn't worh the time. In different CM tools I have even saved the incorrect one for re-use with the next work item of that type to keep the sequence correct.

The choice should be given to the end user to use work items collectively, or sperately so you can increment your work item, by type,  and sequentially. Additionally I would love to be able to prempt the ID with a prefix like year, or project, if desired That would be my preference. I have seen other tools work this way and there were never any issues because of it.

Allowing independent work item sequencing would allow me to know I have 115 defects without having to run a query/report or have the spreadsheet do the math. I woudl simply have to look at the last work item ID.


Geoffrey Clemm commented Sep 10 '14, 8:28 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Some examples of why some users care a lot about the ability to change the type of a work item:
- A user submits a work item with the wrong type (e.g. submits something as a task when it should be an enhancement request).   This means it ends up with the wrong set of attributes.   In RTC, you can just fix it by correcting the type. 
- You've decided to modify your schema, and a batch of existing work items now should really be a different type.

Yes, there are other ways to handle these situations, but many users find retyping the work items to be the simplest and most intuitive way of doing so.

showing 5 of 6 show 1 more comments

Accepted answer


permanent link
Ralph Schoon (63.6k33646) | answered Sep 10 '14, 4:05 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 29 '19, 2:54 a.m.

The result of the discussion above is:

  1. It is not possible to have sequential work item ID's per type based on the built in ID. The ID is also used as database key and it is automatically generated by the tooling. The ID's are used across the repository.
  2. It is possible to create extensions to create a sequential number in a custom attribute. See Yasuyuki Kubota's comments in this thread.
The location for a solution is now https://github.com/jazz-community/rtc-workitem-numbering

Ralph Schoon selected this answer as the correct answer

7 other answers



permanent link
Yasuyuki Kubota (341015) | answered Sep 09 '14, 11:02 p.m.
I also had the similar requirement for Japanese customer.
At that time I asked a question at following link:My Question about Workitem IDs
Finally I developed the server-side plugin with the follow-up action feature for the requirement.
If you are interested in my plugin, I can share that.
However this plugin supports Japanese Only, unfortunately .
If you want to re-use this plugin, you have to translate some messages...



 

Comments
Ralph Schoon commented Sep 10 '14, 2:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Can you provide abit more details? I assume you create a custom attribute that can be used as ID, however the ID of the work item is still as it was.Is that correct?


Yasuyuki Kubota commented Sep 10 '14, 3:51 a.m.

Hi, Ralph.

Can you provide abit more details? I assume you create a custom attribute that can be used as ID, however the ID of the work item is still as it was.Is that correct?
Yes, you are correct.
I defined a custom attribute for the new WorkItem ID.
The original WorkItem ID is still existing.


Ralph Schoon commented Sep 10 '14, 4:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Thank you very much for the information. I will get this question answered, so users are aware.


Aaron Garcia commented Sep 10 '14, 8:41 a.m.

Yasuyuki Kubota, I also had to create a custom attribute to satisfy my customers requirements. I would love to have a copy of this plugin. RTC coudl easily fix this by allowing different tables for each work item type/category. This could easily be a choice on how you setup RTC. I have submitted enhancement requests bu they have been rejected. 


Ralph Schoon commented Sep 10 '14, 8:49 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

It seems easy from the outside, but it is not.

What about creating new work item types? A lot of companies dispute the db user to have this rights and rather run upgrade steps manually. What about changing types?.Persistance is done via EMF, would that support this? Changing the storage model would also be a huge effort and impact all pieces that run on the current design like queries, dashboards etc.


Aaron Garcia commented Sep 10 '14, 9:05 a.m. | edited Sep 10 '14, 8:15 p.m.

Ralph Schoon, I have used  other CM tools that support this functionality, Changing types is not an issue and I have never had to do it. My end users typcally don't submit a Change Request as a defect or vice versa. If I entered data erroneously I would create a new item of the correct type and re-use the former work item if I had to,  as this is what I did when using my previous tool which had the capability I am asking about.

It isn't a huge deal, I have a work around, it just is cumbersome as I manually have to track my numbers, instead of allowing the tool to track my numbers  automatically. Essentially the IDs that RTC provides me are useless except for my tasks, and change tracking which are not required to have a namimng convention and sequential numbers.

Thanks for you answer! I appreciate your time.


Yasuyuki Kubota commented Oct 03 '14, 6:23 a.m.

Hi Ralph,
I want to share my plugin because I translated it into English.
I uploaded source and guide to my project in IBM DevOps Services(IDS).
I will invite you to my IDS project, please check my plugin and publish it on your blog?


Yasuyuki Kubota commented Oct 06 '14, 4:19 a.m.

Hi Aaron,
I uploaded my plugin to my IDS project and change it into public project.
You can get my plugin from IDS project.Please check it out.
https://hub.jazz.net/project/strada501/RTC%20Work%20Item%20Numbering/overview

showing 5 of 8 show 3 more comments

permanent link
Yasuyuki Kubota (341015) | answered Apr 13 '15, 4:22 a.m.
Hi shruti joshi.

I have already uploaded my plugin in my project of the IBM DevOps Services.
https://hub.jazz.net/project/strada501/RTC%20Work%20Item%20Numbering/overview
I also uploaded the guidance for this plugin.
Please check it before installing the plugin.


Comments
shruti joshi commented Apr 13 '15, 6:32 a.m.

Hi Yasuyuki Kubota,

  Thanks for the reply, I have gone through the link you have mentioned.
It would be more helpful for me if, you upload the guidance doc in English or mail me on singhshruti1605@gmail.com.
I hope you dont mind :)

Thanks
Shruti Joshi


Yasuyuki Kubota commented Apr 13 '15, 6:48 a.m. | edited Apr 13 '15, 6:59 a.m.

Hi shruti joshi
You can download the guidance doc in English in my IDS project.
It is "Guide for Workitem Numbering follow-up action_en.docx" and you can download from IDS project top page.

And I rejected your request for joining my IDS project, because you can download the guidance and my plugin without edit-authority and you can get source code to fork project.


Yasuyuki Kubota commented Feb 26 '19, 2:52 a.m.
I moved this project to my IBM Cloud's toolchain Gitlab project.

Ralph Schoon commented Feb 26 '19, 4:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi, consider sharing it in the Jazz Community: http://jazz-community.org/ 


Yasuyuki Kubota commented Feb 26 '19, 5:44 a.m.

I'm not a member of the jazz community  github organization so I can't create a repository of the jazz community github organization.


Ralph Schoon commented Feb 26 '19, 6:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I was able to. If that is an issue, send an email to ralph.schoon@de.ibm.com and I will make sure you can publish there, if you want. Maybe a link from there would be an option. I liked you on rsjazz.workpress.com. 

showing 5 of 6 show 1 more comments

permanent link
VK L (8177157159) | answered Jul 06 '12, 1:44 p.m.
Hi Geoff,
               I am thinking of removing the other WI Templates from this project area - in case it would be possible to make it sequential starting from 1 using the standard WI ID itself (still other project areas are there in the repository with multiple WI Types.)
Another alternative that i am thinking of is a custom attribute - "request number" should get incremented sequentially for every new item creation of 1 particular WI Type alone - Is this possible programatically? because here, it would need to read the last request number attribute's value.

Thanks.

Comments
Ralph Schoon commented Jul 09 '12, 2:42 a.m. | edited Jun 01 '13, 2:14 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Valli, if you want to go with the custom attribute, you would have to store the number somewhere e.g. in a file, and make sure the operation of getting the next number is thread safe. You might want to look into creating a value provider.


Prakash Behrani commented May 31 '13, 4:08 p.m. | edited Jun 01 '13, 2:15 p.m.

Hi Valli,

Just curious if you were able to resolve your issue with generating consecutive request number.

I need to do something similar.

Any guidance you can provide would be very helpful.


Geoffrey Clemm commented Jun 01 '13, 2:28 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

WRT Valli's two alternatives, the first wouldn't guarantee sequential numbers, because even if there is only one work item type in the project area, the system doesn't guarantee sequential version numbers (there can be gaps).   So Valli's second alternative is the only approach I know of.  You can add a custom post-condition to "save work item" where you can create the sequence number.


Prakash Behrani commented Jul 16 '13, 3:41 p.m.

The issue is how do I find out the previous sequence number inside javascript.  Is there is way to store the previous sequence number in a global variable of some sort.

Ralph had suggested storing it in a file in a previous answer.  Are there any code samples for reading/writing to a file on the server from javascript.


Ralph Schoon commented Jul 16 '13, 4:02 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You can't and re-reading the answers, you should not even try to attempt it. Let alone with JavaScript which has an API that does not provide a lot of access. The numbering is done internally making sure a unique number is chosen. You can probably not make sure you pick a unique numbering and as Goff points out, what do you do if you change a type. A sequential number might look nice in an excel sheet, but you don't use an excel sheet any more and the only important thing is, the number is unique and does not change.

So my best advice I think is: don't even attempt to do it.


permanent link
shruti joshi (10013239) | answered Apr 13 '15, 1:15 a.m.
Hi Yasuyuki Kubota,


Can you please share the  server-side plugin you have created for Japanese company?? As similar kind of requirement has been raised by Defense Services project for "Change Request".

Thanks and Regards
Shruti Joshi

permanent link
Aaron Garcia (837) | answered Jun 01 '15, 10:29 a.m.

Yasuyuki Kubota,

Can you please share the server-side plugin you have created for Japanese company.  I am wanting to try this for my project and cannot find it via teh link above.


permanent link
Yasuyuki Kubota (341015) | answered Jun 01 '15, 10:05 p.m.
Hi, Shruti Joshi & Aaron Garcia

You can download the full contents of this plugin with following steps.
  1. Access my IDS project
    • https://hub.jazz.net/manage/manager/project/strada501/RTC%20Work%20Item%20Numbering/overview
  2. Click "Edit Code" button on toolbar right side.
  3. Click "File" -> "Export" -> "Zip".
I reject Aaron's request because you don't need to join my IDS project.



permanent link
Aaron Garcia (837) | answered Jun 02 '15, 8:08 a.m.
Thak you Yasuyuki!

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.