Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to display value of enumeration of work item in BIRT?

Hello,
I would like to create the report displaying workitem with custom value which is enumeration type. I found on https://jazz.net/wiki/bin/view/Main/DataWarehouseSnapshotSchemas20 following two tables:
Enumerations and Live_Workitem_Cnt. However I completely have no idea how to connect them. Is there any third table I should use? Which columns I should join?

Thanks in advance for all replies :)

0 votes

Comments

 LIVE_WORKITEM_CNT will return literal IDs of custom attribute values in STRING_VAL (given a STRING_KEY which identifies the custom attribute). You want to take that literal ID and map it into something human readable. For that you use the ENUMERATIONS table (which is also a live view) - ENUMERATIONS requires that you pass the project area (since enumerations and their values are scoped to a project area); you can then also supply the enumeration ID and the literal ID, and the data set will give you the literal value (label) so you can include it in your report. I don't believe we have any out-of-the-box examples of using this table, sorry.


Accepted answer

Permanent link

In common there are 2 ways: using hash array and joining tables. Both examples are described here:

http://www.ibm.com/developerworks/rational/library/10/creatingcustomreportswithbirtandrtc-part3/index.html

Krzysztof Kaźmierczyk selected this answer as the correct answer

1 vote

Comments

Hi Tal,
Here are my String key and String val values for Live_Workitem_Cnt:

30261
Test AVP Pipeline

severity.literal.l3
AVPpipeline.workitemtype.clientname

30261
Test AVP Pipeline

severity.literal.l3
Contracttype
Contracttype.literal.l2
30261
Test AVP Pipeline

severity.literal.l3
avppipeline.workitemtype.country
Country.literal.l8
30261
Test AVP Pipeline

severity.literal.l3
avppipeline.workitemtype.probability
avppipeline.workitemenum.probability.literal.050
30261
Test AVP Pipeline

severity.literal.l3
situation.workItemType.product2
Product.literal.l17
30261
Test AVP Pipeline

severity.literal.l3
AVPpipeline.workitemtype.salescontact

30261
Test AVP Pipeline

severity.literal.l3
AVPpipeline.workitemtype.imt
IMT.literal.l24
30261
Test AVP Pipeline

severity.literal.l3
AVPpipeline.workitemtype.AVLcontacts

30261
Test AVP Pipeline

severity.literal.l3
situation.workItemType.product
Product.literal.l13
30261
Test AVP Pipeline

severity.literal.l3
situation.workItemType.products

30261
Test AVP Pipeline

severity.literal.l3
AVPpipeline.workitemtype.AVPsales


You see for example following values
avppipeline.workitemenum.probability.literal.050. My question is how we can fetch this value in readeable format.

I tried already displaying list of all enumerations (from Enumeration table) but this table is empty. Is there any tutorial on jazz.net how to do that (step by step)?


One other answer

Permanent link
Hi, 
Not sure I fully understood your problem but anyway - 
Can't you use the Live_Workitem_Cnt and use the STRING_KEY and STRING_VAL options ?
For example, I have a custom field named "products_affected" and needed to filter my results according to it.
So in the Live_Workitem_Cnt I added the STRING_KEY parameter and gave it a 'products_affected' value. and in the filters I can use the STRING_VAL to filter my results.

I'm not sure this is exactly what you wanted, but maybe it would help.

Tal.


0 votes

Comments

In LIVE_WORKITEM_CNT dataset STRING_VAL returns literal id value.

In ENUMERATIONS dataset LITERAL_ID returns literal id in same format.

All you have to do is to take care of different project areas (they may have different enumeration lists for same attribute)

1 vote

Thanks Vladimir. Now I have different issue. my Enumerations dataset is empty. I have no data there despite not using any filters.
Any ideas?

Is it empty in BIRT Designer Preview or while generating report in RTC?

In first case check you have specified ENUMERATION_ID sa parameter and optionally project area, without ENUMERATION_ID data set may fetch no data.

It is empty in BIRT Designer Preview. What do you mean by specifying ENUMERATION_ID?
I just wanted to display list of all enumerations. I created new Data source from workitems_snapshot. Then I created Simple Dataset and selected all columns from Enumerations table. That's all what I have done. I cannot see any data in the table created from this dataset and no data in results preview for this data set.

Please let me know if I am doing something wrong.

To get list of ENUMERATION_ID you must use PROJECT_AREA_ITEMID as parameter and set it. This data set cannot fetch all enumerations in repository, for all project areas. It's just the way it works - selec Project Area, then select ENUMERATION_ID you need and get list of literals\names.

P.S. In my previous comment it's wrong - ENUMERATION_ID parameter is optional, but PROJECT_AREA_ITEMID is mandatory to make it work.

1 vote

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 324

Question asked: Jan 25 '13, 11:31 a.m.

Question was seen: 7,471 times

Last updated: Mar 12 '13, 9:53 p.m.

Confirmation Cancel Confirm