It's all about the answers!

Ask a question

How to update description content in Project area by Java ?


varathan anandaraj (85212) | asked Apr 28 '16, 5:24 a.m.

I want to update the description content in project area . can anyone help on this ?

Note : I already refer the below link . but no luck

https://jazz.net/forum/questions/48070/how-to-read-description-attribute-of-a-project-area?sort=votes&page=2

My Code like below

IProcessItemService service = (IProcessItemService) teamRepository.getClientLibrary(IProcessItemService.class);

IProjectArea mutableProjectAreaCopy = (IProjectArea) service.getMutableCopy(projectArea);

IDescription description = mutableProjectAreaCopy.getDescription();

// Here I want to update description field.

service.save(new IProcessItem[] {mutableProjectAreaCopy}, nPMonitor);

One answer



permanent link
Ralph Schoon (63.4k33646) | answered Apr 28 '16, 8:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please check Snippet3 coming with the plain java client libraries. The code looks like this and seems to act directly on the IDescription:

        IProjectArea area = service.createProjectArea();
       
        area.setName(projectName + " - " + System.currentTimeMillis());
        area.setProcessDefinition(definitions[0]);
        IDescription description = area.getDescription();
        description.setSummary(projectName + " example project based on the Scrum project template");
        area = (IProjectArea) service.save(area, monitor);
        // Create team
        ITeamArea teamArea = service.createTeamArea();
        teamArea.setName(projectName);






Comments
varathan anandaraj commented Apr 29 '16, 4:17 a.m. | edited Apr 29 '16, 4:17 a.m.

Thanks Ralph Schoon for response . still I did not get answer . seems above example also updating the summary not description . here what is mean Snippet3  ? can you paste the code scenario ?


Ralph Schoon commented Apr 29 '16, 4:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Download the Plain Java Client Libraries from the all downloads tab of your RTC version unzip it and look into the folder snippets to find the example code shipped with them. See https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ and https://rsjazz.wordpress.com/2013/03/20/understanding-and-using-the-rtc-java-client-api/ for more details.

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.