It's all about the answers!

Ask a question

Is it possible to retrieve the iteration type using javascript?


Michele Pegoraro (1.8k12106100) | asked Nov 12 '12, 6:29 a.m.
edited Apr 02 '13, 4:46 a.m. by Ralph Schoon (55.5k23642)
 Hi,
I'd like to create a script based value provider that check the iteration type the work-item is planned for. In the examples I see that I can obtain the value of the planned for attribute using WorkItemAttributes.PLANNED_FOR.

But this value is the UUID of the iteration and then I have to find the IterationType. Is it possible? Is there an api to do it?

Thanks,
Michele.

Accepted answer


permanent link
Ralph Schoon (55.5k23642) | answered Nov 12 '12, 6:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 12 '12, 7:00 a.m.
Hi Michele, you can do workItem.getValue() and workItem.getLabel() to get the UUID and the text representation in scripts. As far as I know and from https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript there is no API I would be aware of, that would allow to access the iteration type.

In general more complex IItem values can not, as far as I can tell, be examined closer for additional information. You can also not search for other information. If there are no built in Advisors or Participants then you would likely have to build one in that situation.
Michele Pegoraro selected this answer as the correct answer

Comments
Michele Pegoraro commented Nov 12 '12, 7:54 a.m.

Hi Ralph,

unfortunatly I cannot use advisor or participants in this case because I'd like to use the iteration type in order to configure a value set from an enumeration (for example each iteration type has specific value that can be used for an enumeration attribute).

But maybe I could try with the getLabel() method you mentioned  using some naming convention on iteration name.

Thanks,
Michele. 

Your answer


Register or to post your answer.