Mandatory addressing of forms


You have created a form in todo4teams, but you want that this form will be used for ticketing of only one specific team?

In other words: if this form is used, a very specific team must be selected when addressing the tickets.

Proceed as follows:

  • login to todo4teams as administrator or superadministrator
  • switch to the tab "Forms"
  • Select the form that you want to make the addressing mandatory
  • Go to "Edit"
  • Switch to the tab "send action" and insert the following script code:

var adressee=null;

if(task.getAddressee()!=null && task.getAddressee().getAddressedWorkgroup()!=null){
 adressee=task.getAddressee().getAddressedWorkgroup().getName();   
}

if(adressee!="Team West"){
  helper.errorMessage("This form may only be addressed to Team West.");
  result="error";
}

In this example the addressing of the form to the group "Team West" is required. Please change the group name according to your needs.

If the addressee of the ticket is not "Team West", you will receive an error message generated by  the method helper.errorMessage(), which will prevent further sending of the ticket by setting the result variable to result="error".

The user can then either modify the addressee or disable the whole form in order to submit the ticket without the use of the form.

     

Child Pages