RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
263 stars 75 forks source link

Phrase "otrs" renamed to "otobo" in SysConfig during migration from OTRS to OTOBO #1296

Open OrionExplorer opened 3 years ago

OrionExplorer commented 3 years ago

Hello!

I've just performed a successful migration from ((OTRS)) Community Edition 6.0.30 to OTOBO 10.0.12 with migration.pl script.

During standard verification I found an issue with outgoing communication: authentication failed.

Quick look at SendmailModule::AuthUser gave me the answer: username "otrs" has been renamed to "otobo".

I can provide more details if you need.

Regards, Marcin

bschmalhofer commented 3 years ago

Hello Marcin,

this change must have occured in the the migration step OTOBOMigrateConfigFromOTRS. I checked the replacement rules Kernel::System::MigrateFromOTRS::Base::_ChangeFileInfo() but found no obvious reason why that renaming would happen. I will test that in my devel installation.

bschmalhofer commented 3 years ago

This still happens after fixing #1297, but at least I found the regex that does the replacing. Trying to fix thin in the next days.

bschmalhofer commented 2 years ago

While looking into this I noticed that in Kernel/System/MigrateFromOTRS/CloneDB/Backend.pm the following hash is set up:

    my %CheckEncodingColumns = (
        'article_data_mime.a_body'              => 1,
        'article_data_mime_attachment.filename' => 1,
    );

It looks like this setup has no effect at all. Should be tidied in rel-10_1.

bschmalhofer commented 2 years ago

Closed inadvertently.

bschmalhofer commented 2 years ago

This funny renaming is happening in the migration step OTOBOMigrateConfigFromOTRS. This step happens after the database tables, including the table _sysconfigmodified were transfered. The SysConfig is dumped as a YAML string into the file SysConfigDump.sysconf . Then there are string replacements working on that file. The change file is then reimported in the SysConfig.

The relevant replacements are set up in Kernel::System::MigrateFromOTRS::Base::ChangeFileInfo() .

In my test migration only two or three value were affected by those string replacements:

mysql> select name, change_time, convert(effective_value using UTF8) from sysconfig_modified where change_time like '%12-17%'; +--------------------------+---------------------+------------------------------------------------------------------+ name change_time convert(effective_value using UTF8) +--------------------------+---------------------+------------------------------------------------------------------+ SecureMode 2021-12-17 15:12:32 --- '0'
Package::RepositoryList 2021-12-17 15:12:40 ---
https://download.znuny.org/releases/itsm/packages6/: ITSM 6 LogModule::LogFile 2021-12-17 15:12:33 --- /opt/otobo/var/log/otobo.log
SendmailModule::AuthUser 2021-12-17 15:12:34 --- otobo

+--------------------------+---------------------+------------------------------------------------------------------+

Note that the modified value for Package::RepositoryList comes from reverting to the default setting, incidently to the OTRS, or Znuny, default. SecureMode was propably changed by DisableSecureMode() but it is not obvious why the change time is so early.

Obviously it is kind of hard to come up with general rules how to deal with SysConfig entries that have been changed in the source system. For the sake of this issue I propose the following changes:

An explicit stop filter is preferred to negative lookbehind regexes as these can be confusing. They did confuse me.

This is likely not the final solution, as other migration problems might crop up. But it should be good enough for this issue.

bschmalhofer commented 2 years ago

Added the stop filter for lines containing AuthUser.

TODO:

bschmalhofer commented 2 years ago

Well, the dump of the SysConfig is more verbose than guessed. The stop filter by line does not do the job;

SendmailModule::AuthUser: ChangeBy: 1 ChangeTime: 2021-12-17 19:21:17 CreateBy: 1 CreateTime: 2021-10-05 07:54:28 DefaultID: 1093 EffectiveValue: otrs IsDirty: 1 IsValid: 1 ModifiedID: '14' Name: SendmailModule::AuthUser ResetToDefault: 0 SettingUID: Modified1420211217192117 TargetUserID: ~ UserModificationActive: 0

Another idea is needed.

bschmalhofer commented 2 years ago

Hi OTOBO-Team,

I propose the following plan:

bschmalhofer commented 2 years ago

This was discussed in the OTOBO-Team and the conclusion was to move this issue to 10.1. TODO: