Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration.pl ignores OTRS Tags in the ITSM ChangeManagement Notification #883

Closed
OlliW opened this issue Mar 24, 2021 · 5 comments
Closed
Assignees
Labels
bug Something isn't working as intended
Milestone

Comments

@OlliW
Copy link

OlliW commented Mar 24, 2021

migration.pl ignores OTRS Tags in the ITSM ChangeManagement Notification

@bschmalhofer
Copy link
Contributor

Hi @OlliW,

first a question because I'm not really familiar with upgrading and migrating the ITSM package. How did you transfer the ITSM related data from OTRS to OTOBO? I think that migration instructions for ITSM is missing in https://doc.otobo.org/manual/installation/stable/en/content/ and that the ITSM tables are not handled in migration.pl.

When the ITSM tables are available then a quick fix for the notifications should be a simple SQL statement in the OTOBO database.

UPDATE change_notification_message SET text = REPLACE( text, '<OTRS_', '<OTOBO_'); UPDATE change_notification_message SET text = REPLACE( text, '&lt;OTRS_', '&lt;OTOBO_');
Could you try those and report whether these statements work for you?

@bschmalhofer bschmalhofer added this to the OTOBO 10.0.13 milestone Sep 9, 2021
@bschmalhofer bschmalhofer self-assigned this Sep 9, 2021
@bschmalhofer bschmalhofer added the bug Something isn't working as intended label Sep 9, 2021
bschmalhofer added a commit that referenced this issue Sep 9, 2021
Remove unused message in the setup of tasks.
Nest result hash less deeply.
Remove support for running all tasks in a single run, as that was unused.
@bschmalhofer
Copy link
Contributor

bschmalhofer commented Sep 9, 2021

Fiddled a bit with the migration modules. Added a module for migrating the ITSM tables. But the real problem is finding a good test case where this can be tested.

TODO:

  • testmigration with actual data
  • find out whether change_notification_message really is the only table that needs to be migrated

bschmalhofer added a commit that referenced this issue Sep 10, 2021
There is no apparent benefit from the check, as the existence of the
relevant Perl module is already checked.
bschmalhofer added a commit that referenced this issue Sep 10, 2021
bschmalhofer added a commit that referenced this issue Sep 10, 2021
bschmalhofer added a commit that referenced this issue Sep 10, 2021
Use the new method for updating 'change_notification_message'
bschmalhofer added a commit that referenced this issue Sep 10, 2021
@bschmalhofer
Copy link
Contributor

Found no further ITSM tables that contain macros like '<OTOBO_'. A test migration looked fine.

Merged the PR as it has some simplifications of the migration modules.

@svenoe There is a new migration task OTOBOItsmTablesMigrate which is current activated. However, the task is still untested, as my source database doesn't have ITSMChangeManagement installed. I propose that we deactivate the new task, unless we manage to do a meaningful test migration of an installation that actually uses change management.

@bschmalhofer
Copy link
Contributor

Did a testmigration from Znuny 6.0, PostgreSQL to OTOBO 10.0, Mysql with ITSMChangeManagement installed, but no actual changes. The migration result looks fine:

Source OTRS:

otrs=> select count(*) from change_notification_message where text like '%OTRS_%';
count

216
(1 row)

otrs=> select count(*) from change_notification_message where text like '%OTOBO_%';
count

 0

(1 row)

otrs=>

Target OTOBO:

MariaDB [otobo]> select count() from change_notification_message where text like '%OTRS_%';
+----------+
| count(
) |
+----------+
| 0 |
+----------+
1 row in set (0.006 sec)

MariaDB [otobo]> select count() from change_notification_message where text like '%OTOBO_%';
+----------+
| count(
) |
+----------+
| 216 |
+----------+
1 row in set (0.002 sec)

MariaDB [otobo]>

@bschmalhofer
Copy link
Contributor

PR was already merged. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants