It's all about the answers!

Ask a question

how can I programmatically get the team area description


Susan Hanson (1.6k2201194) | asked Oct 29 '12, 8:18 a.m.
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

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Oct 29 '12, 11:06 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 29 '12, 11:07 a.m.
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

Comments
Susan Hanson commented Oct 29 '12, 6:14 p.m.

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
Jared Burns (4.5k29) | answered Oct 29 '12, 2:50 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

Comments
Fabien Araktingi commented Nov 10 '17, 9:29 a.m. | edited Nov 12 '17, 6:01 a.m.

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 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.