How to read description attribute of a project area?
11 answers
Hi,
The information on project areas is available via Public REST API published in JTS' root services resource. This information contains the description as well.
An example url to access root services - https://<host>:<port>/jazz/rootservices
An example url to access project areas - https://<host>:<port>/jazz/process/project-areas
To understand the problem better, can you tell me why do you need to add parameters in a project area?
Thanks,
Shivank
Jazz Foundation
The information on project areas is available via Public REST API published in JTS' root services resource. This information contains the description as well.
An example url to access root services - https://<host>:<port>/jazz/rootservices
An example url to access project areas - https://<host>:<port>/jazz/process/project-areas
To understand the problem better, can you tell me why do you need to add parameters in a project area?
Thanks,
Shivank
Jazz Foundation
Hi,
I want to read 2 string parameters from a project area.
Is it possible to add parameters to project area? If not,
How can I read from description field of a project area?
Thank you
Hi,
Thanks for the reply.
In my build automization, I have a service user that has a dedicated repository workspace for the project. I am reading the name of that service users repository workspace.
Second one is a name of a stream of a project. That is used for build purpose as well.
Now I have third parameter which is build definition name.
The third parameter now I have is build definition name. If possible, I want to read that from a combo box. (I have another post for that)
Now I am reading that information from sumamry field of a proejct area that I want to change.
I think I can write a clientside plugin for that configuration but I dont want to extend RTC Eclipse clients.
Thanks for the reply.
In my build automization, I have a service user that has a dedicated repository workspace for the project. I am reading the name of that service users repository workspace.
Second one is a name of a stream of a project. That is used for build purpose as well.
Now I have third parameter which is build definition name.
The third parameter now I have is build definition name. If possible, I want to read that from a combo box. (I have another post for that)
Now I am reading that information from sumamry field of a proejct area that I want to change.
I think I can write a clientside plugin for that configuration but I dont want to extend RTC Eclipse clients.
To understand the problem better, can you tell me why do you need to add parameters in a project area?
If you are planing to write a OSGI based client plugin, it will make your life easy because you can use the available JAVA SDK APIs of Jazz Foundation. You don't really have to use REST APIs in that case
Here is an example code snippet that can be used.
Will discuss this request of storing custom attributes with a project area with my team.
Good luck.
Shivank
Jazz Foundation Development Team
Here is an example code snippet that can be used.
package com.example;
import java.net.URI;
import com.ibm.team.repository.common.TeamRepositoryException;
import com.ibm.team.repository.client.ITeamRepository;
import com.ibm.team.repository.client.TeamPlatform;
import com.ibm.team.process.common.IProjectArea;
public class Test {
private String getProjectAreaDescription(String[] args) throws TeamRepositoryException {
String repositoryURI= args[0];
final String userId= args[1];
final String password= args[2];
String projectAreaName= args[3];
ITeamRepository teamRepository= TeamPlatform.getTeamRepositoryService().getTeamRepository(repositoryURI);
teamRepository.registerLoginHandler(new ITeamRepository.ILoginHandler() {
public ILoginInfo challenge(ITeamRepository repo) {
return new ILoginInfo() {
public String getUserId() {
return userId;
}
public String getPassword() {
return password;
}
};
}
});
teamRepository.login(null);
IProcessClientService processClient= (IProcessClientService) teamRepository.getClientLibrary(IProcessClientService.class);
URI uri= URI.create(projectAreaName.replaceAll(" ", "%20"));
IProjectArea projectArea= (IProjectArea) processClient.findProcessArea(uri, null, null);
return projectArea.getDescription().getSummary();
}
}
Will discuss this request of storing custom attributes with a project area with my team.
Good luck.
Shivank
Jazz Foundation Development Team
Can you give an example for java API in order to read description attribute of a project area?
Thank you
Hi,
Do you have any news for adding custom attributes to project area?
I can provide more use cases that we are solving by using property files.
For the question, I need to read project area again while extending com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart.
Since the user is already logged in, can you provide an API that does not need to log in again?
Thanks,
Do you have any news for adding custom attributes to project area?
I can provide more use cases that we are solving by using property files.
For the question, I need to read project area again while extending com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart.
Since the user is already logged in, can you provide an API that does not need to log in again?
Thanks,
I have posted this question again but we can go on discussing here:
Copying http://jazz.net/forums/viewtopic.php?t=15649:
I stated my question more clear here:
Copying http://jazz.net/forums/viewtopic.php?t=15649:
I stated my question more clear here:
Hi,
I am extending com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart
In overridden setInput( Object input) method, I am initializing my WorkItemWorkingCopy:
Code:
WorkItemEditorInput workItemEditorInput = ( WorkItemEditorInput) input;
WorkItemWorkingCopy fWorkingCopy = workItemEditorInput.getWorkingCopy();
I would like to read description field of project area. Can you please help about the appropriate api?
Thanks,
Hi Shivak,
I found IProjectArea in precondition (AbstractService, IOperationAdvisor)
I tried your reccommendation:
But this is giving Summary field of project area instead of description.
So to summarize all the message thread I have 2 questions here:
1) I need an example API to read description attribute of Project area in a precondition. Here I managed to obtain IProjectArea.
Precondition is a class that extends com.ibm.team.repository.service.AbstractService and implements com.ibm.team.process.common.advice.runtime.IOperationAdvisor
2)I need an example API to read description attribute of Project area in com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart
Here I dont have IProjectArea so I need an example from scratch.
I found IProjectArea in precondition (AbstractService, IOperationAdvisor)
I tried your reccommendation:
projectArea.getDescription().getSummary();
But this is giving Summary field of project area instead of description.
So to summarize all the message thread I have 2 questions here:
1) I need an example API to read description attribute of Project area in a precondition. Here I managed to obtain IProjectArea.
Precondition is a class that extends com.ibm.team.repository.service.AbstractService and implements com.ibm.team.process.common.advice.runtime.IOperationAdvisor
2)I need an example API to read description attribute of Project area in com.ibm.team.workitem.ide.ui.internal.editor.presentations.AttributePart
Here I dont have IProjectArea so I need an example from scratch.
To access to the description field of a project area, instead getSummary() API, did you try getDetails() API provided by the IDescription interface?
Hi Philippe,
I think your answer is about 1st part of my question. I tried it now. But that method is returning an IContent and I do not know how to get Description attribute of a project area from there.
I need the value as a string.
Plus I need the same thing for client side.
thanks,
page 1of 1 pagesof 2 pages