Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes


Accepted answer

Permanent link
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

0 votes

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. 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,935
× 233
× 152

Question asked: Nov 12 '12, 6:29 a.m.

Question was seen: 5,925 times

Last updated: Apr 02 '13, 4:46 a.m.

Confirmation Cancel Confirm