It's all about the answers!

Ask a question

Project Area Releases in Java API


Sola Otudeko (4511316) | asked Sep 21 '11, 10:35 a.m.
Hi, Can anyone please help with getting the list of Releases in a project area in the api (client or server). Specifically, I would like to get the build result name (Artifact column) for a Release. Thanks
Sola

2 answers



permanent link
Sola Otudeko (4511316) | answered Sep 22 '11, 10:01 a.m.
Hi, Can anyone please help with getting the list of Releases in a project area in the api (client or server). Specifically, I would like to get the build result name (Artifact column) for a Release. Thanks
Sola


It looks like I should have been searching for 'deliverable', so different question now....

for my custom field which lists the release (ie. deliverables), i have this to get the value

--------
IDeliverableHandle deliverableHandle = (IDeliverableHandle) attribute.getValue(auditable, workItem, monitor);
--------

but this returns an IDeliverableHandle. How do I get the actual IDeliverable object (from which I can get its name) with this?

and when I do get the name....

--------
IDeliverable deliverable = (IDeliverable) workItemService.findDeliverableByName(projectAreaHandle, deliverableName, (ItemProfile<IDeliverable>) profile, monitor);
IItemHandle artifact = deliverable.getArtifact();
--------

2nd question....how do i get the artifact name?


*** Actually, the truly ideal solution is if I can do this in javascript and use a calc value customisation. All i want to do is get the build label (artifact) of the selected release and display in a field. Anyone know if this can be done?


Thanks.
Sola

permanent link
Roger Layani (5312737) | answered Apr 21 '12, 12:49 a.m.
Hi, Can anyone please help with getting the list of Releases in a project area in the api (client or server). Specifically, I would like to get the build result name (Artifact column) for a Release. Thanks
Sola


hi
this is what I did:

List<IDeliverable> deliverables = workItemCommon.findDeliverablesByProjectArea(projectArea, true, IDeliverable.FULL_PROFILE, monitor);

for (IDeliverable deliv : deliverables) {
System.out.println(deliv.getName());
}

Roger

Your answer


Register or to post your answer.