znuny / Survey

A customer survey tool to send emails to the customer after a ticket is closed. The customer can access the public interface to submit a survey with custom questions. A report of the survey can be shown in the agent interface.
1 stars 3 forks source link

SurveyRequestsSend: Message: Missing parameter Year. #3

Open MalteP opened 2 years ago

MalteP commented 2 years ago

After updating the Survey plugin on Znuny LTS from an previous, older installation, i frequently got the error message shown below:

ERROR: OTRS-otrs.Console.pl-Maint::Survey::RequestsSend-10 Perl: 5.24.1 OS: linux Time: Wed Mar 23 16:00:16 2022

Message: Missing parameter Year.

Traceback (31235): Module: Kernel::System::DateTime::_CPANDateTimeObjectCreate Line: 1887 Module: Kernel::System::DateTime::new Line: 153 Module: Kernel::System::ObjectManager::_ObjectBuild Line: 307 Module: Kernel::System::ObjectManager::Create Line: 242 Module: Kernel::System::Survey::Request::RequestSend Line: 470 Module: Kernel::System::Console::Command::Maint::Survey::RequestsSend::Run Line: 136 Module: (eval) Line: 461 Module: Kernel::System::Console::BaseCommand::Execute Line: 455 Module: (eval) Line: 145 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 124 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 236 Module: (eval) Line: 331 Module: main::Start Line: 331 Module: /opt/otrs/bin/otrs.Daemon.pl Line: 152

ERROR: OTRS-otrs.Console.pl-Maint::Survey::RequestsSend-10 Perl: 5.24.1 OS: linux Time: Wed Mar 23 16:00:16 2022

Message: Error creating DateTime object ( 'String' => undef ).

Traceback (31235): Module: Kernel::System::DateTime::new Line: 175 Module: Kernel::System::ObjectManager::_ObjectBuild Line: 307 Module: Kernel::System::ObjectManager::Create Line: 242 Module: Kernel::System::Survey::Request::RequestSend Line: 470 Module: Kernel::System::Console::Command::Maint::Survey::RequestsSend::Run Line: 136 Module: (eval) Line: 461 Module: Kernel::System::Console::BaseCommand::Execute Line: 455 Module: (eval) Line: 145 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Cron::Run Line: 124 Module: Kernel::System::Daemon::DaemonModules::SchedulerTaskWorker::Run Line: 236 Module: (eval) Line: 331 Module: main::Start Line: 331 Module: /opt/otrs/bin/otrs.Daemon.pl Line: 152

It seems that in some cases, when checking if a survey was sent in the last time (Kernel/System/Survey/Request.pm:453), the select statement returns a NULL value.

The solution shown in the znuny community board is to exclude all columns where send_time is NULL: https://community.znuny.org/viewtopic.php?p=161160&sid=8244135e8466851f38051881166a9efb#p161160

Would be great if this could be fixed in the official repository.

Best regards, Malte

rkaldung commented 2 years ago

Hi @MalteP, Could you perhaps let me know the version you had installed before the update?

MalteP commented 2 years ago

Hi @rkaldung, i have recovered the old OTRS directory from a backup, but unfortunately there are no files with a version number (e.g. Survey.sopm) inside the filesystem. The copyright notice of the plugin files dates to 2019, and i've compared some modifications made in the releases back then, so i guess the previous version must have been Survey 6.0.12.