It's all about the answers!

Ask a question

Additional individual counter on Workitems


Gerald Pape (8123) | asked Feb 25 '15, 4:18 a.m.
Hello,
we have the requirement to add an additional counter to specific work items (when created from a specific template).
Do you have any suggestions how to do this?

Thanks!

Gerald

One answer



permanent link
Lawrence Smith (3764) | answered Mar 30 '15, 7:44 a.m.
JAZZ DEVELOPER
One way would be to add an integer attribute then use a value provider script to do the counting.

http://www-01.ibm.com/support/knowledgecenter/SSYMRC_5.0.1/com.ibm.team.workitem.doc/topics/c_customizing_attributes.html?cp=SSYMRC_5.0.1&lang=en

https://jazz.net/library/article/1003

Comments
Ralph Schoon commented Mar 30 '15, 7:48 a.m. | edited Mar 30 '15, 7:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Problems I see when trying this:

- Scripts can run multiple times concurrent. How would you make sure the number is unique in a script?
- How would the script know the item is created from a template?


Lawrence Smith commented Mar 30 '15, 9:40 a.m.
JAZZ DEVELOPER

The JavaScripts are actually thread-safe per Rhino...


If you create a well know task "Profile Marker" and made the templated work item related to the count keeper (but did not check the Profile Marker in the template so it was linked to the original item), then you could see that you created the item from the template because it is linked to the Profile Marker. 

The counter would have to stored somewhere.

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.