It's all about the answers!

Ask a question

Is it possible to retrieve the iteration type using javascript?

Michele Pegoraro (1.8k14119103) | asked Nov 12 '12, 6:29 a.m.
edited Apr 02 '13, 4:46 a.m. by Ralph Schoon (63.2k33646)
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?


Accepted answer

permanent link
Ralph Schoon (63.2k33646) | answered Nov 12 '12, 6:59 a.m.
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 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

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.


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.