It's all about the answers!

Ask a question

Help birt report, workitem with view of linked workitems


sam detweiler (12.5k6195201) | asked Aug 11 '12, 7:06 p.m.
we have one project that has dependencies on other projects, and we have created links to the workitems in the other projects.  this works fine. even when the workitems are on different ccm servers (have to use the related artifact link type using url for those)..

now, I need to report on

1. from the parent, the workitems that are linked to 'children' project workitems and the status of those workitems.
2. from the child projects, the link of workitems sourced from the parent project.

I can't do this with query, cause the related artifact doesn't allow me to see THRU the workitem.
(we tried the shared change request, but same problem)..

so, to encourage this team to migrate to RTC, I need to give them this reportt.
there is a youtube video of creating a kind of report, but the BIRT versions have changed how you specify
parameters to a data source, and all I get is the list of all the workitems and their summaries, no links.

I REALLY need to get a prototype of this report up this coming week..


Comments
sam detweiler commented Aug 12 '12, 10:26 a.m.

additional info.. I really want to report on all workitems/selected workitem(s) where the linked to target is not in the same project.

2 answers



permanent link
sam detweiler (12.5k6195201) | answered Aug 15 '12, 8:49 a.m.
well, I've solved the 1st part of the problem.. duplicating the youtube example..

the change is to use the Jazz Simple Dataset type when creating the datasets. this supports using the proper input parameters to filter correctly..



permanent link
sam detweiler (12.5k6195201) | answered Aug 12 '12, 6:17 p.m.
the youtube video uses some trick I don't understand

it builds 4 data sources..

1. from links table the source_itemid and linktype
     onfetch of each row, the source_itemid is added to an array (array.push())
2. from links table the target_itemid and linktype.
     onfetch of each row, the target_itemid is added to the same array.

3. using the workitem live table,
     get the workitem ID (number) and itemid.
     and onfetch of each row,  the workitem_id is set to a variable.

4. using the workitem live table,
     get the workitem id, its itemid and its summary

-----
display of all these tables shows what I expect..

so, somehow I need to find the workitems where the current one (table 3, variable workitem)
is the source or target of a link, and ignore all the rest.

if I set filters (linktype!=) on sources 1 & 2, and display those result tables, there are only two workitems
(on my test system items 7 & 16 are linked, linktype=relatedworkitem).. BUT the array has ALL workitems.. 1-16..
so it looks like onFetch fires before the filter takes effect.
on this test system, wi 16 is the source of the relatedworkitem link and 7 is the target.
and the links table shows it that way.

so, I only want to display linked workitems for workitem 16, where 16 is ONE of the link ends
and then it needs to work the same way for workitem 7.

then once that works, I want to filter out the links which are in the same project,
and only report those not in the same project.

report on means a row for each,  id,  workitem status and summary.

but the trick I don't understand from the sample, is to use join("","") on the array.
(I think thats what it ("","") looks like, the video is small!).
but join makes a string of ALL the array contents... how will that help?

oh, the server here is 4.0, there are a lot of non paired workitem links in the links table.
linktypes
com.ibm.team.workitem.linktype.textualReference
com.ibm.team.reports.linktype.defaultChart
com.ibm.team.reports.linktype.defaultReport

when I filter those out,
the only one left (in this scenario) is
com.ibm.team.workitem.linktype.relatedworkitem
one each in the sources(wi16) and targets(wi7) results tables.

the sample uses Total.count(); three times in the report to drive the example,
binding first to Sources, then Targets , then Workitems data sources
which I believe is driving the work process thru the data.
(tables, 1,2,3 above)..
(which means the array is fully populated before Workitems is processed,
this would be a bad design in real life with a million workitems)

but, I think this is

load up all the workitem_IDs for workitems as sources in links
and all the workitem_IDs for workitems as targets in the links table
then loop thru all the workitems (again), ... filtering ... if the workitem_ID
is in the array.. (really need a hashtable)
then get the id of the workitem on the other end of the link.
  if I am the source, get the target (and its data)
  if I am the target, get the source (and its data)



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.