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

Set value of multiple fields in a workitem

Hello,
I would to customise workitem and so I use dojo script in "Calculated values" to change value of my fields.
I have succeeded to modify a value of ONE field when I change the state of my workitem with the dojo method "return".
In fact, as this script is linked to only one field, only one field can be modified ...
I would like in the same script modify some fields ... In the documentation, I see that the method getValue can be used but is the method setValue() exist ???
Have you got a documentation of this specific dojo api ?
Thanks a lot
Mathieu

0 votes



9 answers

Permanent link
It is not possible to set a value through this "Calculated Value" script mechanism. See this article for the API reference.

As an alternative, you can use another calculated value script on the other attribute.

--
Gabriel Enriquez, IBM Rational, Tracking & Planning

2 votes


Permanent link
1. Based on where you are Creating the Plug-in Site folder, It will be decided.
       - Correction, What we are talking about is Plain Java API. Not java script.
2. They will be stored in the RTC Server. Not any where in the Project area.
3. It Should.

Before that make sure who have gone through the Links

https://jazz.net/library/article/784

and especially

https://jazz.net/library/article/634

1 vote

Comments

Muthukumar, I have read this article https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Conditions . You see in the part "Providing new customizations implemented in Java", that Java API seems not to work on the Web UI. It's very strange with your solution ... Have you tested your plugin in the web site ? Thanks Mathieu


Permanent link
Hi Mathieu,

1. A plugin is not a script, but a complete package deployed at server or client level.
2. For a server-side plugin - contents will be extracted into corresponding sites folder and path mapped in provision profiles directory.
3. Server-side plugins - will be triggered on certain operations - like save workitem and will execute on any client. (Process config->Team configuration->operation behaviour)

1 vote

Comments

Thanks Valli !!! This week-end I hope I will have time to develop my first plugin and test to execute code when I save a workitem


Permanent link
Thanks Gabriel for your post.
It's also my workaround but there is a big problem ...
What is the first field which will be updated ??? In fact, I cannot organize the order of my scripts when they are executed ...
Have you got an idea to modify this order ?
Thanks !
Mathieu

0 votes

Comments

The execution follows the order on which those were defined in the Work Item Type attributes (Process Configuration). Unfortunately, there is not an explicit attribute to declare such execution order.

You can also help us filing an enhancement for such behavior at RTC jazz.net.

1 vote

Ok gabriel ! It's a very nice idea !!! So I am going to modify the process configuration in order to call first the fields which interest me !!! When I will have a feedback I post a comment here. Mathieu

Gabriel, I have just tested your proposal and it doesn't work ... In fact, I have 2 fiels that I have renamed in the Process Configuration to be executed in good order but finally this order isn't respected ;-( I have tried to examine the xml code but the order is the same than the Process configuration. Thanks Mathieu


Permanent link
Hi,

I am advising you Server side Operation Participant (Java API) to modify the values of attributes as in the order you want during the Save operation.

Muthukumar.C

0 votes


Permanent link
Thanks Muthukumar but I have read on the documentation that if I use Java API, the scripts could not be executed on the web access and the scripts should be installed on each eclipse client ...
So this solution seems to be very binding ;-(
Mathieu

0 votes


Permanent link
Hi,

There are two types of Plug-ins available. One is Client Side what you are talking about and another is Server side which will execute in the Server before saving every work item. [No need for Client level installation]

So, You can go with Server side plug-in.

0 votes


Permanent link
Thanks a lot !!! It's a very important information :-)
So I have questions :
1) How do you know if the script is a "Server side plug-in" and not a "Client Side plug-in" ?
2) Where are they stored ? In the "Calculated values" ?
3) Are you sure that the "Server side plug-in" can be executed fro mthe web site ?

0 votes


Permanent link
Thanks Valli !!!
This week-end I hope I will have time to develop my first plugin and test to execute code when I save a workitem

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
× 6,121
× 369
× 34

Question asked: Jun 19 '12, 9:44 a.m.

Question was seen: 8,496 times

Last updated: Jun 21 '12, 2:39 a.m.

Confirmation Cancel Confirm