It's all about the answers!

Ask a question

Renamed projects cannot be found through the RTC plain API.


Henrik Sloth (48514) | asked Oct 14 '15, 7:34 a.m.
I am using the findProcessArea to locate projects in a webservice which creates defects in RTC. It seems however that I am not able to locate projects which have changed their name. Anyone with a solution for this or am I doing something wrong??

Sample code:
IProcessClientService processClient = (IProcessClientService) API.repo.getClientLibrary(IProcessClientService.class);
URI uri = URI.create(strProjectAreaName.replaceAll(" ", "%20"));
ipa = (IProcessArea) processClient.findProcessArea(uri, null, null);



Comments
sam detweiler commented Oct 14 '15, 7:58 a.m.

never seen a problem here..   the approach you are using must use the current exact name.

One answer



permanent link
Ralph Schoon (63.1k33646) | answered Oct 14 '15, 8:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 See https://rsjazz.wordpress.com/2012/12/09/analyzing-a-aroject-areas-members-and-roles-using-the-plain-java-client-libraries/ for how to iterate the project areas.

There is a project area alias, that should stay constant, however I don't know any way to find that alias.

Comments
Henrik Sloth commented Oct 14 '15, 9:32 a.m.

Thanks Ralph, I was looking at your example to solve the issue. Found it rather strange though that it couldn't find them after the name change. Most PA are found without any problems.


Ralph Schoon commented Oct 14 '15, 9:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should be able to find them if you copy/paste the new project area name.
I haven't tried, but that should be possible. Maybe there is some kind of issue with the name you use.


sam detweiler commented Oct 14 '15, 9:57 a.m.

watch out for trailing spaces in the name


Ralph Schoon commented Oct 14 '15, 9:58 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Good catch - Trim before the replace?


sam detweiler commented Oct 14 '15, 10:05 a.m. | edited Oct 14 '15, 10:16 a.m.

problem is that the user fills in the field for the project name, and presses save


Henrik Sloth commented Oct 15 '15, 3:27 a.m.

Thanks guys, I did all of the above. Turned out the project was not inheriting the correct template. So it had nothing to do with the name - works fine, both methods.


Ralph Schoon commented Oct 15 '15, 4:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

please select any of the answers as correct one to complete this question. Thanks.

showing 5 of 7 show 2 more comments

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.