Me envia un error en DB Error #1364 Cuando le genero al usuario un nuevo ticket
Versión Osticket-v1.10.5

[INSERT INTO ost_thread_event SET team_id = 1, dept_id = 1, topic_id = 13, timestamp = NOW(), username = 'SYSTEM', state = 'overdue', thread_id = 127] Field 'staff_id' doesn't have a default value

---- Recular ----
#0 (raíz)/include/mysqli.php(204): osTicket->logDBError('DB Error #1364', '[INSERT INTO o...')
#1 (raíz)/include/class.orm.php(3136): db_query('INSERT INTO
os...', true, true)
#2 (raíz)/include/class.orm.php(597): MySqlExecutor->execute()
#3 (raíz)/include/class.thread.php(1818): VerySimpleModel->save()
#4 (raíz)/include/class.ticket.php(2593): ThreadEvents->log(Object(Ticket), 'overdue', NULL, NULL, NULL)
#5 (raíz)/include/class.ticket.php(1976): Ticket->logEvent('overdue')
#6 (raíz)/include/class.ticket.php(3663): Ticket->markOverdue()
#7 (raíz)/include/class.cron.php(30): Ticket::checkOverdue()
#8 (raíz)/scp/autocron.php(57): Cron::TicketMonitor()
#9 {main}

You are running an old version. Please upgrade and see if the problem persists.

    2 months later

    the latest version is 1.12.3.

    12 days later

    @gibraniux

    Go at this step by step.

    The error is saying that there is no Default Value for staff_id as staff_id cannot be NULL (ie. it must have a value). So start by taking a look at your error and you will see that staff_id is nowhere in the query so that means the system is leaving it out for some reason. If you are running v1.12 like you say you are then I do not see why the system is leaving it out as we define the staff_id here as $staff:

    ... and pass $staff to the create method here:

    Cheers.

    Write a Reply...