It's all about the answers!

Ask a question

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


Krzysztof Kaźmierczyk (7.5k480103) | asked Jan 25 '13, 11:31 a.m.
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 :)

Comments
James Moody commented Jan 28 '13, 10:21 a.m.
JAZZ DEVELOPER

 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
Vladimir Amelin (70472226) | answered Jan 29 '13, 1:16 a.m.

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

Comments
Krzysztof Kaźmierczyk commented Jan 28 '13, 11:57 a.m. | edited Mar 12 '13, 9:53 p.m.

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.


Krzysztof Kaźmierczyk commented Feb 01 '13, 5:48 a.m. | edited Mar 12 '13, 9:53 p.m.

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
Tal Rabinovitch (4721615) | answered Jan 27 '13, 4:48 a.m.
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.



Comments
1
Vladimir Amelin commented Jan 28 '13, 4:17 a.m.

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)


Krzysztof Kaźmierczyk commented Jan 29 '13, 7:20 a.m.

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


Vladimir Amelin commented Jan 29 '13, 8:04 a.m.

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.


Krzysztof Kaźmierczyk commented Jan 30 '13, 8:04 a.m.

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.


1
Vladimir Amelin commented Feb 01 '13, 5:56 a.m.

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.

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.