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

how can I programmatically get the team area description

I am writing a report on the Team Areas and I am able to get the team area Name and summary, members and the roles of those members. However, the Description (the multi-line box in the UI) I can't seem to get yet.
//get the team area ITeamArea teamArea = (ITeamArea)rtcm.getRepository().itemManager().fetchCompleteItem(teamAreaHandle,0,null);
//get the teamData from that area ITeamData teamData = teamArea.getTeamData();
//Get the team area name String name = teamArea.getName();

However, here is where I get problems. The summary (the 1-liner)
String summary = teamArea.getDescription().getSummary();

but the multi-line Description field I'm having problems with. It isn't the getDescription() since I use it to get the 1-line summary. Does anyone know how to get the multi-line description??

Susan

0 votes


Accepted answer

Permanent link
Hi Susan,

please try:

            IDescription desc=  teamArea.getDescription();
            IContent content = desc.getDetails();
            String detdescription="";
            if (content != null) {
                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                teamRepository.contentManager().retrieveContent(content, stream,null);
                try {
                    detdescription = stream.toString(content.getCharacterEncoding();
                } catch (UnsupportedEncodingException exception) {
                    detdescription = stream.toString();
                }
            }

Susan Hanson selected this answer as the correct answer

1 vote

Comments

Bingo!  Thanks, this works perfectly.  Since we rotate "Iteration Lead" role every iteration, we have been requiring the teams to update multiple places:  one in RTC to get the right role permissions and one on a wiki for a table.  This way, we can have them update RTC and the wiki table for quick information can be generated automatically off a cron job that runs nightly.

Susan


One other answer

Permanent link
In addition to the code Ralph provided (which looks reasonable to me), I would also point you to the "Runtime Report" feature that is currently available in the RTC Eclipse client. If you right click on a project area in the Team Organization view and select Generate Runtime Report, you'll get a zip file with an HTML site containing this kind of info.

If there's something missing from the report, you can open an enhancement request against Jazz Foundation, Process component.

0 votes

Comments

Hi Jared,

Is there a way to programmatically generate the same output than the "Generate Runtime Report" ?

I'm really interested by that because I'm looking for a way to get team/member/role as we can see in the Web UI programmatically.

Thanks

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,939

Question asked: Oct 29 '12, 8:18 a.m.

Question was seen: 5,045 times

Last updated: Nov 12 '17, 6:01 a.m.

Confirmation Cancel Confirm