Renamed projects cannot be found through the RTC plain API.
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);
|
One answer
Ralph Schoon (63.3k●3●36●46)
| 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. You should be able to find them if you copy/paste the new project area name.
sam detweiler
commented Oct 14 '15, 9:57 a.m.
watch out for trailing spaces in the name
Good catch - Trim before the replace?
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.
please select any of the answers as correct one to complete this question. Thanks.
showing 5 of 7
show 2 more comments
|
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.
Comments
never seen a problem here.. the approach you are using must use the current exact name.