How to get Iteration id out of it's UUID ?
Accepted answer
It has the ID of a build result creates a handle from the UUIDand fetches the information. The code for an iteration should be similar. This should work on client and on the server (using a service and not the itemmanager)
IBuildResultHandle resultHandle = (IBuildResultHandle) IBuildResult.ITEM_TYPE.createItemHandle(UUID.valueOf(buildResultID), null); ArrayListhandleList = new ArrayList (); handleList.add(resultHandle); IFetchResult fetchResult = aTeamRepository.itemManager().fetchCompleteItemsPermissionAware(handleList, IItemManager.REFRESH, null);
Comments
You might also be interested in https://rsjazz.wordpress.com/2012/10/05/handling-iterations-automation-for-the-planned-for-attribute/
Thanks Ralph !
My code:
IIterationHandle plannedForField = item.getTarget();
IIteration iteration = (IIteration) itemService.fetchItem(plannedForField, null);
String iterationLabal = iteration.getLabel();
One other answer
Hi Yehiel,
There are a few jazz.net questions similar to this. Not sure if they are helpful here:
https://jazz.net/forum/questions/65253/create-or-delete-iteration-and-timelines-programatically
https://jazz.net/forum/questions/90099/how-to-get-and-set-the-iteration-targetid-using-java-api
Comments
Hello Kot,
I saw the links and can get the development line label:
operation.getDevelopmentLine().getLabel();
but i get the current iteration while I need to have the iteration lable that was choosen in the Work-item .
How can I get the string in the field "planned for" in the Work-item ?
Thanks,
Yehiel