jjdejong / phpip-legacy

Patent and other IP rights portfolio manager and docketing system
GNU General Public License v3.0
1 stars 3 forks source link

Error when entering a filed event in TM matter #21

Closed papoteur-mga closed 6 years ago

papoteur-mga commented 6 years ago

I enter an event "Filed" in a TM matter. I get: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (phpip.task, CONSTRAINT fk_assigned_to FOREIGN KEY (assigned_to) REFERENCES actor (login) ON DELETE SET NULL ON UPDATE CASCADE), query was: INSERT INTO event (matter_ID, code, event_date, detail, alt_matter_ID) VALUES (?, ?, ?, ?, ?) This is not the case with PAT matters.

jjdejong commented 6 years ago

Check if the corresponding task rule has a "responsible" value that is null or is a login in the actor table. The "assigned_to" field of the task receives this value.

papoteur-mga commented 6 years ago

Yes, good catch, JJJ. For some rules, the field contains the string "NULL" instead of being NULL :( Thus, some check to do with the creation of the database, I think.

papoteur-mga commented 6 years ago

This was coming from an old skeleton. Solved by setting all rules with NULL instead of 'NULL' Thanks