Bug #5568

solution message when editing ticket's task

Added by orthagh 6 months ago. Updated 24 days ago.

Status:ClosedStart date:10/01/2018
Priority:NormalDue date:
Assignee:yllen% Done:

100%

Category:-
Target version:2.1.2

Description

When editing status of a ticket'st task, i get the following message (in french):
"Description de la solution obligatoire pour r├ęsoudre/fermer un ticket"

And these logs:

[2018-10-01 13:59:24] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi/9.3-git/inc/toolbox.class.php line 657
  *** PHP Notice(8): Undefined variable: soluce
  Backtrace :
  plugins/behaviors/inc/tickettask.class.php:93      
  inc/plugin.class.php:1271                          PluginBehaviorsTicketTask::beforeUpdate()
  inc/commondbtm.class.php:1323                      Plugin::doHook()
  front/commonitiltask.form.php:76                   CommonDBTM->update()
  front/tickettask.form.php:36                       include()
  {"user":"2@LU002"} 
[2018-10-01 13:59:24] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi/9.3-git/inc/toolbox.class.php line 657
  *** PHP Notice(8): Trying to get property 'fields' of non-object
  Backtrace :
  plugins/behaviors/inc/tickettask.class.php:93      
  inc/plugin.class.php:1271                          PluginBehaviorsTicketTask::beforeUpdate()
  inc/commondbtm.class.php:1323                      Plugin::doHook()
  front/commonitiltask.form.php:76                   CommonDBTM->update()
  front/tickettask.form.php:36                       include()
  {"user":"2@LU002","mem_usage":"0.000\", 10.30Mio)"} 
[2018-10-01 13:59:24] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi/9.3-git/inc/toolbox.class.php line 657
  *** PHP Notice(8): Undefined property: stdClass::$fields
  Backtrace :
  plugins/behaviors/inc/tickettask.class.php:94      
  inc/plugin.class.php:1271                          PluginBehaviorsTicketTask::beforeUpdate()
  inc/commondbtm.class.php:1323                      Plugin::doHook()
  front/commonitiltask.form.php:76                   CommonDBTM->update()
  front/tickettask.form.php:36                       include()
  {"user":"2@LU002","mem_usage":"0.000\", 10.30Mio)"} 

Checking the code of inc/tickettask.class.php, i'm not sure the following block (lines 91-> 98) should be here:

if ($config->getField('is_ticketsolution_mandatory')) {
...
}

Associated revisions

Revision 273
Added by yllen 6 months ago

fix ticket task - fixed #5568

Revision 274
Added by yllen 5 months ago

fix ticket task category - fixed #5568

Revision 275
Added by yllen 5 months ago

update locales - see #5568

History

#1 Updated by yllen 6 months ago

  • Target version set to 2.1.2

#2 Updated by yllen 6 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r273.

#3 Updated by lufik 5 months ago

This fix changed only the error message to:

[2018-11-01 10:18:03] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/glpi/inc/toolbox.class.php line 657
  *** PHP Notice(8): Undefined index: solutiontypes_id
  Backtrace :
  plugins/behaviors/inc/tickettask.class.php:94      
  inc/plugin.class.php:1271                          PluginBehaviorsTicketTask::beforeUpdate()
  inc/commondbtm.class.php:1291                      Plugin::doHook()
  ajax/timeline.php:67                               CommonDBTM->update()
  {"user":"26@localhost","mem_usage":"0.031\", 2.64Mio)"}

I agree with the reporter that whole if is weird in Ticket Task update. I see no correlation between updating Ticket Task and solving/closing whole Ticket.

#4 Updated by yllen 5 months ago

Applied in changeset r274.

#5 Updated by yllen 24 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF