Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Calculated value script not triggering on csv import for work item creation

I have created a calculated value script that works as expected when any dependent attribute changes for a work item. However, this script is not being triggered when using a csv for importing a work item set for both creating a new work item or updating a work item attribute (which you think would trigger a save...). This is a big problem as our teams use csv imports quite often for both updating and creating new items. How can I get the script to trigger for csv imports so that it is not strictly limited to manual updates.

0 votes


Accepted answer

Permanent link

 To my knowledge, attribute customization only works in the Web UI and in the EWM Eclipse client. The attribute customization scripts are not run in other contexts e.g. when adding and modifying work items using

  • The plain Java client Libraries
  • The OSLC API
  • Automation such as CSV import
It is possible to create automation that does run in all of these contexts. This would require server extensions such as follow up actions. Caveat here is that a follow up action would only run AFTER the user saves the work item. It is technically possible to create custom editor presentations, but the effort is quite high.

Jared Yeates selected this answer as the correct answer

0 votes

Comments

So then even with a server extension it would still require the user to save the work item through Eclipse or the Web client? Or can a work item be saved through the Java client Libraries or the OSLC API to trigger the follow up action. I am guessing it would be rather hard to do this specifically for the CSV import but I might be able to make do if a follow up action can be triggered through an API interaction. 

Attribute customization interacts with the UI. The user enters a value, the calculated value triggers the calculated value is updated in the UI. If there is no UI happening (e.g. API call, CSV import), the JavaScript is never called and does not work. 

Contrary, follow up actions do not have access to the UI. They get triggered after the user pressed the save button. A follow up action can then participate in the save and work on the available data. This can be the update to a work item attribute. In the UI, the user would see the work item update after the save - worst case with a link to refresh.

I wanted to make sure you understand the difference.

A follow up action/participant deployed to the server would always work on a work item save and would work with API updates and CSV import as well as with changes in the UI.

But it would work differently for the user. I can not decide if that matters to your use case.

Please also note that a Server extension requires physical access to the server to deploy it. This could be impossible in cloud hosted environments.

Instead of 

They get triggered after the user pressed the save button. 



I should have written that server side follow up actions get triggered by anything that causes the operation they guard. Does not matter what. User, API, Integrations...

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
× 7,528
× 1,358

Question asked: Oct 31 '23, 3:56 p.m.

Question was seen: 731 times

Last updated: Nov 01 '23, 11:30 a.m.

Confirmation Cancel Confirm