Incident Types

15 views
Skip to first unread message

Ronald Jones

unread,
Apr 8, 2026, 8:54:57 PMApr 8
to Open Source CAD
When creating an incident type, it seems all of the fields are required to be filled out instead of just type, description, and possible protocol. the other Group, Sort, radius, color, opacity, notify mailgroup, notify email, notify when at one point I don't remember in past tickets versions were mandatory to be filled out, the part most I have an issue with is the mail group section. The config settings for smtp don't seem to work or I'm not setting it up right. is there a way to just only require type, description for an incident type. 
Screenshot 2026-04-08 204312.png
Screenshot 2026-04-08 205424.png

Eric Osterberg

unread,
Apr 8, 2026, 11:06:06 PMApr 8
to open-so...@googlegroups.com

You're right — the incident type form should only require Type and Description. The other fields (Group, Sort, Radius, Color, Opacity, Notify Mailgroup, Notify Email) should all be optional. This is a database schema issue from older installations where those columns were created as NOT NULL.

There are three ways to fix this, from easiest to most thorough:

OPTION 1 — Run the fix script (easiest, no other changes)

Download just the fix script and run it in your browser:

  1. Download the file from GitHub:
    https://raw.githubusercontent.com/openises/tickets/main/tools/fix_in_types_schema.php

  2. Save it to your TicketsCAD installation under the tools/ folder:
    /your-tickets-path/tools/fix_in_types_schema.php

  3. Open it in your browser:
    http://your-server/tickets/tools/fix_in_types_schema.php

  4. You should see output like:

    [FIXED] 'protocol' changed to allow NULL
    [FIXED] 'group' changed to allow NULL
    [FIXED] 'sort' changed to allow NULL
    ... etc.
    
  5. After running it, go back to the incident types configuration and try adding a new type. Only Type and Description should be required now.

You can delete the script after running it — it's a one-time fix.

OPTION 2 — Run the installer in upgrade mode (recommended for full sync)

This brings your entire database schema up to date with the latest release:

  1. Pull the latest code (git pull) or download the latest release from:
    https://github.com/openises/tickets/releases

  2. Open the installer in your browser:
    http://your-server/tickets/install.php

  3. The installer will detect your existing installation. Select "Upgrade" and follow the prompts.

  4. The upgrade process compares every table in your database against the current schema and fixes any differences — including the in_types columns. Your data is preserved.

OPTION 3 — Manual SQL fix (if you prefer direct database access)

Run these ALTER TABLE statements against your TicketsCAD database:

ALTER TABLE in_types MODIFY COLUMN protocol TEXT DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN `group` VARCHAR(20) DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN sort INT(11) DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN radius INT(4) DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN color VARCHAR(8) DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN opacity INT(3) DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN notify_mailgroup INT(4) DEFAULT NULL;
ALTER TABLE in_types MODIFY COLUMN notify_email VARCHAR(256) DEFAULT NULL;

Note: group needs backticks because it's a MySQL reserved word.

ABOUT THE SMTP / MAIL GROUP ISSUE

The Notify Mailgroup and Notify Email fields on the incident type form are completely optional. They only matter if you want automatic email notifications when incidents of that type are created/closed. If you don't need email notifications for incident types, you can safely leave those fields blank after applying any of the fixes above.

If you do want to set up email notifications later, the SMTP configuration is under Configuration > Settings in the main TicketsCAD interface. Happy to help troubleshoot that separately if needed.

Let me know if you run into any issues with the fix.

Best regards,
Eric



On Wed, Apr 8, 2026 at 7:55 PM Ronald Jones <mike20...@gmail.com> wrote:
When creating an incident type, it seems all of the fields are required to be filled out instead of just type, description, and possible protocol. the other Group, Sort, radius, color, opacity, notify mailgroup, notify email, notify when at one point I don't remember in past tickets versions were mandatory to be filled out, the part most I have an issue with is the mail group section. The config settings for smtp don't seem to work or I'm not setting it up right. is there a way to just only require type, description for an incident type. 

--
You received this message because you are subscribed to the Google Groups "Open Source CAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to open-source-c...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/open-source-cad/3ee76e6b-fefe-47fe-a8b3-45b0b579df96n%40googlegroups.com.

Kurt H.

unread,
Apr 10, 2026, 3:28:15 AM (14 days ago) Apr 10
to open-so...@googlegroups.com
Hi all

first of all, thanks for keeping this program alive and updated!

One question: it looks like several corrections were done in the past weeks - if I pull the ZIP from GIT now, are they already in there?

Thanks and best regards,
Kurt


Eric Osterberg

unread,
Apr 10, 2026, 8:27:25 AM (13 days ago) Apr 10
to open-so...@googlegroups.com
Several ways exist to find a ZIP file.
The latest public version is always at this location: https://github.com/openises/tickets/archive/refs/heads/main.zip
You can read about what's changed at: https://github.com/openises/tickets/commits/main/ -- although this is often in 'developer speak'.
image.png


mike

unread,
Apr 10, 2026, 9:06:31 AM (13 days ago) Apr 10
to open-so...@googlegroups.com
Hi Eric, thanks for coming up with a fix, I'm having some issues. When using the provided file for the fix, I get Warning: require_once(C:\xampp\htdocs\tickets/../incs/functions.inc.php): Failed to open stream: No such file or directory in C:\xampp\htdocs\tickets\fix_in_types_schema.php on line 21. I've been using github desktop to pull changes, so i tried that and ran the install.php upgrade option, logged in and tried to add an incident type and still the same issue with requirements. then i when that didnt seem to work i used the manual fix alter table. got 

 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0709 seconds.)

ALTER TABLE in_types MODIFY COLUMN protocol TEXT DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0070 seconds.)

ALTER TABLE in_types MODIFY COLUMN `group` VARCHAR(20) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0043 seconds.)

ALTER TABLE in_types MODIFY COLUMN sort INT(11) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0061 seconds.)

ALTER TABLE in_types MODIFY COLUMN radius INT(4) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0043 seconds.)

ALTER TABLE in_types MODIFY COLUMN color VARCHAR(8) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0057 seconds.)

ALTER TABLE in_types MODIFY COLUMN opacity INT(3) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0062 seconds.)

ALTER TABLE in_types MODIFY COLUMN notify_mailgroup INT(4) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]
 MySQL returned an empty result set (i.e. zero rows). (Query took 0.0047 seconds.)

ALTER TABLE in_types MODIFY COLUMN notify_email VARCHAR(256) DEFAULT NULL;
[ Edit inline ] [ Edit ] [ Create PHP code ]

logged in and still same with the requirements. Maybe im not doing this right and missing a step or something or i have and issue with my set up. 


Eric Osterberg

unread,
Apr 10, 2026, 9:12:12 AM (13 days ago) Apr 10
to open-so...@googlegroups.com
Good morning Mike,

Thanks for the detailed report — I found the real problem. The ALTER TABLE commands you ran were correct and did work (the "empty result set" messages are normal for ALTER TABLE), but the actual issue is a PHP 8 compatibility bug in the form validation code, not the database schema.

The validation in tables.php uses a comparison that worked in PHP 5 and 7 but broke in PHP 8 — it was accidentally marking every field as required regardless of whether the column allows NULL.

The fix is a one-line change in tables.php. Here's how to apply it:

Option A — Pull the update via GitHub Desktop:

  1. In GitHub Desktop, click Fetch origin then Pull origin
  2. That's it — the fix is in tables.php and will take effect immediately
  3. Try adding an incident type again — only Type and Description should be required now

Option B — Manual edit if you prefer:

  1. Open tables.php in a text editor
  2. Search for this line (around line 784):
    if (($row['Null']) !=0) {
    
  3. Replace it with:
    if ($row['Null'] !== 'YES') {
    
  4. Save the file

That's the entire fix. No database changes needed — the ALTER TABLE commands you already ran were fine, and won't hurt anything.

About the fix script error you saw earlier — the error about functions.inc.php was because the script was placed directly in the tickets/ folder instead of the tickets/tools/ subfolder. It doesn't matter now since the real fix is the tables.php change above.

Let me know if this resolves it!

Best regards,
Eric



mike

unread,
Apr 10, 2026, 5:29:24 PM (13 days ago) Apr 10
to open-so...@googlegroups.com
Afternoon Eric,

Thank you for providing the updated fix. I have tested the changes, and the incident types are now functioning as expected.


Eric Osterberg

unread,
Apr 10, 2026, 7:00:01 PM (13 days ago) Apr 10
to open-so...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages