Issue
I’m finding that v8.5.0 (and 8.4.2) don’t save the case status when it’s updated in an edit on screen.
Expected Behavior
The case status should be saved into the DB when it’s selected by the user on screen.
Investigation
The CRM seems to retain the state, but not the status. I see that in the dropdown list editor, status is a hybrid value of state_status (ex: Open_Assigned). This is so that certain statuses are available subordinate to certain corresponding states.
In the DB, the state is stored independently in column state
with a value of Open
, and the status is stored as the hybrid construction in column status
which should show Open_Assigned
.
I was able to capture the save operation via the log (set level to Info). While I don’t see errors, I do see a SQL query which contains an offending value:
UPDATE cases SET
`name`='PDI Test',
`date_modified`='2024-01-27 07:54:47',
`modified_user_id`='1',
`created_by`='ceab0b19-fa61-2373-9970-65838b281334',
`description`='Perform Pre-Delivery Procedures in Assigned Tasks',
`assigned_user_id`='ceab0b19-fa61-2373-9970-65838b281334',
`type`='pdi',
`status`=NULL,
`priority`='P1',
`resolution`=NULL,
`work_log`=NULL,
`account_id`='66a1efda-f817-25c1-2496-5e18dacab4c9',
`state`='Open',
`contact_created_by_id`=''
WHERE cases.id = '4600f72c-56b6-6970-4dee-65b45c09db90' AND deleted=0
As you can see, the status=NULL
value is incorrect, and is the obvious cause for the incorrect value to be submitted into the database.
Potential for Solutions
Where is this query constructed? Perhaps more importantly, is anyone familiar with the process by which the on-screen field value is captured and relayed into the query for DB submission?
System
SuiteCRM 8.5.0
BlueHost Linux 4.19.286-203.ELK.el7.x86_64 x86_64
Apache 2.4.58
MySQL 5.7.23-23
PHP 8.1 (Tried with 7.4 and 8.2 also)