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

It is possible to create a validator script to prevent Approvals being added before its time in the process ?

We have multiple processes that do require approvals at various workflow states.  However, people are getting ahead of themselves and adding in approvals before the correct process state triggering emails to the approvers when the work item is still in DRAFT

Is there a way to stop this thru a validtor script based on work item type, and state value of Draft ? 

ELM702 

0 votes



4 answers

Permanent link
This can actually be done in a Javascript validator if you don't have access to the server side, but you would need to use data structures that are stable, but aren't formally externally documented.

There are actually several approaches you could take:
 - prevent the work item from being saved if approvals have been created or modified and the work item is in the wrong state
 - automatically create the approval and populate it when the work item gets to a specific state

1 vote


Permanent link
Karen,

You will be able to do it with Java server side extension for EWM. Validator (in Javascript) does not support accessing or changing  approvers data.

0 votes

Comments
could you elaborate on this a little please 


Permanent link
Karen,

Yes, you are able to handle it using validation script. It can not be JavaScript validator, it has to be Java Script Server side extension.

Following workshop should help how to do it : https://jazz.net/library-content/wp-content/uploads/2026/04/RTC700ExtPoT.pdf

0 votes


Permanent link

Hi Karen,


We have a paid plugin for EWM that does the opposite of this -- it'll add the approval based on the transition to any state you specify.

We could modify it so that it removes approvals on certain states. You'd have to pay for the plugin, but we could do this. Here's the approval being automatically added:

https://youtu.be/qDHIdb2_LKE?t=466

So we'd allow the admin to set that if the ticket was in draft or rejected, or any other state you specify, that the approval would be deleted.

Contact info at the end of the video.

0 votes

Comments
Admin interface can be seen here: https://youtu.be/qDHIdb2_LKE?t=397

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,625
× 1,455

Question asked: Sep 23, 10:16 a.m.

Question was seen: 756 times

Last updated: Oct 05, 9:05 p.m.

Confirmation Cancel Confirm