instedd / mbuilder

Scalable SMS application builder
http://mbuilder.instedd.org/
6 stars 1 forks source link

Error when creating validation trigger on unsaved trigger #347

Open asterite opened 8 years ago

asterite commented 8 years ago

Steps to reproduce:

  1. Create an application
  2. Enter the application
  3. Click on the "Triggers" tab
  4. Click on "Create message trigger"
  5. Inside the trigger edition, create a table with a column. Don't save the trigger
  6. Right click the table column header and choose "Trigger this if values were invalid"
  7. => crash

The main problem is that validation triggers are associated to tables, and these tables need to exist for them to have validations... but in this case the table doesn't exist because we didn't save the trigger.

I don't know what a solution to this is. Maybe validations should be done in a separate page/tab, where all tables with fields would be presented and one could choose the validation for each column.