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

Integrate ImportExport into OTOBO core #2711

Closed
13 of 15 tasks
bschmalhofer opened this issue Nov 27, 2023 · 10 comments
Closed
13 of 15 tasks

Integrate ImportExport into OTOBO core #2711

bschmalhofer opened this issue Nov 27, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Nov 27, 2023

Importing and exporting data is a basic feature. Therefore let's integrate the extension package ImportExport into the core.

TODO:

  • check CodePolicy in rel-10_1
  • Update the translations in Kernel/Language/ based on the changes in i18n
  • merge the updated rel-10_1 into master
  • merge the ImportExport files into OTOBO-core, skipping the translations and the package setup
  • keep Kernel/Config/Files/XML/ImportExport.xml as a separate file
  • no need to integrate the files in doc, they just contain the database schema (still with OTRS 6 labels)
  • Add the tables to scripts/database/otobo-schema.xml
  • integrate the package setup (actually no setup code is run, thus nothing to do)
  • Update the migration package
  • merge the translations ( concatenate to the existing files ??? )
  • Update the dependency list of the ITSM bundle package. Will be done later, as there is no rel-11_0 branch for that module yet.
  • Move the ITSM specific Console Commands to ITSMConfigurationManagement, Kernel/System/Console/Command/Admin/ITSM/
  • move the tests and the test sample file for the console command to ITSMConfigurationManagement
  • Decide whether ImportExportCustomerCompany and the other ImportExport modules should be integrated as well Will be decided later
  • Update the installation manual for OTOBO 11. See Document that ImportExport is integrated in OTOBO 11 doc-otobo-installation#123
@bschmalhofer bschmalhofer added the enhancement New feature or request label Nov 27, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Nov 27, 2023
@bschmalhofer bschmalhofer self-assigned this Nov 27, 2023
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Nov 28, 2023

Using msgadd from the gettext project for merging translations. Here is the script, just for future reference:
integrate_importexport_po_files.sh.txt

The script does a slight reformatting when a translation contains newlines. This reformatting has been ignored when committing the changed .po files.

EDIT: this apparently belongs to some other issue

bschmalhofer added a commit that referenced this issue Nov 29, 2023
into the OTOBO core .po files.
No attempt was made to keep the translator information intact,
assuming the translators of ImportExport were also translating OTOBO core
Sample command:
   msgcat --use-first --no-wrap i18n/otobo/otobo.it.po ../ImportExport/i18n/ImportExport/ImportExport.it.po > i18n_new/otobo.it.po
bschmalhofer added a commit that referenced this issue Nov 29, 2023
…ement

Therefore move the file to the appropriate package.
bschmalhofer added a commit that referenced this issue Nov 29, 2023
therefore moving the text to ITSMConfigurationManagement
bschmalhofer added a commit that referenced this issue Nov 29, 2023
This had been broken when renaming the variable @MappingList to @MappingIDs.
bschmalhofer added a commit that referenced this issue Nov 29, 2023
The relavant unit test is scripts/test/Selenium/Agent/Admin/AdminImportExport.t
from the ITSMConfigurationManagement package.
The sample is included in the OTOBO core repository because it must
be available in the Selenium Docker image. The Selenium image is built
based on the core repository and has no connection to the
ITSMConfigurationManagement package.
bschmalhofer added a commit that referenced this issue Nov 29, 2023
@bschmalhofer
Copy link
Contributor Author

@svenoe pointed out that ImportExport should not show up in the list of installed packages when upgrading from 10.1. This functionality has been added to scripts/DBUpdate-to-11.0.pl,

Note that this does not work well when ImportExport has been installed in a OTOBO 11 system and then scripts/DBUpdate-to-11.0.pl is called. This is because the .save files are not copied to the overridden files. But this situation can only occur during development, as no version of ImportExport will be released for OTOBO 11.

bschmalhofer added a commit that referenced this issue Nov 30, 2023
of the method _UninstallMergedPackages().
Also a bit of tidying.
Also add the initial version of the task module UninstallMergedPackages.pm
bschmalhofer added a commit that referenced this issue Nov 30, 2023
The scope of the variable $Kernel::OM is the complete script.
bschmalhofer added a commit that referenced this issue Nov 30, 2023
of the method _UninstallMergedPackages().
Also a bit of tidying.
Also add the initial version of the task module UninstallMergedPackages.pm
bschmalhofer added a commit that referenced this issue Nov 30, 2023
The scope of the variable $Kernel::OM is the complete script.
bschmalhofer added a commit that referenced this issue Nov 30, 2023
@bschmalhofer
Copy link
Contributor Author

ImportExport is now integrated. Closing this issue.

@bschmalhofer
Copy link
Contributor Author

In

# Combine everything together in the correct order.
the precedence of the Kernel/Config/Files/XML/*.pm is declared. Frameworkhas there the lowest precedence. Currently only Framework.xml and ImportExport.xml are declared as Framework. This feels wrong, at least unexpected, as most other XML-Files are declared as Application.

$ grep init Kernel/Config/Files/XML/*.xml | grep '"Framework"'
Kernel/Config/Files/XML/Framework.xml:<otobo_config version="2.0" init="Framework">
Kernel/Config/Files/XML/ImportExport.xml:<otobo_config version="2.0" init="Framework">

and

$ grep init Kernel/Config/Files/XML/*.xml | grep '"Application"'
Kernel/Config/Files/XML/Calendar.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/CloudServices.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/Daemon.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/DynamicFields.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/GenericInterface.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/OTOBOPasswordPolicy.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/ProcessManagement.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/Ticket.xml:<otobo_config version="2.0" init="Application">
Kernel/Config/Files/XML/Znuny4OTOBOShowPendingTimeIfNeeded.xml:<otobo_config version="2.0" init="Application">

TODO:

  • change the init attribute in ImportExport.xml to Application.

bschmalhofer added a commit that referenced this issue Mar 23, 2024
now Framework.xml is the only file in Kernel/Config/Files/XML that has
'Framework' as its init attribute. This is more intuitive.
@bschmalhofer bschmalhofer reopened this Mar 23, 2024
bschmalhofer added a commit that referenced this issue Mar 23, 2024
now Framework.xml is the only file in Kernel/Config/Files/XML that has
'Framework' as its init attribute. This is more intuitive.
@bschmalhofer
Copy link
Contributor Author

ImportExport.xml has been adapted. Testing was skipped. Closing this issue again.

@laiminhtrung1997
Copy link

Dear @bschmalhofer @svenoe
I can not input to the Class field. I deploy OTOBO 11.0.6. What is wrong with the ImportExport? Please help me.
image

@svenoe
Copy link
Contributor

svenoe commented Oct 15, 2024

Firstly the CMDB for 11.0 is currently in beta, because we reimplemented parts and introduced large changes. ImportExport did work before, make sure, that in the general catalog there actually are classes defined. If everything seems alright, please open an issue in the ITSMConfigurationManagement repo with a step by step guide, how to reproduce this on a newly installed system.

(As a side note, we are currently finishing a first documentation for the new CMDB; probably it will be difficult to use it without. As a hint, look for the "Ready to import" classes in Admin->ConfigItems (on a test system!).

@laiminhtrung1997
Copy link

laiminhtrung1997 commented Oct 15, 2024

Dear @svenoe
I just tried to import classes using the Ready2Import that you hinted at. I can choose the Class in ImportExport, but there is a difference in version 11.0.6. I can not find the class Computer that is present on version 10.1.8, and the classes are already installed. Could you confirm this, please?

@svenoe
Copy link
Contributor

svenoe commented Oct 17, 2024

Hi laiminhtrung1997,
yes, Computer is not part of those classes. If you want to use the old class, you have to migrate those via the console command "Admin::ITSM::Configitem::UpgradeTo11". But in the end, maybe wait for the next upgrade of the CMDB which will have some documentation in it, or please go to our forums in the meanwhile; we try to keep HowTo questions out of github, to keep it clean for the developers...

@laiminhtrung1997
Copy link

Hi @svenoe @bschmalhofer
I have some issues in CMDB that are #24 and #26. Please help me to check it. I very much appreciate it. Thank you a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants