Is it possible to retrieve the iteration type using javascript?
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
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.
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.
Comments
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.