It's all about the answers!

Ask a question

How to get Iteration id out of it's UUID ?


Yehiel Glass (25538986) | asked Jun 12 '13, 5:09 a.m.
Hello,

I want to get iteration id value out of work-item field.
itemCopy.getTarget().getItemId();
itemCopy.getValue(TargetAttribute).toString().trim();
both gives me the UUID of the iteration but I need it's name.
How can I get the iteration name out of it's UUID ?

Thanks.

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Jul 10 '13, 9:30 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 10 '13, 9:32 a.m.
Please see the article https://jazz.net/library/article/807

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);
      ArrayList handleList = new ArrayList();
      handleList.add(resultHandle);
      IFetchResult fetchResult = aTeamRepository.itemManager().fetchCompleteItemsPermissionAware(handleList, IItemManager.REFRESH, null);

Yehiel Glass selected this answer as the correct answer

Comments
Ralph Schoon commented Jul 10 '13, 9:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Yehiel Glass commented Jul 18 '13, 10:01 a.m.

Thanks Ralph !

My code:

IIterationHandle plannedForField = item.getTarget();

IIteration iteration = (IIteration) itemService.fetchItem(plannedForField, null);

String iterationLabal = iteration.getLabel();

One other answer



permanent link
Kot T. (1.5k11219) | answered Jun 12 '13, 11:21 a.m.
JAZZ DEVELOPER

Comments
Yehiel Glass commented Jul 10 '13, 9:17 a.m.

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

Your answer


Register or to post 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.