How to get Owner of a Build Definition from RTC side via RTC API
Dear RTC team,
Currently I have concern on the way to get Owner of a Build Definition from RTC side via RTC API. Could you please help? Thank in advance! |
2 answers
Ralph Schoon (63.6k●3●36●46)
| answered Mar 01 '16, 10:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
As far as I know there s no Owner for an com.ibm.team.build.common.model.IBuildDefinition
There is a project or Team Area property defined by the property PROPERTY_PROCESS_AREA. |
From the IBuildDefinition it is possible to get the IProcessAreaHandle directly, which is a superinterface of both IProjectAreaHandle and ITeamAreaHandle.
The example below is complete and will print the unique UUID of the Process Area. The same you would see in the Project/Team Area URI. public class Main { public static void main(String[] args) { IProgressMonitor myProgressMonitor = new NullProgressMonitor(); final String userId = "abc0de";Hope it helps! Edit: As Ralph Schoon mentioned, you cannot assign a USER as owner of a Build Definition. Instead, you can set an area (Project Area or Team Area) where it's visible and its users are allowed to modify/delete it based on roles and privileges assigned. In RTC, some elements can be assigned to users and project/team areas (i.e. Components), only users (i.e. Repository Workspace) or only project/team areas (i.e. Streams). |
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
Thanks Ralph Schoon and Rafael Rezende for your answers.
I can pull the Process Area and the build definitions from RTC via API, but unfortunately I don't still see OWNER of the build definition or the project area.
Should the RTC team provide us the way to get the build owner?
Thanks for your support.
As already stated:
I am not aware of the concept of an owner for a build definition other than it is in a project area. So please provide us with a useful description what the owner of a build definition should be and where we should be able to see it in the RTC UI. If you can't show it in the UI, it is likely not there at all.