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

Can I access a attribute value of a workitem from another workitem?

I have a scenrio where we have created a custom workitem which captures details of a users and his skill .As part of the page the reviewer assigns him a Skill Score .

Issue : We will be capturing the data for various users in a department using the workitem . Now we need to find a combined Skill score of a department . For the same we need to access the skill score of all workitems and calculate the final value .

How can I access skill Score from all workitems ?(using scipts ?)

Please help suggest?

0 votes

Comments

best thing to do is run a query to find all the needed workitems,
then process them one by one to get the calculated value.

see my sample pgm on how to process from a query and access the attributes of the workitems.
see the answer here
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes

note that the forum software messes with text case of thing near < and > so you will have a little fixup once u cut/paste.

then define a workitem query to get your workitems

the utility parms are
server_url userid password project_name and name_of_query_to execute

 Thanks Sam . I am only using RTC and not writing any Java App for this .. what i have done previously is created a atttribute and attach a script based calculation to it for dynamic attribute values in same Workitem . can i use IWorkItemClient , IQueryClient  and other such in Script based using DOJO code ??


Sorry. No idea if the JavaScript runtime env provides enough services to do that. Not likely in my experience . 

The current client side scripting appears to be for attribute customization only, which is confined to the current work item. Even you can load other work items, if you are loading them one by one, it will be very slow. Unless you can run queries in client side scripts, which is a big ask.



One answer

Permanent link
JavaScript, as far as I am aware, only provides access to the attribute values of the current work item. Specifically what can be accessed is described here: https://jazz.net/wiki/bin/view/Main/AttributeCustomization

You can try to write a Java Based attribute customization. The Java API provides more access to data of that work item. I am not sure how far that carries with respect to e.g. following links to other work items.

You can find what I explored here:
https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/

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
× 12,027

Question asked: Jun 29 '14, 2:55 p.m.

Question was seen: 4,263 times

Last updated: Jul 04 '14, 3:02 a.m.

Confirmation Cancel Confirm