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

How to calculate 'Owned By' attribute value based on another attribute value?

Hi

I would like to calculate the 'Owned By' attribute value based on another attribute's value on the same workitem. I tried by adding a dojo script to the 'Calculated Values', but I am not sure how to return a user (contributor) from the dojo code. Is it possible to return a contributor from the script? If yes, then how to do so?

Can anyone help plz, Thanks in advance.

Regards,

Vijay

0 votes

Comments

In addition to Dinesh's answer, please be aware that there is no way to search for contributors in the script. You can not access team areas or project areas, nor roles of the users. Others have stored the UUID's of users in the script configuration.

There might be a way to useĀ  a HTTP based Value Provider from within the script, like described in this post: http://jorgediazblog.wordpress.com/2012/06/27/work-item-customization-httpconector-and-oauth-in-rtc-4-0-for-oslc/ but I haven't tried it.

This is one of the cases, where you might want to think about another solution, such as a Java extension. Some possible scenarios are described in rsjazz.wordpress.com.

And you might want to look at https://jazz.net/library/article/1093 the next Lab (5) about Java Script is in the queue to be published soon.



One answer

Permanent link
it is possible to return a contributor from the script, you need to return the specific id associated with the contributor.
below is a sample on setting the contributor to unassigned, which might give you an idea on how to go about it: 
how-to-set-contributor-type-field-to-unassigned-in-attribute-customization-script

if the attribute whose value needs to be used for Owned By is of the Contributor type, your task is simplified.  you just need to do a getValue on the source attribute and use it to be returned from your script. 

0 votes

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,937
× 34

Question asked: Jan 10 '13, 7:05 a.m.

Question was seen: 6,048 times

Last updated: Jan 10 '13, 7:39 a.m.

Confirmation Cancel Confirm