It's all about the answers!

Ask a question

How to trigger a script on SAVE button?


Pravin Patil (104138133) | asked Jun 05 '15, 2:26 p.m.

Hi,

Is there a way to trigger a script on SAVE button-press of a work item?

Accepted answer


permanent link
Ralph Schoon (63.1k33646) | answered Jun 11 '15, 3:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 11 '15, 3:03 a.m.
The answer remains, the required attributes is controlled by a mechanism that is built in the tool based on the pre-condition/adviser extension point for the work item save operation.

You would have to create your own required attributes condition that does all this.
Because it has to work with the UI - all the required attributes are marked with a red asterisk - the built in advisor has some tight integrations that are not available to you and can not be extended. I have very recently looked at the code.

So you would try to create your own advisor and then you would run into the problem that your advisor has no integration into the UI and can't show the red asterisk. This makes it even worse.

You would have to try to rely on the trick that is used in the code to get the attribute configuration from the configuration of the built in advisors and run your advisor beforehand - put it at the beginning of the list in your process configuration.

You would still rely on the way advisors return the error and it gets displayed.

I would suggest to create an enhancement request instead to show all the required attributes in the hover.


Pravin Patil selected this answer as the correct answer

Comments
Pravin Patil commented Jun 17 '15, 8:47 p.m.

Where to raise a enhancement request?


Ralph Schoon commented Jun 18 '15, 3:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

One other answer



permanent link
Ralph Schoon (63.1k33646) | answered Jun 09 '15, 3:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I am unsure about what you want to do, since you don't provide any specifics.

The only way to do something after the save of a work item is a follow up action. You can run a script from there.

Comments
1
Pravin Patil commented Jun 10 '15, 5:30 p.m.

I should have given more specifics. Here is what I want to do:

I have 25 mandatory fields in a workitem, spread across different tabs. Now if a field is mandatory and not filled by a user, RTC gives message about it (on click of SAVE button). What I am trying to script is, on click of SAVE, a notification will be displayed, which will list out all such fields which are mandatory but are not filled. This will be more convenient to users rather then filling up a field, then clicking save, one by one...

so will a follow-up action help to trigger a script on click of SAVE button of the work item?

Please let me know.


Your answer


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